
-----------------------------------
Learn it
Mon Jun 20, 2005 12:16 am

problem with soccer game
-----------------------------------
i have a proble with making a soccer game, can some body help me? 
thank u in advance...heres what i have so far
var y : int
var a : int
var b : int
var y2, y1 : int
var chars : array char of boolean
var rx : real
var ry : real
var move : int
var playq : int
var p1, p2 : int
var s : int % Score
var C : int 
var x2 : int :=1
var val:int
var num:int

x2:=200
y:=200
a:= +1
b:= -1
y1:=230
y2:=230
x2:=390
move:=1
playq:=1
p1:=0
p2:=0
s:=4
C:=2
num:=1
%players
loop
%playq

%=================================================== 
val:=PC.ParallelGet(1)
drawfillbox (0, y2,30, y2 - 60, brightred)
delay(5)
drawfillbox (0, y2, 30, y2 - 60, white)
if(val div 32) mod 2=0 and move=1 then 
y2 := y2 + 1
x2:=x2+1
elsif (val div 16) mod 2=0 and move=1 then
y2 := y2 - 1


end if
if (y2 = 395) then
y2 := y2 - 1
end if
%===================

if(val div 64) mod 2=0 and move=1 then
x2 := x2 + 1
elsif (val div 32) mod 2=0 and move=1 then
x2 := x2 - 1
end if
if (x2 = 395) then
x2 := x2 - 1
end if
%========================================
if playq = 1 then
Input.KeyDown (chars)
if chars (KEY_UP_ARROW) and move = 1 then
y1 := y1 + 1
elsif chars (KEY_DOWN_ARROW) and move = 1 then
y1 := y1 - 1 
end if
if (y1 = 395) then
y1 := y1 - 1
end if
drawfillbox (822, y1, 600, y1 - 60, blue) 
delay(5)
drawfillbox (822, y1, 600, y1 - 60, white)
end if

%============================================================ 


end loop


-----------------------------------
chocho tete
Mon Jun 20, 2005 9:04 am


-----------------------------------
THATS NOT SOCCER THATS PONG!!!

-----------------------------------
ssr
Mon Jun 20, 2005 4:16 pm


-----------------------------------
whats ur problem? what kind of game do u want t o make? 
be more specific  :D

-----------------------------------
Learn it
Wed Jun 22, 2005 1:24 pm


-----------------------------------
ok if this can help u i added more things on it but i cant still make the 2 players move through the field...to make them move i want to use the arrows on the keybord

UP arrow moves plyer1 up down arrow moves plyer1 down and left arrow , right arrow


for the second player i want to use bradbord(switch) but i dont know how to make it 

heres how i want to use it tho
            
The switch to go up is pin 13

            The switch to go down is pin 12

            The switch to go right is pin 11 

            The switch to go left is pin 10

             The switch to shoot pin 15



             

thank u  :D 

-----------------------------------
vagyb
Wed Jun 22, 2005 5:17 pm


-----------------------------------
well i'm not expert or anything in turing but i'm guessing it would be easier if u imported the paddles from a picture file, this way the movements will be easier. 
here is an example
var chars : array char of boolean
   Input.KeyDown (chars)
        if chars (KEY_UP_ARROW) then    
            shipY += 8
        elsif chars (KEY_DOWN_ARROW) then
            shipY -= 8
        end if

-----------------------------------
jamonathin
Thu Jun 23, 2005 10:13 pm


-----------------------------------
well i'm not expert or anything in turing but i'm guessing it would be easier if u imported the paddles from a picture file, this way the movements will be easier. 
here is an example
var chars : array char of boolean
   Input.KeyDown (chars)
        if chars (KEY_UP_ARROW) then    
            shipY += 8
        elsif chars (KEY_DOWN_ARROW) then
            shipY -= 8
        end if
In which way would it make it easier?  Yes it would make the program look better, and it would be cool if he did that, considering hes going through the trouble of using a joystick, but easier . . .  :?
