The Chosen One
Newbie
Posts: 4
I feel like I should cry... but I cant.
|
|
« on: May 31, 2012, 06:08:36 PM » |
|
Hey there, First off, this thread is more so directed at any coders on here, if you don't know programming I would still love your opinion of the project so far. I'm a big fan of the game. Paul and his rapid progress has inspired me to start working on a game of my own. I know he's currently working on an AI system so I suppose this would be a 'good' time to ask, for my game I plan to have a fake emotional system. This is more or less how it will work. When the new game function is called it will randomly generate several towns with randomised NPC's inside. For example the first play through there might be a town called TownOne with only one house, inside that house lives Bill Morgan. The second time through that village might have five houses and 16 people (family members and what not). Each NPC will be assigned a 'emotion' value (by default 0). When YOU or another NPC do something harmful towards that NPC his emotion will go down (-x) any vise versa, If you are nice to them they will become happy (+x). If a NPC is really depressed they will have a (small) chance to become evil an or commit suicide (dark I know ) and again vise versa. If an NPC is really happy they will do good deeds. When a bad deed is committed the town's value will drop (all houses will lose value) and... you guessed it vise versa. How do I plan to do all this? A clock loop. This loop will simply count to 10 (minutes) and then call a 'npc action' function that will go through every NPC in the game, check their emotion (if its below -30 have a 1/100 chance of suicide and a 1/50 chance to become evil (I need to stop saying vise versa...)) Once the suicides +/ morality changes have occurred it will go through all of the NPC's again and have a 1/200 chance of interacting with the world. For example good NPC's will have a 1/200 chance to do a good dead (donate to charity, help the homeless, clean up the town, etc) and a bad NPC will have a 1/200 chance to do a bad deed, (murder, fire, theft, etc). What do you guys think? Do you see any logic errors in my concept? I am coding the game in C++ so hopefully lag won't be an issue. Also on a side note to Paul, is simplistica (or what ever your company is called ) a official registered company? I was just curious because if I do attempt to make a profit off of my game when/if its finished I would not like to get sued by the government's tax department. The sand > Water transition is terrible I know I would love anyones option as to the looks of the game currently. Thanks Jacob
|
|
« Last Edit: May 31, 2012, 09:49:01 PM by The Chosen One »
|
Logged
|
|
|
|
pspeed
|
|
« Reply #1 on: May 31, 2012, 08:04:55 PM » |
|
What do you guys think? Do you see any logic errors in my concept? I am coding the game in C++ so hopefully lag won't be an issue.
To use C++ or not will have nothing to do with any lag issues. It all comes down to how you code the game and all things being equal, C++ development will take about 4 times longer than something like Java, as an example. Though only knowing one language does change things. If you go the C++ route, I highly recommend putting most of the higher level game logic into a scripting language like LUA. You will save yourself years of time. Anyway, regarding the AI, there is nothing really wrong with your logic but, in the end, action selection is the pretty trivial part of the problem. It's the action execution that is the really hard part. For example, you mention actions like "donate to charity, help the homeless, clean up the town"... these are all incredible complex things to make work right. Once you have them, selecting them isn't a big deal. The interesting thing is that once you've solve those problems the strategy you write about becomes clearer. For example, an AI system like GOAP (Goal Oriented Action Planning) naturally has places to insert a personality. Also on a side note to Paul, is simplistica (or what ever your company is called ) a official registered company? I was just curious because if I do attempt to make a profit off of my game when/if its finished I would not like to get sued by the government's tax department. Simsilica, LLC is a real company. In general, you don't necessarily need one to sell a game (depending on where you live, of course) but it does help in lots of ways I won't go into here. (You will be taxed on your income, regardless.) My ultimate vision is larger than just selling a game so I wanted to at least start things out right. Insert witty comment about failing to plan = planning to fail, or whatever.
|
|
|
Logged
|
|
|
|
The Chosen One
Newbie
Posts: 4
I feel like I should cry... but I cant.
|
|
« Reply #2 on: May 31, 2012, 09:48:44 PM » |
|
I was under the impression that C++ was a 'fast' language. I most likely miss interpreted what the article said. I currently only really know C++ and .net so that's why I'm going with the 'long' route. Thanks for the advice and tips.
|
|
|
Logged
|
|
|
|
pspeed
|
|
« Reply #3 on: May 31, 2012, 10:04:03 PM » |
|
I was under the impression that C++ was a 'fast' language. I most likely miss interpreted what the article said. I currently only really know C++ and .net so that's why I'm going with the 'long' route. Thanks for the advice and tips.
In modern games, most of the grunt work is done on the graphics card. The higher level things like AI and such are almost universally implemented in scripts these days. Either an engine-specific custom scripting language or something else. In C++, lua and python are pretty standard with lua probably edging python out in speed. On the Java side, there are many options because there is script support built into the JDK in a standard way (with JavaScript included and everything else pluggable). So it's common to see python, JavaScript, scala, etc.. Mythruna uses Groovy as its scripting language. At any rate, the time sinks for a game are no longer directly related to the C++ versus Java versus (insert favorite language here) debate. And for the types of tasks where it is relevant, C++ and Java are comparable... especially if you throw .NET in the mix. Learning a new language would probably bog you down too much anyway. You should definitely read about "entity systems" and "GOAP", though. If you thoroughly understand both of those concepts then you will save yourself man-years of time down the road.
|
|
|
Logged
|
|
|
|
Thanos
|
|
« Reply #4 on: June 01, 2012, 06:56:03 PM » |
|
I would suggest not to mess searching which language is faster but what language you are most familiar with. You could go with .net too if you feel it will save you time. About the AI...i dont know anything Im gonna check that GOAP myself too
|
|
|
Logged
|
|
|
|
Moonkey
|
|
« Reply #5 on: June 01, 2012, 08:25:02 PM » |
|
Your AI sounds a bit basic in a human interaction type of view. I know this will be a big project to create such an AI but. When you said "When YOU or another NPC do something bad to another NPC" I thought. What if YOU and ANOTHER NPC do something bad to another NPC. Will it effect the NPC that you and it did something bad? For example: You + Friend do bad. Friend = Influenced by bad behavior otherwise changing karma? :p?
|
|
|
Logged
|
Mythruna: Don't you dare read any posts I made before 2014.
|
|
|
pspeed
|
|
« Reply #6 on: June 03, 2012, 10:50:55 AM » |
|
Your AI sounds a bit basic in a human interaction type of view. I know this will be a big project to create such an AI but. When you said "When YOU or another NPC do something bad to another NPC" I thought. What if YOU and ANOTHER NPC do something bad to another NPC. Will it effect the NPC that you and it did something bad? For example: You + Friend do bad. Friend = Influenced by bad behavior otherwise changing karma? :p?
Plus, you will find that the really interesting questions in AI are in determining what is "good" and what is "bad". For example, computer chess would be trivial to write if you knew what a good and bad move were. Even for simple stuff, figuring out all of the good stuff and evil stuff will be tricky.
|
|
|
Logged
|
|
|
|
BenKenobiWan
Friendly Moderator
Donators
Hero Member
Posts: 674
Jesus loves you!
|
|
« Reply #7 on: June 03, 2012, 10:54:57 PM » |
|
You probably were going to do this, but you should have Neutral actions too. For example, stealing a loaf of bread would be evil, giving it away would (probably) be good, and buying/selling it would be neutral.
|
|
|
Logged
|
|
|
|
Moonkey
|
|
« Reply #8 on: June 05, 2012, 04:28:37 AM » |
|
You probably were going to do this, but you should have Neutral actions too. For example, stealing a loaf of bread would be evil, giving it away would (probably) be good, and buying/selling it would be neutral.
*steals from good person* *shares bread with rest of thiefs in camp* I'm officially... GOOD.
|
|
|
Logged
|
Mythruna: Don't you dare read any posts I made before 2014.
|
|
|
pspeed
|
|
« Reply #9 on: June 05, 2012, 07:35:39 AM » |
|
You probably were going to do this, but you should have Neutral actions too. For example, stealing a loaf of bread would be evil, giving it away would (probably) be good, and buying/selling it would be neutral.
*steals from good person* *shares bread with rest of thiefs in camp* I'm officially... GOOD. This is why it is so hard to determine good and evil. If the above turned out to be latently evil then what if: * thieves in camp decide to turn to honest life after your generosity * ...but... * good person now goes on killing rampage because he is starving * ...or even worse... * turns to cannibalism *
|
|
|
Logged
|
|
|
|
Moonkey
|
|
« Reply #10 on: June 08, 2012, 03:22:14 AM » |
|
That's why he turns to this: 1 loaf of bread == 12 Slices of bread. If 1EvilNPC_Entity asks 2,3, and 4EvilNPC_Entity if they are hungry, (They say they are) 1EvilNPC_Entity breaks loaf into 4 pieces, resulting in each EvilNPC_Entity getting 1 piece of bread. But the NPC's get more food intake since 1 of the 4 pieces of bread = 3 Slices. (12 / 4 = 3. 4 pieces = 3 slices) Which would solve the out of food problem. It would be more complicated but AWESOME to see it happen
|
|
|
Logged
|
Mythruna: Don't you dare read any posts I made before 2014.
|
|
|
BenKenobiWan
Friendly Moderator
Donators
Hero Member
Posts: 674
Jesus loves you!
|
|
« Reply #11 on: June 08, 2012, 10:32:50 AM » |
|
That's why he turns to this: 1 loaf of bread == 12 Slices of bread. If 1EvilNPC_Entity asks 2,3, and 4EvilNPC_Entity if they are hungry, (They say they are) 1EvilNPC_Entity breaks loaf into 4 pieces, resulting in each EvilNPC_Entity getting 1 piece of bread. But the NPC's get more food intake since 1 of the 4 pieces of bread = 3 Slices. (12 / 4 = 3. 4 pieces = 3 slices) Which would solve the out of food problem. It would be more complicated but AWESOME to see it happen What? How did the fractions have anything to do with good and evil?
|
|
|
Logged
|
|
|
|
randomprofile
|
|
« Reply #12 on: June 08, 2012, 12:19:58 PM » |
|
Starting to sound like dwarf fortress
|
|
|
Logged
|
|
|
|
Moonkey
|
|
« Reply #13 on: June 09, 2012, 07:38:10 PM » |
|
That's why he turns to this: 1 loaf of bread == 12 Slices of bread. If 1EvilNPC_Entity asks 2,3, and 4EvilNPC_Entity if they are hungry, (They say they are) 1EvilNPC_Entity breaks loaf into 4 pieces, resulting in each EvilNPC_Entity getting 1 piece of bread. But the NPC's get more food intake since 1 of the 4 pieces of bread = 3 Slices. (12 / 4 = 3. 4 pieces = 3 slices) Which would solve the out of food problem. It would be more complicated but AWESOME to see it happen What? How did the fractions have anything to do with good and evil? It solved the problem where someone who shared the stolen bread who didn't have enough for himself did bad things for example like Paul said: Stole more bread, or did something worse like cannibalism.
|
|
|
Logged
|
Mythruna: Don't you dare read any posts I made before 2014.
|
|
|
Blackslash
Full Member
Posts: 172
Whats up
|
|
« Reply #14 on: December 08, 2012, 11:52:32 AM » |
|
Great idea I think there should be a one in 400 that they'll get married And what is the game called
|
|
|
Logged
|
~~~~~~~~~~~~~~~Blackslash~~~~~~~~~~~~~~~ Nobody is perfect therefore I am nobody
|
|
|
|