How do I make a bitmap move?

Understanding the language, error messages, etc.

How do I make a bitmap move?

Postby Skyrunner65 » Fri Aug 15, 2014 9:48 pm

How could I make a bitmap move using player controls?
User avatar
Skyrunner65
 
Posts: 371
Joined: Thu Mar 20, 2014 5:37 pm
Location: NC,USA

Re: How do I make a bitmap move?

Postby rodot » Fri Aug 15, 2014 9:51 pm

You should take a look at the examples/gamebuino/basics/controls
For more advanced movement, look at the example "physics".
You can simply replace the drawRect functions by a drawBitmap.
User avatar
rodot
Site Admin
 
Posts: 1290
Joined: Mon Nov 19, 2012 11:54 pm
Location: France

Re: How do I make a bitmap move?

Postby MexxNapster » Wed Oct 29, 2014 9:54 pm

What i have to change in the example Player.
To replace the 4x8 pixel player to a Bitmap pls explain for dummies :(
User avatar
MexxNapster
 
Posts: 20
Joined: Thu May 08, 2014 5:05 pm
Location: Germany

Re: How do I make a bitmap move?

Postby DFX2KX » Thu Oct 30, 2014 4:09 am

MexxNapster wrote:What i have to change in the example Player.
To replace the 4x8 pixel player to a Bitmap pls explain for dummies :(

The basic layman's synopsis is this.

The bitmap will draw at whatever x and y positions you give it. If you want a bitmap of a ball to move, then you'll have an x and y variable and draw the bitmap to that. How you determine the x and y is totally up to you (if you want to get an idea of motion, at least in lines, look down at the post I made earlier asking how to do this for pixels. it applies for bitmaps as well, to an extent)

As Myndale recommended to me, look up "Equations of motion" on Google, and it'll give you the formulas you need.

A more complicated approach is to move things relative to a camera position, this is done for tiled levels, and is more complicated.
DFX2KX
 
Posts: 250
Joined: Mon Apr 14, 2014 3:48 am

Re: How do I make a bitmap move?

Postby MexxNapster » Sun Nov 02, 2014 11:21 am

I got it but my coding skills are still bad

User avatar
MexxNapster
 
Posts: 20
Joined: Thu May 08, 2014 5:05 pm
Location: Germany


Return to Programming Questions

Who is online

Users browsing this forum: No registered users and 77 guests