#13842 - Xax - Tue Dec 23, 2003 6:42 pm
Howdy! I've been trying to figure out if it is feasible to create a game with isometric (technically, dimetric, or so I read) tile graphics, like Fallout. As a crude example, the tiles look somewhat like this (the 4 sides are meant to be straight lines):
Code: |
__●_ ●
__●/ ●_ ● ●
__●/ ●_ ● ●
●/ ●_ ● ●
●_ ●_ ● ●
●_ __● ● ●
●_ __●/ ● ●
●_ __●/ ● ●
●/ ●
|
Note that the top-most point is not vertically aligned with the bottom-most point, and the left-most point is not horizontally aligned with the right-most point.
I have a few questions about this:
● Is making a GBA game with graphics like this feasible?
● Is there a map editor out there that will accomodate tiles of this shape?
● Using scaled-down Fallout tiles for my prototype, is there a problem with these tiles being 32x14 in size as opposed to 32x16? Do I just make the 2 empty rows transparent?
● Is there anything specific to this shape of tile that I should be aware of?
Now I'm somehwat new to game and graphics programming, but I had it in my head that I would just make the areas outside of the tiles transparent (ie. the NW, NE, SW, SE corners of the tile which are left empty/blank), which would result in a lot of tile overlapping. Is this the best way to do things? Is it even feasible?
And finally, is there a resource out there that might answer some of these questions for me, and help me with using these types of graphics? I've had no luck finding information aside from stuff about traditional isometric and hexagon graphics.
Thanks to those who had the patience to read through this ;). Any help is appreciated!
Matt
#13850 - Stroff - Tue Dec 23, 2003 9:00 pm
You might want to consider using a sprite for every tile.
#13851 - Xax - Tue Dec 23, 2003 9:09 pm
While doing further reading, I came across that possibility. What's the advantage of going with sprites instead of tiles in this case? Are there any disadvantages to using sprites? I don't intend to use scaling or rotating.
#13853 - Stroff - Tue Dec 23, 2003 9:39 pm
[quote="Xax"]While doing further reading, I came across that possibility. What's the advantage of going with sprites instead of tiles in this case? Are there any disadvantages to using sprites? I don't intend to use scaling or rotating.[/quote]
There are two prime advantages to using sprites. First, they can be arranged freely - they don't have to be arranged in a tilemap.
Second, they don't have to be flat, and can overlap.. depending on what type of game you are planning, you could make small mountains and the like.
The main disadvantage of using sprites is that you've only got 128 of them.
#13856 - tepples - Tue Dec 23, 2003 10:22 pm
Stroff wrote: |
The main disadvantage of using sprites is that you've only got 128 of them. |
Have you ever tried writing to OAM during hblank?
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#13861 - cosmic4z - Wed Dec 24, 2003 1:43 am
Here's another idea / method ...
Have the tiles stores as mini bitmaps (RLE encoded).
Run the game in bitmap mode (256 colour - 2 screens).
During the main game loop ... once you have 'drawn' the screen (twice ... cos you're bank switching) ... then you only need to update screen edges.
This might also make better use of VRAM than using sprites for tiles?
Depends on the game you have in mind ... I've used this method before on the Amiga ... am sure it would work very well for anything like what you describe ... prob be very good for isometric stuff too.
_________________
Qwak - www.qwak.co.uk | Forum - www.qwak.co.uk/forum/
#13865 - Xax - Wed Dec 24, 2003 3:07 am
Hmm, interesting. Thanks for your reply (and everyone else's as well). I don't quite understand it fully (I'm a great big newb), but I'm pretty sure I'm going to want sprites for other things besides the map tiles, so I'm looking at all other possibilities. Would it be possible to explain that a bit further on a newb level? ;) Thanks again,
Matt
P.S. Oh by the way, I decided to just stretch the tiles slightly to 32x16 for convenience's sake. Now Mappy likes me.
#13880 - cosmic4z - Wed Dec 24, 2003 12:43 pm
Dear Xax,
For a newbie to impliment scrolling ... with those odd tile shapes ... seems a bit ambitious to me ...
You might be better of just scrolling rectangular tiles ... if you haven't done this type of thing already. Then you would have the experience and knowledge base to build on.
But don't let me stop you ... am sure you'd learn a lot from the exercise.
The essense of my suggestion ... is that you only need to update the screen edges ... the screen bitmaps will 'wrap round' on x and y axis.
If that doesn't make sense to you ... then please don't try and do that with those odd shape tiles !!!.
Good luck,
Jamie
_________________
Qwak - www.qwak.co.uk | Forum - www.qwak.co.uk/forum/
#13910 - Xax - Wed Dec 24, 2003 9:25 pm
Jamie,
Thanks for your response. I'm currently working my way through Harbour's GBA programming book, so I'm just experimenting with various ideas in my head for the time being. Perhaps after completing the book, I'll have a much better grasp on the whole thing, and have a better idea about which route to go.
I just have one more isometric-related question at the moment (and if I'm lucky, it'll make sense). For this example, I have 2 square tiles that are each divided into 2 triangles. Tile 1 has blue-colored pixels in one triangle (the lower-left triangle), while the other triangle is transparent. Tile 2 has red-colored pixels in one triangle (the upper-right triangle), while the other triangle is transparent. I want to lay these tiles on top of each other, so that it is displayed as one tile, with one triangle being blue, and the other being red. The displayed tile would look sort of like this:
Code: |
●● ●●●●●●●●●●●●●●
●●●● ●●●●●●●●●●●●
●●●●●● ●●●●●●●●●●
●●●●●●●● ●●●●●●●● < Red
●●●●●●●●●● ●●●●●●
●●●●●●●●●●●● ●●●●
●●●●●●●●●●●●●● ●●
^ Blue |
What's the best way to map and display these overlapping tiles? Would 2 background layers be best?
Matt
Last edited by Xax on Wed Dec 24, 2003 10:50 pm; edited 1 time in total
#13914 - Miked0801 - Wed Dec 24, 2003 10:10 pm
2 backgrounds is a good way. Another is to do the math/work and combine your edge chars in RAM then load them. Slower, but frees up a plane for other stuff. If you were to do the 45 degree rotate of the BG planes as suggested earlier, you'd be stuck with mode 2 - 2 8-bit 256 char BG planes - and that 256 char limit is a real pain.
Sprite are decent, but eat awaw at what you can do with your image.
Or you just draw the map at 45 degrees and tile it. Since 45 degrees is a slope of 1/2, the chars repeat very nicely and allows more VRAM for other fun stuff.
#13917 - doudou - Wed Dec 24, 2003 10:29 pm
I'm doiing an isometric project and what i do for the tile map is using the mode 0 with rectangular tiles (not like i have the choice ;-) ) and my tiles are drawn to give the isometric perspective. As some said before, you could use bitmaps mode with double-buffering, but then you would not use the hardware scrolling advantage of the GBA. I tried this a bit, but just to redraw the tiles every frame cost a lot too much of CPU to have a fluid game.
#13918 - Xax - Wed Dec 24, 2003 11:04 pm
Miked0801 wrote: |
2 backgrounds is a good way. Another is to do the math/work and combine your edge chars in RAM then load them. Slower, but frees up a plane for other stuff. If you were to do the 45 degree rotate of the BG planes as suggested earlier, you'd be stuck with mode 2 - 2 8-bit 256 char BG planes - and that 256 char limit is a real pain. |
Actually, what I was thinking of initially didn't involve rotating the map (although that's perhaps the only way I would've been able to do it). I was trying to figure out a way to lay out those oddly-shaped tiles linearly. At this point, I'm thinking I'll just vertically stretch those tiles a bit, so that they're all a nice 32x16. Your idea of combining edge chars in RAM is interesting, but I'm not yet sure how many different combinations of edges any given map will have, so that may not work out in my case.
Right now I'm thinking mode 0, because I expect that I'll need all 4 backgrounds. With my limited understanding of how everything works, I'm thinking 1 background for text (although I really don't have this figured out yet), 1 for sprites, and if I go with the 2-background tiling method, that makes 4. Do I have that figured out properly? Is it necessary/beneficial to have sprites on their own dedicated background?
EDIT: Ya know, the more I think about this, the more I'm thinking I could benefit from sprite rotation (actually, sprite flipping/mirroring), even if it means losing one of my backgrounds. Because the 128 sprite limit is really going to be a lot easier to deal with if I can flip sprites. Does a flipped sprite still count as 1 of the 128 sprites, or does it count as another sprite altogether? Does the GBA's hardware sprite-rotating ability even include sprite flipping? That's what I'm really after. If it just rotates sprites, I'm not going to have any use for that.
doudou wrote: |
As some said before, you could use bitmaps mode with double-buffering, but then you would not use the hardware scrolling advantage of the GBA. I tried this a bit, but just to redraw the tiles every frame cost a lot too much of CPU to have a fluid game. |
Yeah, this isn't going to be practical for me either; I think it'll be way too slow.
#13939 - cosmic4z - Thu Dec 25, 2003 10:48 am
doudou wrote: |
I'm doiing an isometric project and what i do for the tile map is using the mode 0 with rectangular tiles (not like i have the choice ;-) ) and my tiles are drawn to give the isometric perspective. As some said before, you could use bitmaps mode with double-buffering, but then you would not use the hardware scrolling advantage of the GBA. I tried this a bit, but just to redraw the tiles every frame cost a lot too much of CPU to have a fluid game. |
Was it not possible to just update the edge of the screen top/bottom and side? ... the have the display wrap round?
Maybe that's just not possible to do on GBA ... wrap round bitmap backgronuds?
_________________
Qwak - www.qwak.co.uk | Forum - www.qwak.co.uk/forum/
#13946 - sajiimori - Thu Dec 25, 2003 5:29 pm
If you're asking whether you can use scroll registers in modes 3-5 and have the gba wrap around when it hits the edge of the framebuffer, the answer is no.
#14049 - Maddox - Sun Dec 28, 2003 11:09 am
Jamie,
Take a seat, please.
_________________
You probably suck. I hope you're is not a game programmer.
#14056 - cosmic4z - Sun Dec 28, 2003 5:28 pm
Maddox wrote: |
Jamie,
Take a seat, please. |
Already have one, thank you kind sir !
_________________
Qwak - www.qwak.co.uk | Forum - www.qwak.co.uk/forum/
#14083 - sgeos - Mon Dec 29, 2003 8:47 am
I don't see any advantages to not having the N/S and E/W corners line up. I recommend buying a copy of Tactics Ogre Advance and looking at how they do things. It really is kind of neat.
IIRC, the game tiles, not to be confused with the characters the GBA uses to display them, are 16 pixels high by 32 pixels wide. Each "edge" takes up 8 pixel high by 16 pixel wide region.
Last, I'm happy to see that you fixed the size of your game tiles. As you have seen, that makes things much easier.
-Brendan