1. Object

------=_NextPart_000_001F_01BFDD76.4467DC80
        charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

This is someting that is keeping me from becomeing a game programer . =
How do I
move a object around on the screen ? It feels like my hart is giving in =
! You do not know how it pains !!! Did you ever jump off a 10000000 =
meter bulding and you fall on your ass ? That is how it feels ! So =
please ,please help me ! =20

------=_NextPart_000_001F_01BFDD76.4467DC80
        charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2614.3500" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>This is someting that is keeping me =
from becomeing=20
a game programer . How do I</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>move a object around on the screen ? It =
feels like=20
my hart is giving in ! You do not know how it pains !!!&nbsp;Did you =
ever jump=20
off a 10000000 meter bulding and you fal</FONT><FONT face=3DArial =
size=3D2>l on your=20
ass ? That is how it feels ! So please ,please help me=20

------=_NextPart_000_001F_01BFDD76.4467DC80--

new topic     » topic index » view message » categorize

2. Re: Object

>This is someting that is keeping me from becomeing a game programer .
>How do I move a object around on the screen ?

Yes, I think that would keep most people from being a game
programmer.

> Did you ever jump off a 10000000 meter bulding and you fall on
>your ass ?

Twice.

> So please ,please help me !

Sure. Go to RDS's home site and download all the graphics
programs that have source code.  Print them out.  Then enter
them into your computer by hand.

new topic     » goto parent     » topic index » view message » categorize

3. Re: Object

On Fri, 23 Jun 2000, you wrote:
>
> This is someting that is keeping me from becomeing a game programer . How do I
> move a object around on the screen ? It feels like my hart is giving in ! You
> do not know how it pains !!! Did you ever jump off a 10000000 meter bulding and
> you fall on your ass ? That is how it feels ! So please ,please help me !
>

Set up some coordinates for the object {x,y}
Display the object at {x,y}
to move right, add 1 to x ,  subtract 1 from x to move left, add 1 to y to move
down......   then display the object at the new {x,y}.
Repeat as needed.

The problem with this is that each previously displayed object will be left
behind on the screeen. So you have to work out a way to remove the object from
its previous location before displaying it in the new location.

One way to do this is to save the screen area - call it the "background" where
the object is going to be displayed before you display the object. Then when
you are ready to move the object, the first thing you do is to replace the
saved background, which effectively "erases" the object.

I'd set up each sprite something like this:

constant COORDS = 1, BKGND = 2, IMAGE = 3
object sprite
 sprite = {{1,1}, {}, {} } -- object contains its own coords, space to store
the old background, and space to store the sprite image.

You've got a lot of reading to do. Believe it or not, the documentation that
comes with Euphoria contains everything you need to know to make this work.

Regards,
Irv

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu