Results 1 to 4 of 4
- 02-29-2012, 05:29 AM #1
Member
- Join Date
- Feb 2012
- Posts
- 39
- Rep Power
- 0
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!
- 02-29-2012, 09:42 AM #2
Moderator
- Join Date
- Apr 2009
- Posts
- 10,451
- Rep Power
- 16
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.Please do not ask for code as refusal often offends.
- 02-29-2012, 11:05 PM #3
Member
- Join Date
- Feb 2012
- Posts
- 39
- Rep Power
- 0
Re: Game "Grid" idea need suggestions...
Prefect that's what i was looking for just couldn't find the right name for it!
- 03-01-2012, 09:32 AM #4
Moderator
- Join Date
- Apr 2009
- Posts
- 10,451
- Rep Power
- 16
Similar Threads
-
loop "play again" in an 8 ball game, loops but ... (by IareSmart)
By DarrylBurke in forum New To JavaReplies: 4Last Post: 02-03-2012, 01:55 PM -
loop "play again" in an 8 ball game , loops but wont let me answer my "out.print"
By IareSmart in forum New To JavaReplies: 1Last Post: 02-01-2012, 08:37 PM -
please give me some idea... i will make a game "FAMILY FEUD"... using desktop appli..
By w0ot28 in forum New To JavaReplies: 1Last Post: 09-30-2011, 01:28 PM -
Implementing "Game Over" in Minesweeper game based on Gridworld framework.
By JFlash in forum New To JavaReplies: 2Last Post: 08-05-2010, 04:49 AM -
the dollar sign "$", prints like any other normal char in java like "a" or "*" ?
By lse123 in forum New To JavaReplies: 1Last Post: 10-20-2008, 07:35 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks