On Jan 23, 2007, at 21:43 UTC, Arnaud Nicolet wrote: > I always wondered if it's possible, with RB, to create a game such as > Super Mario Bros (the original one).
Sure. > I tried with the SpriteSurface but it's amazingly slow (I have to add > sprites around the squares in order to get correct collisions). No you don't, and no it's not, if you use it properly. :) I demonstrated a simple platform game years ago, and the performance was just fine; computers have gotten substantially faster since then. Of course, screens have gotten a lot bigger too... Let's see, it's still available, though the code is years old now and may need some updating: <http://www.strout.net/info/coding/rb/> (Scroll down to "Platform Demo".) You're correct that you don't want to add a sprite for every map tile. Instead, you should draw the tiles yourself in the PaintTile event, and compute collisions with them using math, not the SpriteSurface. (You'd still use the SpriteSurface to detect collisions with monsters, fireballs, etc.) Also, join the realbasic-games list, where the discussion is all about creating games with RB. > What is the recommended way, if available? Well, SpriteSurface can do the job, but these days, I'd probably use an Rb3DSpace instead. This is what I did in Armageddon, which is a very different sort of game (Missile Command clone), but still demonstrates the technique of making a 2D game with hardware-accelerated graphics via the RB3dSpace control. Best, - Joe -- Joe Strout -- [EMAIL PROTECTED] Verified Express, LLC "Making the Internet a Better Place" http://www.verex.com/ _______________________________________________ Unsubscribe or switch delivery mode: <http://www.realsoftware.com/support/listmanager/> Search the archives of this list here: <http://support.realsoftware.com/listarchives/lists.html>
