Download the free trial version
Basic4android Video
Features
Tutorials and manuals
Showcase
Screenshots

Go Back   Android Development Forum - Basic4android > Basic4ppc (Windows Mobile) > Questions (Windows Mobile)
Documentation Wiki Register Members List B4P Search Today's Posts Mark Forums Read

Questions (Windows Mobile) Post any question regarding Basic4ppc.

Manage many sprites

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-29-2008, 09:23 PM
Newbie
 
Join Date: Jun 2008
Posts: 5
Default Manage many sprites

Hi,

I'm doing an aplication where I have to manage many objects at the same time, some of them are static and some are moving, right now i'm just using one sprite for each object in the screen, of course the performance is very poor. I could implemet a function to set the statics objects as part of the background, but fist at all I'd like to know if there is an optimized way to do it. I hope somebody could help me and provide me with an example.

Thank you and regards
Reply With Quote
  #2 (permalink)  
Old 07-30-2008, 05:58 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 15,733
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

You should not add "static" sprites. Each sprite is redrawn (and checked for collision events) every tick.
Reply With Quote
  #3 (permalink)  
Old 07-30-2008, 06:47 PM
Newbie
 
Join Date: Jun 2008
Posts: 5
Default

Thanks Erel, I supose that i have to paint the "static" objects as part of the background, right?. How could i do it?

Thanks again
Reply With Quote
  #4 (permalink)  
Old 07-31-2008, 09:29 AM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 15,733
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

You can use the ImageLib library to draw on a Bitmap object.
Afterward draw the bitmap with GameWindow.DrawBackgroundImage2.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
drag sprites cpc6128 Questions (Windows Mobile) 5 03-02-2009 02:39 AM
Help with Sprites and Transparency Drewpeu Questions (Windows Mobile) 1 09-24-2008 06:29 PM


All times are GMT. The time now is 10:10 AM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0