0
101 Oct 31, 2004 at 14:35

Hi.. Im making a small windos app with the lamm name: Cakedude,
the idee ist just to make a simpel Pacman game.. i never did Window games, zo i get the first problem.. :wacko:

All my code is in the same .cs, the name is Form1.
I have a Small PictureBox that can be controlt with te Up, Down, Left end Richt Keys.. :lol:

But now the problem.. Look, this my Form.

And dude (that thing) he is going left..

How i can make dude conineu his journey?.. How can i make hem Spam him to the Rightside of the Form?

#### 11 Replies

0
101 Oct 31, 2004 at 18:57

if(x < 0) x = X_MAX;

0
101 Nov 01, 2004 at 13:27

Im stupid.. :wacko:
The game is in C#..

Wat means X_Max?

0
102 Nov 01, 2004 at 13:38

Ahhhhh… the good old Visual Basic memories are comming back as i coded my first game: “Shoot the fishes”. Boy i loved that game!

0
101 Nov 01, 2004 at 14:05

X_MAX would be the width of your drawing area. So when dude’s x position went below zero, you’d set his position to X_MAX so that it looks like he ewnt around the world and popped out the other end.

0
101 Nov 01, 2004 at 14:14

mm. oke thnx.. next thing to do.. the Dots.. ( or cake :cool: ) ..

0
101 Nov 01, 2004 at 18:08

same thing in reverse as well, if the guy’s position is more than the maximum, you set it to zero.

0
101 Nov 03, 2004 at 13:54

Yes.. i know that now…. but Up and Down (Down und Up).. Don;t Work that way..

i have trying:

    if (this.PicDude.Location.Y >= 5)
{
this.PicDude.Location =   new System.Drawing.Point(this.PicDude.Location.X , this.PicDude.Location.Y + 5 );
}


.. Walking in the good way? or lost? :huh:

0
101 Nov 03, 2004 at 15:46

I’m not familiar with System.Drawing, but why do you refer to this.PicDude.Location.X ?

Does the system alllow you to do this.PicDude.Location.Y -= 5; ?

0
101 Nov 04, 2004 at 14:34

Nope.. -= isn’t good i think…

Ther was some dude tell me it can with: “This.Weigt” … i have try it.. but can get it workt.. any ideas?

0
101 Nov 11, 2004 at 10:58

@Gendramen

Yes.. i know that now…. but Up and Down (Down und Up).. Don;t Work that way..

i have trying:

    if (this.PicDude.Location.Y == 5)
{
this.PicDude.Location =   new System.Drawing.Point(5, this.PicDude.Location.X );
}


.. Walking in the good way? or lost? :huh:

[snapback]13621[/snapback]

Eh should it not be location.Y most systems work with X, Y . Might solve the problem dont copy code without checking it :closedeyes:

0
101 Nov 11, 2004 at 15:18