Basic4ppc - Windows Mobile Development  

Go Back   Basic4ppc - Windows Mobile Development > Main Category > Questions & Help Needed
Home Register FAQ Members List Search Today's Posts Mark Forums Read

Questions & Help Needed Post any question regarding Basic4ppc.


Game Graphics w/ Scrolling Background


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-21-2008, 03:51 PM
willisgt's Avatar
Senior Member
 
Join Date: Aug 2007
Location: Nacogdoches, Texas USA
Posts: 157
Default Game Graphics w/ Scrolling Background

I've just started playing with building a game app. I need to include a scrolling background - think vintage arcade games like Defender or Lunar Lander.

I also need to draw game graphics in the foreground.

So far, the scrolling background works great. The foreground graphics also work great. The problem is that my background is an image control; if it's visible, then the foreground graphics are hidden.

So I'm guessing that an image control lays over the form, and whatever's on the form gets hidden by the image, whether I draw of the form's ForeLayer or not. True?

My apologies for regressing back to 'beginner' status on this one - I haven't yet had much opportunity to explore the graphic functions.


Gary
__________________
PC: Windows XP Pro SP3 / Basic4PPC v6.5
PPC: HTC 8925 (AT&T Tilt) / Windows Mobile 6
Reply With Quote
  #2 (permalink)  
Old 03-28-2008, 12:15 PM
Junior Member
 
Join Date: Jul 2007
Location: Hong Kong
Posts: 42
Send a message via MSN to hung Send a message via Yahoo to hung Send a message via Skype™ to hung
Default

why not use drawer from imagelib to draw the background then drawer to draw your object in front.

e.g.
' background
drawer_draw2("bmpbg", mapwin.x, mapwin.y, mapwin.w, mapwin.h, 0,0, false)
' then object1
drawer_draw2("bmp1", 0,0,bmp1.Width,bmp1.Height, ptc.x,ptc.y, true)
__________________
Yours,

Dopod D810 WM6 GPS HSDPA 3G Wifi Bluetooth
Reply With Quote
  #3 (permalink)  
Old 03-28-2008, 12:30 PM
alfcen's Avatar
Basic4ppc Veteran
 
Join Date: Apr 2007
Location: Okinawa, Ryukyu
Posts: 424
Awards Showcase
Beta Tester 
Total Awards: 1
Default

Hi Gary
In addition, make sure not to miss out the sprite.dll library.
Reply With Quote
  #4 (permalink)  
Old 03-28-2008, 02:14 PM
willisgt's Avatar
Senior Member
 
Join Date: Aug 2007
Location: Nacogdoches, Texas USA
Posts: 157
Default

Thanks, gentlemen - I've actually made some progress on this. See this link: Please help test this program

I am actually using an approach similar to what was suggested; the Sprite library, while extremely cool, will not work for this application.

Gary
__________________
PC: Windows XP Pro SP3 / Basic4PPC v6.5
PPC: HTC 8925 (AT&T Tilt) / Windows Mobile 6
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 On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Scrolling Tape Calculator erzee Share Your Creations 0 07-22-2008 12:10 PM
Scrolling TextBox with HardwareKeys Elrick Questions & Help Needed 8 04-17-2008 05:46 PM
A graphics program (first step) forisco Code Samples & Tips 1 12-23-2007 06:11 AM
Animating a piece of graphics? AcerN30 Questions & Help Needed 5 12-19-2007 05:52 AM
Graphics Library Nachtfalke Questions & Help Needed 1 05-11-2007 01:50 PM


All times are GMT. The time now is 02:07 AM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0