
-----------------------------------
yumrum
Fri Dec 18, 2009 4:22 pm

Soccer Game
-----------------------------------
-Soccer Game
- controls are arrow keys and a/w/s/d
to switch it's 1/2/3/4 and 7/8/9/0

have fun

and critizime is wanted

-----------------------------------
Tony
Fri Dec 18, 2009 5:10 pm

RE:Soccer Game
-----------------------------------
I love the driver loop at the very end of the code, well done :)

Now then...
Input.KeyDown reads in a single frame.

[code]
if playerwho = 1 then
	Input.KeyDown (chars) % Value for key
	if chars (KEY_UP_ARROW) then
	    y (1) := y (1) + 5
	end if
	if chars (KEY_RIGHT_ARROW) then
	    x (1) := x (1) + 5
	end if
	if chars (KEY_LEFT_ARROW) then
	    x (1) := x (1) - 5
	end if
	if chars (KEY_DOWN_ARROW) then
	    y (1) := y (1) - 5
	end if

	% Goalie
    elsif playerwho = 2 then
	if chars (KEY_UP_ARROW) then
	    y (2) := y (2) + 5
[/code]
You are duplicating the same chunk of code 9 times.
[code]
if chars (KEY_UP_ARROW) then
	    y (playerwho) := y (playerwho) + 5
...
[/code]
Also, +5 (and -5) are a magic constant. Should make it a constant instead, so that one could actually adjust the velocity of the players in the code.

Having 8 identical "Collided" functions repeats a lot of code. Just take an argument for which players to check.

"procedure sides" is also full of repetition.

[code]
if score1 = 0 then
	Draw.Text ("0", 50, 600, font4, black)
[/code]
or
[code]
Draw.Text(intstr(score1), 50, 600, font4, black)
[/code]

[code]
cls
	Draw.Text ("5", 240, 200, font4, black)
	View.Update
	delay (1000)
	cls
	Draw.Text ("4", 240, 200, font4, black)
	View.Update
	delay (1000)
	cls
...
[/code]
For-loops?
[code]
% player starting positions
	x (1) := 560
	y (1) := 300
[/code]
I think I saw a procedure to reset the positions... is that not used?

[code]
    if x (9) < 10 and y (9) < 360 and y (9) > 240 then
	cls
	% Setting Screen size
	setscreen ("graphics:500;400,offscreenonly")
	put " PLAYER TWO GOAL GOAL GOAL"
	score2 := score2 + 1

	%Counting down
	Draw.Text ("Ready", 240, 200, font4, black)
...
[/code]
You are repeating this huge chunk of code (count down, reset, etc.), twice, for each player scoring a goal, even though the code is completely identical.

-----------------------------------
yumrum
Fri Dec 18, 2009 10:05 pm

Re: Soccer Game
-----------------------------------
Thanks for all the critizime and help and tips
they help LOADS i was able to cut the amout of code i used in half now.
Gonna add some new features and stuff before i post the new version tho

-----------------------------------
mirhagk
Sat Dec 19, 2009 10:54 am

RE:Soccer Game
-----------------------------------
Also maybe you should add a button to kick the ball, just a suggestion

-----------------------------------
yumrum
Sat Dec 19, 2009 5:31 pm

Re: Soccer Game
-----------------------------------
Ya i'm working on adding a pass button and a shoot button
as well as a goalie drop kick.
as well i'm going to add a start menu with team choice/ time limit and handicap setting for speed
Also have to fix the problem of running threw the goalie but i can't seem to get that working Any suggestions?

-----------------------------------
yumrum
Sat Dec 19, 2009 9:04 pm

Re: Soccer Game
-----------------------------------
Here's The Updated Version 2.0

 The Changes
-added speed handicap adjust in program
-added a Time limit adjust in program
-added a start up
-added a pass button and shot Button
-Code cut in about Half
 
Still to Come 
-Fix the go through players problem- Not sure how to solve- suggestions are needed, I've tried a bunch
-Change Colours/team option in start up (these will be like world cup teams-Brazil, Italy, but also Canada)
-Start up switched to buttons on one screen instead of multiple screens with typed entries
-1 player game/ with computer controlled players
-shootout mode at the end if a tie
-and anything else people want (suggestions)

Controls  are
-to move arrow keys and a/w/s/d
-player 1 pass (,) up and (.) down and (/)  to kick
-player 2 pass (q) up and (e) down and (r) to kick

-----------------------------------
yumrum
Sun Dec 20, 2009 9:10 pm

Re: Soccer Game
-----------------------------------
So here's Soccer 3.0
some stuff to come same as before

-----------------------------------
Turing_Gamer
Wed Dec 23, 2009 8:52 pm

Re: Soccer Game
-----------------------------------
A little rough but other wise a good game

Maybe for extra features you can have advanced controls like hold 'j' to dribble the ball and 'g' to steal

Otherwise, not bad.

-----------------------------------
yumrum
Wed Dec 23, 2009 11:07 pm

RE:Soccer Game
-----------------------------------
Alright i'll think of those things
-I just finishing touching up v4.0 which completely changes it

- it's got a new startup thats more user friendly
-choice of 6 different countries (teams)
-fixed the running throught problem
-players following the controled player around
-goalie can kick it forward a lot farthe

so ya v4 is gonna be sick

also u do know that dribble is just pushing the ball?
and stealling would be pushing it off the other person and then above?

-----------------------------------
i'm not sure
Thu Dec 24, 2009 11:16 am

Re: Soccer Game
-----------------------------------
I like it espectially the way that you carry the ball i think it's really unique. The one thing you really need though is a way to switch you player and a way of identifying which one's are being controlled by humans, otherwise good game.

-----------------------------------
yumrum
Thu Dec 24, 2009 12:36 pm

RE:Soccer Game
-----------------------------------
you can switch your player it's... say ur player 1 then it,s 7/8/9/0 for each player corrisponding with the number for each player and it's 1,2,3,4 for player 2 corrisponding with each number

-----------------------------------
yumrum
Thu Dec 24, 2009 12:45 pm

Soccer Game
-----------------------------------
Here is 
Soccer v4.0 
New
-New Startup with buttons
-goalie dropkick (just normal kick but with goalie it goes alot farther)
-choice of 6 teams instead of 2 default
-controls in game
-couple of pics to spice it up
-people follow controlled player
-fixed runthrough problem

check the ReadMe file for more in depth info

This one has some major changes

-----------------------------------
i'm not sure
Thu Dec 24, 2009 3:16 pm

RE:Soccer Game
-----------------------------------
Sorry about that, didn't know those controls but it makes it a very good game!

-----------------------------------
yumrum
Thu Dec 24, 2009 3:30 pm

RE:Soccer Game
-----------------------------------
ya i didn't have any control listed bu in v4 we do i listed
