I am making a game using the sprite surface. I want the map of this
game to be randomly generated (I have this part done) and then applied
to the sprite surface. I have the map created in memory as a list of
locations with x, y coordinates.
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 would like to animate these surfaces, is that recommended or
not? 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? I am looking for speed/performance for this
project.
Mark
_______________________________________________
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 Mon 22 Jan 2007 13:50:01 -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 2923B17C3FFF; Mon, 22 Jan 2007 12:50:19 -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 8031017C3FF8;
Mon, 22 Jan 2007 12:50:13 -0800 (PST)
Received: from lists.realsoftware.com (localhost [127.0.0.1])
by lists.realsoftware.com (Postfix) with ESMTP
id 8518A1847B0E; Mon, 22 Jan 2007 14:50:05 -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 6DA901847B01
for <realbasic-games at lists dot realsoftware dot com>;
Mon, 22 Jan 2007 14:50:02 -0600 (CST)
Received: from [66.116.103.197] (localhost [127.0.0.1])
by mail.verex.com (Postfix) with SMTP id DE2766D9445
for <realbasic-games at lists dot realsoftware dot com>;
Mon, 22 Jan 2007 13:50:01 -0700 (MST)
Date: Mon, 22 Jan 2007 13:50:01 -0700
From: joe at strout dot net
To: realbasic-games at lists dot realsoftware dot com
In-Reply-To: <05c5750fd1aaaec1ff1e81ec6c6cf5aa at verizon dot net>
X-Mailer: VerEx Email Gateway
Content-type: text/plain;
Content-transfer-encoding: 7bit
Message-Id: <20070122205001 dot DE2766D9445 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 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>
|