Tigers Soccer Simulator

Announce new projects or updates of Irrlicht Engine related tools, games, and applications.
Also check the Wiki
Post Reply
pilesofspam
Posts: 62
Joined: Mon May 11, 2009 4:31 am

Tigers Soccer Simulator

Post by pilesofspam »

Well, my son's 6th birthday party is coming up at the end of July, so as in past years, I'm creating a video game for it with Irrlicht.

Previous years' games included 'Piratinhas' http://irrlicht.sourceforge.net/phpBB2/ ... hp?t=39712 and 'Planet Wars' http://irrlicht.sourceforge.net/phpBB2/ ... hp?t=39689

This year's game again focuses on the controls. You'll kick a real soccer ball through a goal/sensor matrix. I measure speed of the ball from a switch on the tee until it breaks the plane of the matrix, and position with a grid of 18 infrared 38kHz modulated beams. This part is already done.

Then, based on the position of the ball, I use Irrlicht to create a virtual ball flying on the projector, and I branch to the part of the video that shows the goalie moving to block the ball. Based on your level, the position of the ball, and speed of the kick, you either score or get the ball blocked. The difficulty increases and the goalie gets a quicker and quicker start as the game progresses. I'm using Irrlicht VideoMaster (libtheora) as the video format: http://irrlicht.sourceforge.net/phpBB2/ ... hp?t=39693

So far I have:

1. Goal and Tee completely done. Harder than I expected. Position and timing are working great.
2. Video control in Irrlicht working. Proof of concept shows me that so far the best way to handle this is to load ONE video into the buffer and branch where you want to go with seek(). Although I can put a video on a texture, I don't really need to so I'll probably just stick to the 2D method.
3. All video is already shot. Might take it over again with some corrections, but I can use what I have. The video is of my son's soccer coach who played goalie at the collegiate level (I am assistant coach).

I have a hard deadline of July 30th, so I'll try to post an occasional update if anyone is interested.

Here's the required screenshot of what I have so far (sorry about the photo, I took it with my phone):

Image
CuteAlien
Admin
Posts: 9809
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Post by CuteAlien »

Sometimes I wish this forum would allow upvoting threads :-)
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Radikalizm
Posts: 1215
Joined: Tue Jan 09, 2007 7:03 pm
Location: Leuven, Belgium

Post by Radikalizm »

Wow that is so awesome, that's one lucky son you have :D
pilesofspam
Posts: 62
Joined: Mon May 11, 2009 4:31 am

Re: Tigers Soccer Simulator

Post by pilesofspam »

I wanted to make my game ball the Addidas Jabulani, the ball used in the 2010 World Cup. So I started by watching this Blender Tutorial:
http://www.youtube.com/watch?v=9IhrnLbAdrk
But there's no texturing instruction there! So I found some pictures of the ball online, and I proceeded to UV map my mesh with the help of the Blender Noob to Pro manual. So far my results are acceptable, but I need to brighten up some smudges and I've got one of the graphics on the wrong panel. Something a little gimp work can fix this weekend. I exported the ball to .irrmesh with irrb (GREAT utility) and viewed it under the meshviewer example, and also as a replaced earth in the perpixellighting example. Later this weekend I'll work on perspective- ball movement with the video playing- so my ball flight will look somewhat normal when superimposed into the video. I took the video at measured level (my cheapo tripod has a bubble level) at six year old eye height, so hopefully it'll be OK. Here's progress on the ball:
Image
Acki
Posts: 3496
Joined: Tue Jun 29, 2004 12:04 am
Location: Nobody's Place (Venlo NL)
Contact:

Re: Tigers Soccer Simulator

Post by Acki »

looks nice :)
but beware that the FIFA is very strict with their licenses, so be sure you're allowed to use the official licensed ball in your app !!! ;)
while(!asleep) sheep++;
IrrExtensions:Image
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
pilesofspam
Posts: 62
Joined: Mon May 11, 2009 4:31 am

Re: Tigers Soccer Simulator

Post by pilesofspam »

but beware that the FIFA is very strict with their licenses, so be sure you're allowed to use the official licensed ball in your app !!! ;)
I hadn't considered that at all. I know it wouldn't matter just in making a game for my kid, but I generally like to release everything a few months after I complete it. Not that anybody would make one, it's just available for learning in case anybody thought "now how would I go about doing that?"

I guess I could keep a world cup ball on the home system, and release after swapping the skin out with a more generic ball.
Acki
Posts: 3496
Joined: Tue Jun 29, 2004 12:04 am
Location: Nobody's Place (Venlo NL)
Contact:

Re: Tigers Soccer Simulator

Post by Acki »

pilesofspam wrote:I guess I could keep a world cup ball on the home system, and release after swapping the skin out with a more generic ball.
pobably a good idea... ;)
maybe change the design of the ball, e.g. remove the FIFA logo, change/remove the adidas logo, and maybe change some other things of the design, so it looks like the original ball, but not exactly the same... ;)
while(!asleep) sheep++;
IrrExtensions:Image
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
pilesofspam
Posts: 62
Joined: Mon May 11, 2009 4:31 am

Re: Tigers Soccer Simulator

Post by pilesofspam »

Turns out it won't be an issue. When i showed it to Ben he said "it looks great, Daddy, but could you make it my soccer camp ball instead?" Just about done with that one now.
pilesofspam
Posts: 62
Joined: Mon May 11, 2009 4:31 am

Re: Tigers Soccer Simulator

Post by pilesofspam »

Been a while since an update. Finished that alternate ball, got a simple physics model implemented, which actually ended up being pretty neat. I mapped irrlicht units to linear distance in each coordinate axis, and then implemented real gravity by exerting acceleration based on frame time. Then I chose a bounce coefficient and implemented spin which changes on a bounce and we've got a believable flight. Position and speed were already implemented, but I made it more fault tolerant in case you miss the goal, or just flub the ball off of the tee, or pretty much anything else. I've got video branching working very well and reacting to where the ball is kicked, and I added sounds (really annoying vuvuzelas, boot sound, whistles, cheers, awww, etc)
Ben's been helping me test, but last night I gave the kids a quick chance to try the game out- there was a thunderstorm and we couldn't play outside. I had trouble getting them to stop.
Last things to do:
1. Scoring: Although they are designed, I don't yet have the rules implemented to decide if you've scored or have been blocked.
2. Screen overlay: score, chances remaining, instructions, etc

Looks like I'm on track for the birthday party next Saturday. I'll post a link to a video of it in action afterwards.
Image
pilesofspam
Posts: 62
Joined: Mon May 11, 2009 4:31 am

Re: Tigers Soccer Simulator

Post by pilesofspam »

The party was a blast! We had 25 kids there, and everyone loved the soccer simulator. Most of their parents gave it a try too. Only one bug showed up during the party- after about 1/2 hour of play, the ball would disappear! Game still worked fine, and a restart would bring the ball back.

Here's a little movie I took during the party of the soccer sim in action. The lack of ball is evident:
http://www.youtube.com/watch?v=gKACRU4LKfM

Ben isn't even in this video, he was out playing the games in the backyard at the moment I took this. After I clean it up a bit, I'll put up the source and we'll take another video with the ball in it!
Ravi08
Posts: 249
Joined: Thu Jul 17, 2008 12:25 pm

Re: Tigers Soccer Simulator

Post by Ravi08 »

Hi, just saw this and wow, great job i would play this more than i do fifa :P
"Hey Baby Wobbling Wobbling"
-Russell Peters
jorgerosa
Competition winner
Posts: 117
Joined: Wed Jun 30, 2010 8:44 am
Location: Portugal
Contact:

Re: Tigers Soccer Simulator

Post by jorgerosa »

Another brilliant project from "pilesofspam"! They always bring something new! :D
25 kids!... Now that is a real challenge for irrlicht! :roll:
Just a tip: dont forget to change the ball number (3) to 6 :wink:
Happy birthday "pilesofspam junior"! :D
Post Reply