realbasic-games
[Top] [All Lists]

Re: Sprite Surface Question

To: REALbasic Games <realbasic-games at lists dot realsoftware dot com>
Subject: Re: Sprite Surface Question
From: Mark Barnett <albadar at verizon dot net>
Date: Mon, 22 Jan 2007 22:40:48 -0500
Delivered-to: listarchive at realsoftware dot com
Delivered-to: realbasic-games at lists dot realsoftware dot com
References: <20070122205001 dot DE2766D9445 at mail dot verex dot com>
So you recommend this:
Tiles not background picture
Tile paint instead of sprites
Highlighting/Dehighlighting using the PaintTile Event of the spritesurface
    (and even if this is done to multiple adjoining tiles)

Yes?
Mark

On Jan 22, 2007, at 3:50 PM, joe at strout dot net wrote:

On Jan 22, 2007, at 19:35 UTC, Mark Barnett wrote:

What is a smarter approach to have the map applied to the
SpriteSurface, as a map or as spritewrappers for each of the 80+ x
80+  map.

I'd just draw the map parts in the PaintTile event, or if you prefer,
compose it all into a big picture and set that as the background.

I would like to animate these surfaces, is that recommended
or  not?

Well, certainly not on every frame, since that would require redrawing
the entire screen on every frame.  If you're going to do that, the
SpriteSurface isn't gaining you anything, and you might as well draw it
yourself in a Canvas.  But you won't get a very high framerate that
way.  (To get a high framerate for a display like that would require
hardware acceleration, e.g. using a RB3DSpace instead of a
SpriteSurface.)

But if you are only animating some of the map tiles, or only changing
their images every now and then, then this would be fine.

And if it is a map background, how would I be able to tell
the  player "This is your land" or "This is NOT you land" by
highlighting  groups of these pieces?

Well, you'd call PaintTile with the coordinates of the background tiles
that need to be refreshed, and then in your PaintTile event, draw them
with the highlighting.

HTH,
- Joe

--
Joe Strout -- joe at strout dot net
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>


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


From  Tue 23 Jan 2007 08:20:39 -0700
Return-Path: <realbasic-games-bounces at lists dot realsoftware dot com>
X-Original-To: listarchive at realsoftware dot com
Delivered-To: listarchive at realsoftware dot com
Received: by xmail.realsoftware.com (Postfix, from userid 1037)
        id 2371117DF25F; Tue, 23 Jan 2007 07:20:57 -0800 (PST)
X-Spam-Checker-Version: SpamAssassin 3.1.1 (2006-03-10) on www.realsoftware.com X-Spam-Level: X-Spam-Status: No, score=-1.7 required=4.5 tests=AWL,BAYES_00,NO_REAL_NAME autolearn=no version=3.1.1
Received: from lists.realsoftware.com (lists.realsoftware.com [209.198.132.125])
        by xmail.realsoftware.com (Postfix) with ESMTP id F3B0617DF258;
        Tue, 23 Jan 2007 07:20:49 -0800 (PST)
Received: from lists.realsoftware.com (localhost [127.0.0.1])
        by lists.realsoftware.com (Postfix) with ESMTP
        id D2B12185CAF8; Tue, 23 Jan 2007 09:20:43 -0600 (CST)
X-Original-To: realbasic-games at lists dot realsoftware dot com
Delivered-To: realbasic-games at lists dot realsoftware dot com
Received: from mail.verex.com (mail.verex.com [66.116.103.197])
        by lists.realsoftware.com (Postfix) with ESMTP id C7CDE185CAE5
        for <realbasic-games at lists dot realsoftware dot com>;
        Tue, 23 Jan 2007 09:20:39 -0600 (CST)
Received: from [66.116.103.197] (localhost [127.0.0.1])
        by mail.verex.com (Postfix) with SMTP id 861AE6DA7B1
        for <realbasic-games at lists dot realsoftware dot com>;
        Tue, 23 Jan 2007 08:20:39 -0700 (MST)
Date: Tue, 23 Jan 2007 08:20:39 -0700
From: joe at strout dot net
To: realbasic-games at lists dot realsoftware dot com
In-Reply-To: <c4b616ba23654d7bb114aed59bdbcd8c at verizon dot net>
X-Mailer: VerEx Email Gateway
Content-type: text/plain;
Content-transfer-encoding: 7bit
Message-Id: <20070123152039 dot 861AE6DA7B1 at mail dot verex dot com>
Subject: Re: Sprite Surface Question
X-BeenThere: realbasic-games at lists dot realsoftware dot com
X-Mailman-Version: 2.1.2
Precedence: list
Reply-To: REALbasic Games <realbasic-games at lists dot realsoftware dot com>
Sender: realbasic-games-bounces at lists dot realsoftware dot com
Errors-To: realbasic-games-bounces at lists dot realsoftware dot com

On Jan 23, 2007, at 03:40 UTC, Mark Barnett wrote:

So you recommend this:
Tiles not background picture
Tile paint instead of sprites
Highlighting/Dehighlighting using the PaintTile Event of the spritesurface
     (and even if this is done to multiple adjoining tiles)

Yes?

Yes.

Best,
- Joe

--
Joe Strout -- joe at strout dot net
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>


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