Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / First Game Beginner

Author
Message
Cameron
19
Years of Service
User Offline
Joined: 7th Aug 2005
Location: In Your Closet...
Posted: 8th Aug 2005 02:33
I want to know becuase i can gonna start my first game pong
with no images watsoever just make object box and stuff and i need to know how to do some of the movement i have this so far. i just cant get movement to work i tried like if upkey() = 1 then move object but wont move Help!!!

Copyright (c) 2005 Cameron
Crazy Programmer
AGK Developer
20
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Lost in AGK
Posted: 8th Aug 2005 05:23
use


Cameron
19
Years of Service
User Offline
Joined: 7th Aug 2005
Location: In Your Closet...
Posted: 8th Aug 2005 05:29
Well now i got it so it stop on the screen for the second paddle
but for the first paddle when it goes up it stop good but when goes down it wont stop keeeps goin y?

Rem Pong by cameron hudson
Sync on

rem objects
Make object box 1,1,1,3
Make Object box 2,1,1,3
make object sphere 3,1

rem camera stuff
Do
Position Object 1,-5,0, Playerpos#
position Camera 0,-10,10
point Camera 0,0,0
position Object 2,5,0, Player2pos#
position camera 0,10,-10
point camera 0,0,0

Rem Player 1 Movement

if upkey()=1 and playerpos# < 5 then playerpos#=playerpos#+1
if downkey()= 1 and player#pos > -5 then playerpos#=playerpos#-1

Rem Player 2 Movement

if Keystate(17)=1 and Player2pos# < 5 then Player2pos#=Player2pos#+1
if Keystate(31)=1 and Player2pos# > -5 then Player2pos#=Player2pos#-1

Sync
Loop

Copyright (c) 2005 Cameron
Heckno
20
Years of Service
User Offline
Joined: 8th Sep 2004
Location: Palm Coast, FL
Posted: 8th Aug 2005 05:40
did you add a value to the movement, ie rate of speed?

if upkey()=1 then move object 1,2
Cameron
19
Years of Service
User Offline
Joined: 7th Aug 2005
Location: In Your Closet...
Posted: 8th Aug 2005 12:28
yes

Copyright (c) 2005 Cameron
Cameron
19
Years of Service
User Offline
Joined: 7th Aug 2005
Location: In Your Closet...
Posted: 8th Aug 2005 13:02
Yes i added it everything is fine except for player 1 collioson with offscreen.

Cameron
19
Years of Service
User Offline
Joined: 7th Aug 2005
Location: In Your Closet...
Posted: 9th Aug 2005 05:16
Ok thanks everything works my pong game is good . any ideas wat i should do for my 2 game?

Login to post a reply

Server time is: 2024-11-27 21:37:49
Your offset time is: 2024-11-27 21:37:49