Must we tile everything ?
Blitz3D Forums/Blitz3D Beginners Area/Must we tile everything ?
| ||
Hi, I've got another newbie question for you :) I've seen a lot of 2d games programmed with Blitz. All the ones I could see the source code were using tiling. I think it's logical for Mariolikes or Shoot'em'up but which technique should I use to make a racing game ? I mean I would like a racing game like Skidmarks with scrolling. Let's say that each circuit will be 9x 800x600 screens. So, what's the best technique to use for this ? A only one image (2400x1800 pixel) ? Isn't it too big to load a such image ? I don't imagine tiling circuits because all tiles will be different (what's the interest of tiling in that case ?). It introduces another question, always about tiling. If I decide to create a 2d platform game but I want my graphics to be really great and never repetitive. I guess tiling isn't interesting in that case too, no ? Because, here again, all tiles would be different. Can anyone explain me what the best techniques are ? |
| ||
For the speed i didn't know.... For the platform game....keep in mind that all the Mario games made for the 16 bit console use tiling for the scrolling..... And games such Super Mario World and Yoshi's Island aren't repetitive in the graphics at all. |
| ||
for a racing game i would use a big bitmap engine, this is where you make your course as one big image and then split it up into tiles and use those that way the quality is vastly increased, i would then use an array to tell what kind of tile your stepping on, for a 2D platform tile is the way to go |
| ||
make your course as one big image and then split it up into tiles .... then use an array to tell what kind of tile your stepping on Brilliant! I've been stuck on a problem for a bit now which this little nugget will fix just fine. As usual, the most obvioous solution is the most elusive. Cheers, Matey! Have fun. |
| ||
I think it would be too memory and processor hungry to try and load/scroll 9 x (800*600*16/32) screens at once... :) |
| ||
Hmm, 2400x1800x4 = 16.4 Meg - probably too much... HOWEVER I guess you could store it as a 16 bit texture (if using Blitz3d) which would make it 8 Megs which is okay... The technique I would (and do) use for platform games is, rather than base it on tiles, base it on free objects which can be scaled, rotated and placed anywhere, overlapping each other etc. In this way you get the advantage of it not taking up such huge amounts of memory, plus it doesn't look tiled and repetitive at all. The disadvantage is it's a bit harder on the processor, and a lot harder on the programmer to get everything working properly! Or perhaps you could use a combination of tiles, for the basic geometry, with free objects on top for all the decorative elements. |
| ||
Thank you for your answers. So, if I understand well, it could be fine to take my 2400x1800 image and tile it in, let's say 100x100 tiles ? Ok, now, I should have about 430 tiles. So, what's the deal ? I have to tell B2d to show only tiles that are necesseray depending on the player placement ? So, I have to create a routine to load/unload tiles from memory depending on which are necessary ? That's it ? Did I understand ? :) |
| ||
Yes, that would be one good way to solve it - providing you can load and unload them fast enough, it means you could make your maps any size you like. That's pretty much how platypus did it - it was a very simple system - if it tried to draw a sprite that wasn't in memory, it loaded it in then and there. And if availvidmem() ever dropped below 2Mb, it would start deleting currently unused sprites from memory, one per frame. Pretty crude system sure, but it worked for my needs. And it meant that it made the most of however much vidRAM the user had - the more the better - although it would still run on 8MB of vidRAM, even if it had little jerks here and there. |