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 / soccer someone?

Author
Message
tHeRage
19
Years of Service
User Offline
Joined: 9th Jun 2005
Location:
Posted: 10th Jun 2005 02:57
Hi,

I'm searching for some help in a soccer game, or at least how to start with one soccer-player kicking a penalty to a goalkeper. I'm a pretty good at the modeler and animation work, but new in the script area.

Thanks in advance.

Al
RUCCUS
19
Years of Service
User Offline
Joined: 11th Dec 2004
Location: Canada
Posted: 10th Jun 2005 08:07 Edited at: 10th Jun 2005 08:10
Basicially Im posting to see if my signature worked...but I guess Ill help ya' out too. Here's just a breakdown of what you'll need to accomplish:

- Character Movement (Probably just from right to left)
- Kicking the ball with another button, let's say spacekey for now)
- Holding the spacekey in to determine the power applied to the ball
- Coming up with a calculation for the movement of the ball depending on the power you kick with, where you hit the ball, what "style of kicking" you're using, where you're aiming, and possibly even the wind direction and power
- A pretty basic A.I system that makes the computer player look for where the ball is going, and attempt to collide with the ball by moving right or left and jumping. You'd also need to incorperate difficulty, somehow make the A.I a bit stupid so they don't block the ball every time, and probably give the A.I some stats to determine how well they'll perform.
- Create some dandy background stuff like a crowd cheering. Add in some cheering sounds of course!
- A scoring system, probably a hi-scoring system aswell to keep track of your best scores.
- Multiplayer maybe? If so then maybe one person in net, one person kicking, switch turns, person with most amount of goals wins.
- Maybe some sort of campaign mode to give the user a sense of a goal to achieve, like winning the championship...for...penalty kicks...
- The list goes on

So, if you're new to programming, even if it's just with DarkBasic PRO, modeling will get you no where. It's more fun to play with a box shooting spheres at people then to just stand there watching yourself dance around...IMO anyways. Thus, if this is your first game...I dont want to discourage you but I'd recommend going with something simpler. UNLESS ofcourse if your just making this for fun and not for the commercial world, not worying about the physics and stats and online play and whatnot and just doing it to see how well toned your skills are, then go for it! Maybe Ill make a snippet later on...

Looks to see if his sig worked
<EDIT> Nope

soapyfish
20
Years of Service
User Offline
Joined: 24th Oct 2003
Location: Yorkshire, England
Posted: 10th Jun 2005 08:40
If your new to programming you could have a got at it. You just need to think of a simple way to do it. How about a really simple text game.

You tell the player to press 1 to shoot right or 2 to shoot left.
You then just use the rnd command to say wheather or not the player scored. e.g. (not perfect and no player choice


Okay it's simple but you could improve on it overtime. Maybe have different skills of player. A bad player might get 3 shots but the chance of scoring would be less (just mess about with the random value) and a high skill player would get one shot but with more chance of scoring. Hope I helped.

Formely play2kill

When the power of love overcomes the love of the power... the world will know peace. - Jimi Hendrix
RUCCUS
19
Years of Service
User Offline
Joined: 11th Dec 2004
Location: Canada
Posted: 10th Jun 2005 09:30
Heh, so basically a dice roller

tHeRage
19
Years of Service
User Offline
Joined: 9th Jun 2005
Location:
Posted: 10th Jun 2005 23:30
thanks to all for the answers...

I understand that in the beginnig my models without script are nothing for DB, and my idea is to play with two boxes as players and a sphere.
At the moment, I read and follow the templates I found here, so I can make a box move and jump, etc.
But i have no idea of what to do with the ball...how to kick, how to deal with more or less impulse, to kick high or low, etc.
Any ideas are welcome.

Thanks

al
James Morgan
19
Years of Service
User Offline
Joined: 17th Apr 2005
Location: Behind you
Posted: 11th Jun 2005 05:59
that would involve a lot of maths and advanced concepts, at least to the quality of the games out now.
If your going to go for 3D, the first thing I would do it get a cube object moving, using the arrow keys. Dont worry about the camera for now, just as long as it is following your player.
Then create a small sphere, this would be the ball. Either you can use math to calculate its position, or learn how to use limbs with objects. What you need to do is get it so if the cube hits the sphere to attach it to the cube. Then when spacebar is pressed, relase the ball.
This is by no far impressive grahpicaly looking, nor will the controls stay the same as this, but you can see if you can get one player to interact with the ball.
You can then add on to this, such as give the ball a moving look, such as bouncing forward.

James

N.B.
ITS FOOTBALL NOT SOCCER!! (you americans... )

Hello!
RUCCUS
19
Years of Service
User Offline
Joined: 11th Dec 2004
Location: Canada
Posted: 11th Jun 2005 07:05 Edited at: 11th Jun 2005 07:07
TheRage, you've inspired me to write a tutoriual on this topic. I'm gona get started tonight, I dont know when it'll be done but Im pretty sure I can come up with a good basic soccer penalty game. Then hopefully you can learn from that, or you could just go for it on your own (the harder but better way to learn...way).

Like I said I dont know when Ill finish so dont be waiting for just this tutorial to come out, keep on working on your own. Just to get you started...

- Create 2 boxes (our character and our goaly), a plain (our net) and a sphere (the ball)
- Make the character box and goaly box the same sizes (something like 20x100x10
- Make the net size something like 300x200
- Rotate the plain so it faces upright
- Position the character at 0,0,0.
- Position the goaly at 0,0,100
- Position the net at 0,0,130
- Make a limb that is infront of the character.
- If the user hasn't pressed the spacekey, every loop, position the ball at the limbs x, y, and z positions
- If the user has pressed the spacekey, move the ball forward continuously.
- Check for collisions between the ball and the plain
- If a collision occurs with the plain, increase the goals variable by one, position ball back at limb positions
- If the ball collides with the goaly box object, increase the misses variable by 1
- Everytime the spacekey is pressed, increase the shots variable by one
- Use the TEXT command to show the user's goals, misses, and shots on the screen
- If the rightkey is pressed, move the character right. If the leftkey is pressed, move the character left.
- If the A key is pressed, move the goaly right. If the D key is pressed, move the goaly left.
- Display the goalies saves and misses aswell on the screen.

There you go, if you accomplish all of that then you should have a good base for a soccer penalty game. Goodluck! Hope to finish my tutorial soon to better help you and others out.


"..." - Me
tHeRage
19
Years of Service
User Offline
Joined: 9th Jun 2005
Location:
Posted: 11th Jun 2005 21:34
James: Yes...it's football, you make me smile at 8:00 am!!!! it's amazing!!!

Ruccus...thanks, that's was a looking for, one idea of how to start.
Well, now i'm in the beggining of my first attempt to make a game, and this is so exciting to me, I let you know about my progress...if I can progress...hahaha

Thank you all

al

PD...a tutorial?? wow... Just Do it!!! Just do it!!
bibz1st
21
Years of Service
User Offline
Joined: 2nd Jan 2003
Location:
Posted: 13th Jun 2005 01:22
here's something I did a while a go, its not brilliant and its not very complete (or well commented) but thought you might like a look
you will have to provide some sounds and BMP's or you could try and isolate and remove the need for them
let me know if it doesnt work.

spacekey = reset things
shiftkey and controlkey = alter camera view

RUCCUS
19
Years of Service
User Offline
Joined: 11th Dec 2004
Location: Canada
Posted: 13th Jun 2005 21:29
I didn't realize you were talking about football, (Canadian not American ) but the idea is basically the same. Either way if you're making a...soccer...no wait football game...then here's just one other idea.

I dont know if you've seen Chris K's Pong Tutorial. If you were to follow that and finish your "First Pong Game" then all you'd really have to do is alter the code to...

- Put the camera behind you
- Switch the upkey/downkey movement controls to left/rightkey
- Reposition the ball at the shooter's position everytime the user scored, rather than the middle
- Disallow the goaly to bounce the ball back, just position the ball at the user like above when the goaly hits it
- And add in the small details like the crowd, ball power and all that jazz.

Im all confused now so Im gona leave this post alone for a bit while I itch my brain.

Goodluck! < Jeez I just had an f instead of an l in there, that wouldn't have been good...


Current Projects: SHADE - Game Maker | Mecho - TGC Puzzle Entry | Halo Physics Engine | RovaR - Polygonal Collision Detection
master programmer
19
Years of Service
User Offline
Joined: 30th May 2005
Location: 3D Space
Posted: 14th Jun 2005 06:53
Make a cool animation of a soccer playing using a program that makes 3D object, of course!

______________________________________
<<<<I can program using anything>>>>
Baggers
20
Years of Service
User Offline
Joined: 31st May 2004
Location: Yonder over dem dere hills
Posted: 14th Jun 2005 07:46
master programmer: Who exactly are you talking to ?

Login to post a reply

Server time is: 2024-09-23 21:18:00
Your offset time is: 2024-09-23 21:18:00