Game "Grid" idea need suggestions...
Well, im making a game, and need some suggestions, my game is a basic rpg but i need a way of placing(npcs, buildings, etc.).
I was thinking of making like a grid where i could place things at certain locations like(4242,4242) and I could do same for ground texture like grass at (503.535).
Im looking for ways of doing this...not code,
Thanks for suggestions!
Re: Game "Grid" idea need suggestions...
You might want to think in terms of tiles, at least for the texture and smaller objects (those that fit in a single tile). A TIle will therefore have a texture type and a list of things that it contains. That way you can draw these quite quickly by passing over the tile array. Note you will want to (eventually) know what the neighbouring textures are in order to smooth the transition between textures at a tiles edge. Gamedev.net used to have some good articles on this. Look back in the archives on there.
For larger objects that span more than a single tile you'll do another pass and overlay them. Later on you might want to consider a z-position for these things so you can tell whether something is above a character (eg a trees canopy), so you'd do a few passes like:
Draw background (textures and small objects).
Draw z = 1, which covers boulders, tree trunks, characters.
Draw z=2, tree canopy, single story building roof, second story of building.
etc.
Of course the trick then is to only redraw bits that have changed, otherwise you're drawing the whole image time and again, which would be time-consuming.
Anyway, as always on these things, start small. Don't try and do the z-coordinate bit until you have a fully functioning non-covering map.
Re: Game "Grid" idea need suggestions...
Prefect that's what i was looking for just couldn't find the right name for it!
Re: Game "Grid" idea need suggestions...
Gamedev.net is always a good place to look for these sorts of things.
They may not necessarily be in the language you are writing in, but the concepts can help a great deal.