Mythruna

General Category => General Discussion => Topic started by: The Chosen One on May 31, 2012, 06:08:36 PM



Title: I'm attempting to create my own game.
Post by: The Chosen One 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 :D ) 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  ;D ) 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.
 
(http://gyazo.com/50223edfbd76ba7d203c6e8342c65b55.png)
The sand > Water transition is terrible I know

I would love anyones option as to the looks of the game currently.

Thanks
Jacob


Title: Re: I'm starting my own game.
Post by: pspeed 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  ;D ) 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.


Title: Re: I'm starting my own game.
Post by: The Chosen One 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.


Title: Re: I'm starting my own game.
Post by: pspeed 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.


Title: Re: I'm attempting to create my own game.
Post by: Thanos 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 :P Im gonna check that GOAP myself too  ::)


Title: Re: I'm attempting to create my own game.
Post by: Moonkey 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?


Title: Re: I'm attempting to create my own game.
Post by: pspeed 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.


Title: Re: I'm attempting to create my own game.
Post by: BenKenobiWan 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.


Title: Re: I'm attempting to create my own game.
Post by: Moonkey 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. ;)


Title: Re: I'm attempting to create my own game.
Post by: pspeed 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 *

 


Title: Re: I'm attempting to create my own game.
Post by: Moonkey 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 :)


Title: Re: I'm attempting to create my own game.
Post by: BenKenobiWan 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?


Title: Re: I'm attempting to create my own game.
Post by: randomprofile on June 08, 2012, 12:19:58 PM
Starting to sound like dwarf fortress :D


Title: Re: I'm attempting to create my own game.
Post by: Moonkey 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.


Title: Re: I'm attempting to create my own game.
Post by: Blackslash 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


Title: Re: I'm attempting to create my own game.
Post by: Michael on December 08, 2012, 01:23:19 PM
great graphics, i would like to play it :)


Title: Re: I'm attempting to create my own game.
Post by: Sean on December 08, 2012, 01:54:46 PM
It's odd people still make these types of games in a language other than Python.


Title: Re: I'm attempting to create my own game.
Post by: nh_99 on December 08, 2012, 02:10:42 PM
I wouldn't use python to code an app to flush my toilet dude. Python is for scripting.


Title: Re: I'm attempting to create my own game.
Post by: Moonkey on December 08, 2012, 05:14:17 PM
I wouldn't use python to code an app to flush my toilet dude. Python is for scripting.
Exacty why you would need Python the script the toilet flush.


Title: Re: I'm attempting to create my own game.
Post by: pspeed on December 08, 2012, 06:38:27 PM
LOL.  You guys are funny.

Entire apps are definitely written in Python.  Just because I wouldn't do it doesn't mean that it's a bad idea. :)


Title: Re: I'm attempting to create my own game.
Post by: nh_99 on December 09, 2012, 07:26:49 AM
Well, I wouldn't, and if I did I would use java. I know that python is fine but it takes way too long to develop with so you might as well just use a more common language such as java or C++.


Title: Re: I'm attempting to create my own game.
Post by: Sean on December 09, 2012, 11:52:35 AM
Python is waaaaaaay simpler than Java and C++ combined. It's the simplicity that makes simple games like an rpg easier to create.


Title: Re: I'm attempting to create my own game.
Post by: Moonkey on December 09, 2012, 12:58:31 PM
*sits back* I don't really know what Python is. But if I can get it to flush my toilet then maybe... maybe...


Title: Re: I'm attempting to create my own game.
Post by: nh_99 on December 09, 2012, 05:04:05 PM
Alright, you have me there. I use java and java only so I kind of diss other languages that people use to plug into my games. And i'm not sure about a toilet flushing script in python... ;)


Title: Re: I'm attempting to create my own game.
Post by: Sean on December 09, 2012, 07:00:06 PM
Well, I'm sure you can program a little something in Python using a Raspberry Pi, or Arduino if that's possible to run a motor whenever indicated. The motor can pull the chain inside and therefore flushing the toilet. Then you could patent/distribute your invention and make millions, go into retirement, move to Belize, kill your neighbor, then get caught by police several days later while trying to hop borders.


Title: Re: I'm attempting to create my own game.
Post by: Moonkey on December 09, 2012, 09:46:35 PM
Well, I'm sure you can program a little something in Python using a Raspberry Pi, or Arduino if that's possible to run a motor whenever indicated. The motor can pull the chain inside and therefore flushing the toilet. Then you could patent/distribute your invention and make millions, go into retirement, move to Belize, kill your neighbor, then get caught by police several days later while trying to hop borders.
Sounds like a plan.


Title: Re: I'm attempting to create my own game.
Post by: belgariad87 on December 10, 2012, 05:05:05 AM
Well, I'm sure you can program a little something in Python using a Raspberry Pi, or Arduino if that's possible to run a motor whenever indicated. The motor can pull the chain inside and therefore flushing the toilet. Then you could patent/distribute your invention and make millions, go into retirement, move to Belize, kill your neighbor, then get caught by police several days later while trying to hop borders.
Forum group project?


Title: Re: I'm attempting to create my own game.
Post by: BenKenobiWan on December 10, 2012, 10:28:11 AM
Well, I'm sure you can program a little something in Python using a Raspberry Pi, or Arduino if that's possible to run a motor whenever indicated. The motor can pull the chain inside and therefore flushing the toilet. Then you could patent/distribute your invention and make millions, go into retirement, move to Belize, kill your neighbor, then get caught by police several days later while trying to hop borders.
Forum group project?
I'm in. Who wants to be the neighbor?


Title: Re: I'm attempting to create my own game.
Post by: Michael on December 10, 2012, 03:40:35 PM
Well, I'm sure you can program a little something in Python using a Raspberry Pi, or Arduino if that's possible to run a motor whenever indicated. The motor can pull the chain inside and therefore flushing the toilet. Then you could patent/distribute your invention and make millions, go into retirement, move to Belize, kill your neighbor, then get caught by police several days later while trying to hop borders.
Forum group project?
I'm in. Who wants to be the neighbor?
I'm going to go practice java..


Title: Re: I'm attempting to create my own game.
Post by: nh_99 on December 10, 2012, 05:39:56 PM
Hehe, people are too lazy to flush the toilet so they get a device to do it over bluetooth ;D


Title: Re: I'm attempting to create my own game.
Post by: Sean on December 10, 2012, 09:30:24 PM
Well, I'm sure you can program a little something in Python using a Raspberry Pi, or Arduino if that's possible to run a motor whenever indicated. The motor can pull the chain inside and therefore flushing the toilet. Then you could patent/distribute your invention and make millions, go into retirement, move to Belize, kill your neighbor, then get caught by police several days later while trying to hop borders.
Forum group project?
I'm in. Who wants to be the neighbor?
I'm going to go practice java..
I will take that as "I'll volunteer to be the neighbor"


Title: Re: I'm attempting to create my own game.
Post by: Michael on December 11, 2012, 03:50:51 PM
Well, I'm sure you can program a little something in Python using a Raspberry Pi, or Arduino if that's possible to run a motor whenever indicated. The motor can pull the chain inside and therefore flushing the toilet. Then you could patent/distribute your invention and make millions, go into retirement, move to Belize, kill your neighbor, then get caught by police several days later while trying to hop borders.
Forum group project?
I'm in. Who wants to be the neighbor?
I'm going to go practice java..
I will take that as "I'll volunteer to be the neighbor"
Yes :)


Title: Re: I'm attempting to create my own game.
Post by: pspeed on December 15, 2012, 06:39:55 AM
http://www.homechunk.com/6669/2012/12/15/bluetooth-enabled-inax-satis-toilet-with-built-in-speakers-coming-next-february/

No word on what language APIs are available... ;)


Title: Re: I'm attempting to create my own game.
Post by: nh_99 on December 15, 2012, 07:07:31 AM
That's terrible. I can't believe that they are going to have a bluetooth toilet... :o


Title: Re: I'm attempting to create my own game.
Post by: Sean on December 15, 2012, 09:20:01 AM
The original wasn't supposed to be bluetooth, but I think some design arrangements can make this possible.