realbasic-games
[Top] [All Lists]

Re: Spritesurface's Paint Tile method not working as

To: realbasic-games at lists dot realsoftware dot com
Subject: Re: Spritesurface's Paint Tile method not working as
From: Jose Lopez <pepelosoft at pepelosoftware dot com>
Date: Mon, 13 Dec 2004 16:21:53 -0500
Delivered-to: realbasic-games at lists dot realsoftware dot com
References: <20041213180024 dot 113535CC549 at lists dot realsoftware dot com>

Hmm.  Are you trying to call PaintTile manually or some such?

No. I just send the spritesurface the scroll command (which is located inside an if-then branch). This again is located inside the A.I. subroutine inside the spriteobject, which in turn is a subclass of a spritewrapper.


My project is a bit more complicated than the examples, since I have
the spritesurface, which is the main playing area, and a canvas
which displays a small overhead map of the whole game area, which is
much larger than the spritesurface can show.

Where is this canvas?  You don't have these controls overlapping, do
you?  That would be very bad mojo.  Assuming the canvas is not
touching the SpriteSurface, I can't imagine that would be involved.

The canvas and spritesurface don't overlap, but they are separated by a mere 8 pixels, which is much less than a tile width. I also have a bunch of statictext-fields (not touching the spritesurface or canvas) displaying a number of infos and variables pertaining to the sprites and their activities within the spritesurface. They all get updated within the different sprites' own behavior-controlling methods, although the actual redrawing of them occurs I suppose in between the update calls to the spritesurface in the timer.


Why don't you take a step back, and try making a simple example that
simply scrolls a SpriteSurface at a constant rate, keeping a single
sprite centered on the screen.  In the PaintTile event, just paint
the tile row/column or something like that.  If that works for you,
then you can start picking apart the difference between that and your
real game.

Best,
- Joe


Yes, I will try something like that. But I feel more inclined to beef up the working code examples to something similar in function to my project.

Thanks,
Jose

_______________________________________________
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>

<Prev in Thread] Current Thread [Next in Thread>