any car racing example?

Post here your questions about the Flash / Flex / Air API for SFS2X

Moderators: Lapo, Bax

hassanayoub85
Posts: 21
Joined: 17 Jan 2012, 17:50

any car racing example?

Post by hassanayoub85 »

Hello sir,
Any car racing example for realtime racing?
Thx
A51Integrated
Posts: 240
Joined: 03 Jan 2012, 19:55
Location: Toronto, Canada
Contact:

Post by A51Integrated »

Yes. We developed a racing game called Space Race. Full source available here:

http://docs2x.smartfoxserver.com/Exampl ... space-race

It's a top down race game not first person.
A51 Integrated
http://a51integrated.com / +1 416-703-2300
hassanayoub85
Posts: 21
Joined: 17 Jan 2012, 17:50

Re: any car racing example?

Post by hassanayoub85 »

Hello,
I am trying to run this game from a long time,
When a user create a game, and other user joined his game, and the 2 players pressed the ready button, hw to play the game? i still wait for a long time while 2 users are ready without any progress!!!
second, when click on practice, then click on ready, how to start the race?
Does it uses UDP?
If we pay u, can u expend more features for it?
Thx
A51Integrated
Posts: 240
Joined: 03 Jan 2012, 19:55
Location: Toronto, Canada
Contact:

Re: any car racing example?

Post by A51Integrated »

Most probably, there is an issue with the API / Server versions. The SpaceRace game was developed some time ago and needs to be updated to work with the current API and server.

Make sure you're using the current Server (SFS2X final) and the AS3 API SWC that comes with that download package.

Yes, the game uses UDP for positional updates and yes, it can be customized, please contact us (http://a51integrated.com) for more info.
A51 Integrated
http://a51integrated.com / +1 416-703-2300
hassanayoub85
Posts: 21
Joined: 17 Jan 2012, 17:50

Re: any car racing example?

Post by hassanayoub85 »

How much minimum number of players is required?
A51Integrated
Posts: 240
Joined: 03 Jan 2012, 19:55
Location: Toronto, Canada
Contact:

Re: any car racing example?

Post by A51Integrated »

You should be able to play in practice mode by yourself, otherwise 2 players.
A51 Integrated
http://a51integrated.com / +1 416-703-2300
hassanayoub85
Posts: 21
Joined: 17 Jan 2012, 17:50

Re: any car racing example?

Post by hassanayoub85 »

when 2 users connect to the same created game, and both click on ready, the game still here, how to move on to the game?
and the same in practice, when going to practice, and click on ready, nothing happened, any idea?
A51Integrated
Posts: 240
Joined: 03 Jan 2012, 19:55
Location: Toronto, Canada
Contact:

Re: any car racing example?

Post by A51Integrated »

The player that created the game will have a button to start the game or wait for players. The second player only needs to click the ready button.

Again, make sure the API is up to date otherwise you may not be sending messages to the server properly.
A51 Integrated
http://a51integrated.com / +1 416-703-2300
hassanayoub85
Posts: 21
Joined: 17 Jan 2012, 17:50

Re: any car racing example?

Post by hassanayoub85 »

I am sure having the lastest API, and be sure there is no ready button!!!
A51Integrated
Posts: 240
Joined: 03 Jan 2012, 19:55
Location: Toronto, Canada
Contact:

Re: any car racing example?

Post by A51Integrated »

Can both players see each other on the track at the start line?
A51 Integrated
http://a51integrated.com / +1 416-703-2300
hassanayoub85
Posts: 21
Joined: 17 Jan 2012, 17:50

Re: any car racing example?

Post by hassanayoub85 »

Yes, bothe players can see both cars, and if one leave a race, the car disappear, and when rejoin, it will reappear.
A51Integrated
Posts: 240
Joined: 03 Jan 2012, 19:55
Location: Toronto, Canada
Contact:

Re: any car racing example?

Post by A51Integrated »

We think there may be a bug in the game when updating the UserVariable with the new server release. Give us a few days and we'll post a solution soon.
A51 Integrated
http://a51integrated.com / +1 416-703-2300
hassanayoub85
Posts: 21
Joined: 17 Jan 2012, 17:50

Re: any car racing example?

Post by hassanayoub85 »

ok wwill wait then to try, and then contact u to see where we can go together, and how to cooperate.
A51Integrated
Posts: 240
Joined: 03 Jan 2012, 19:55
Location: Toronto, Canada
Contact:

Re: any car racing example?

Post by A51Integrated »

Hi,

We have just tested the game with a fresh download of the example and version 2.0.1 of the server and have had no issues when playing a race.

Can you make sure/confirm you are following the following steps to create a game. If not let us know how to replicate your issues.

1. Once both users have logged into the game, create a race from the lobby and select your craft.
2. Have the 2nd player join the game room you have just created and also select a craft.
3. For each racer you should now see their status as 'waiting'. At this stage click the Ready button for each racer.
4. When the 2nd racer hits ready the screen will change and you will see both craft on the start/finish line and a 3 second timer will also appear.
5. Once this timer reaches 0 it will be removed and the race begins. Use the arrow keys to control your craft.

Please let us know if this works for you and if not let us know the sequence of events that we can follow to replicate your problems.
A51 Integrated
http://a51integrated.com / +1 416-703-2300
hassanayoub85
Posts: 21
Joined: 17 Jan 2012, 17:50

Re: any car racing example?

Post by hassanayoub85 »

Hello sir,
same steps has been done.
on step 4, no timer starts, and there for the screen still as it, and attached 2 screenshot for practice and game.
Attachments
Practice.png
(217.33 KiB) Not downloaded yet
Game.png
(243.12 KiB) Not downloaded yet
Post Reply