Game Programming Newbie -- In Game Objects as Required

159 Views Asked by At

I've done some volunteer game programming in LPC for a MUD in my past and everything there was easy. If I wanted a new item I would just use a function to load (for example an NPC) as many times over as I wanted. Now I want to program my own little game I cannot for the life of me identify what I even need to do. If I get nothing more than the name of what I want to do in order to carry out my own further research, that would be enough. Having rambled on about all of that, on to my question:

I want to make on the fly instances of in-game objects (for example people), some handled by the computer, other handled by the player. A lot of the help on game programming I've found has been about making sprites move and handling collision detection. This is all great, but I want to code a strategy game and so am more interested in creating some sandbox flexibility within my game and coding the AI to provide the interest, rather than swish graphics and awesome sounds, etc. I want to setup the game with a variable number of randomly generated people for the player to interact with. So far I've created a class to handle the people, but I'm now stuck as each instance of the class needs a unique name and I programming in that would mean there was no randomness in the number.

What would I need to look up to achieve what I'm after? What would it be called? Have I even explained myself with any degree of eloquence?

Thank you in advance for any potential help that might come my way.

Matt.

1

There are 1 best solutions below

1
On

What you're looking for is something like RPG name generators (google it). Basically those sites you'll find generate their names out of a random combination and concatenation of prefixes, syllables and suffixes. I don't know where there is research on this topic, but you could start with something like that.

Edit: you could use Markov chains, they are used for text generation.