Le 23 janv. 07 à 22:57 Soir, [EMAIL PROTECTED] a écrit:
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'm glad ;-)
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".)
I took a look at it. It works correctly, but the background picture
is not drawn correctly (I see some kind of coordinates on all the
picture (on a black background) and only a little square shows the
land at the upper-left corner, even above the top of the sprite
surface control). It's the kind of malfunctions I had with the sprite
surface. Using Mac OS 10.4.8, RB 5.5.5.
But the performances are indeed fine!
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.)
So monsters are still sprites while walls are drawn within the
PaintTile event...
Also, join the realbasic-games list, where the discussion is all about
creating games with RB.
I thought I joined. I checked the radio button on the website but
didn't have any message from that list.
But, if you accept, I'd like to continue in this thread.
I'll look closer at your example. While that time, any comment welcome!
Thank you._______________________________________________
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>