PDA

View Full Version : Small Windows Game


Gendramen
10-31-2004, 07:35 AM
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.
http://129.125.101.130/Gendramen/img/stuff/form1..jpg
And dude (that thing) he is going left..
http://129.125.101.130/Gendramen/img/stuff/Uileg1.jpg

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

NomadRock
10-31-2004, 11:57 AM
if(x < 0) x = X_MAX;

Gendramen
11-01-2004, 06:27 AM
Im stupid.. :wacko:
The game is in C#..


Wat means X_Max?

Mihail121
11-01-2004, 06:38 AM
Ahhhhh... the good old Visual Basic memories are comming back as i coded my first game: "Shoot the fishes". Boy i loved that game!

bladder
11-01-2004, 07:05 AM
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.

Gendramen
11-01-2004, 07:14 AM
mm. oke thnx.. next thing to do.. the Dots.. ( or cake :cool: ) ..

NomadRock
11-01-2004, 11:08 AM
same thing in reverse as well, if the guy's position is more than the maximum, you set it to zero.

Gendramen
11-03-2004, 06:54 AM
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:

Ed Mack
11-03-2004, 08:46 AM
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; ?

Gendramen
11-04-2004, 07:34 AM
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?

ShadowHawk
11-11-2004, 03:58 AM
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:
13621


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

Gendramen
11-11-2004, 08:18 AM
Thanks for the Advice's
:blush:

Now i need some arry's doing the Cake stuff!...


Thanks for all the replys :lol: