Newbie Spellweaver
- Joined
- May 16, 2017
- Messages
- 19
- Reaction score
- 36
Hi RageZone!
2020 update: The game has been released. Check the 2020 topic.
Update 2 of 2019, public beta, click here to see the update.
The game is in BÈTA now, click here for more information
Would you like to test FastFood at your hotel? Contact me through an PM or add me on Discord: MikeDev#5692
There is a new discord-group with changelog-updates:
Quick dev updates (2017 & 2018):
Update 17-02-2018: http://forum.ragezone.com/f331/habb...s-websockets-1132094-post8858115/#post8858115
Update 19-02-2018: http://forum.ragezone.com/f331/habb...s-websockets-1132094-post8858502/#post8858502
Some background information:
A time ago I started to re-create the Fastfood game from Habbo! You all know Fastfood as a game in the Habbo Gamecenter. In 2014 the game-center got discontinued en has been removed. So did the FastFood game...
Some others got it working again, but the code has been removed from the Habbo SWFs these days, and many people still like the game or liked it very much. So I thougt: Let's take it back!I worked more than one month at the game right now. It is pretty much above the 70% of beeing finished!
What is the idea?
I do not have a hotel at the moment (and I don't want it too), but many hotels want to have the FastFood game inside their hotel.
So what I am going to do is making a public server, making a API for the game and hotel-owners can let their users connect to The Fastfood Game!
Api?
Yeah, I think it is the best for a game like this, to make the game public but source closed. I will keep the game up-to-date and make new features inside the game. The reason I will keep it by myself is so there are not many different versions of the game around the retro world, just one version with a big amount of players (I hope so? XD). Hotels can create a API-key, so they can give their users access to the FastFood server.
Create a API key:
The hotel owner will get a Private Key and must register to get a key to The Fastfood Game. We only need these details:
- Hotel name
- Hotel URL
- Hotel language (Dutch, English, French, German, Spanish...): The game will be shown in that language for that particuar user/hotel!- Hotel country (The COM, NL, DE, FR, Es, etc.) boards will be used
Create a user:
1. Hotel API key
2. Give some details about the user:
- Username
- Unique user ID (maybe just your userID)
- Avatar
- Allow full-server: There will be an option to play international (full-server), or just play with people from only the current hotel.
With those information the game can save the user status (won how many times, rockets, parachutes etc.)
The API will generate a session for the user and will return a URL to where you can redirect them, something like this:
This link does work only once, so users cannot access someone else his/hers account
What has been build already?
- The API- Multi
- Multi-language
- Loading all images & sounds
- Server connection
- Communication between server & game
- Searching for a match
- Opening the game
- Loading avatars
- Every player has it own place within the game
- Drop food
- Shields
- Countdown
- Receiving stars (animation & serverside sent)
- Winning (at 6 stars)
- Winning boars will be under the right user
- The guests around the tables are random placed
- Guests interaction: They'll get scared and angry if you drop your food!
- Parashutes: Save your food before it is too late!
Sounds finished? What is left to be made then?
There are some things that I have to be build:
- Power ups (rocket, big parachute)
- Playing the game within just the hotel option
- Maybe spectating? Would we like that for events? Not sure about it. Give your reaction about it
Custom ideas for the game:
- Halloween theme (let the hotel choose the theme of FastFood)
- Christmas theme
- Easter theme
- More food available. There are now 5 different of food types. Maybe someone likes to design more food?
- Maybe your idea?
How many lines code are there?
There are over 3.000 javascript lines for the canvas (included white-space and comments). Serverside there are 1000 lines code.
How is the server build?
The server is build in Node.JS, I liked to learn it, so this would be a great experiment! It is fast and javascript, so it wasn't dificult to try it out!I am using the Socket.io module for handling the sockets. It is a very popular way to use websockets! So I used it.
The server may be not perfect right now, there is a lot to do, but it works very well right now
The following downstairs is not updated yet. The game is now in a better state and in BÈTA. Please check the dev-notes mentioned at the top of this topic
Some gamplay for what is done now:
Yesterdag (15-05-2017) I started to make it possible to drop the food. Today (16-05-2017) I made it working to save the food with the parashutes.
Look at some gameplay:
A gif (with not many frames, I suggest you click the link above for more frames)
Screenshots:
Screen of the server:
Loadwindow of FastFood:
Lobby of FastFood:
Countdown:
Mike did win, he is receiving his 6th star (old image, the gameplay already works!). The food of the others will explode!
The winner will be indicated:
Snippets
Serverside:
When a user connects to the server with their session information, the server will look for the user and temporarely save the data as long the user is online:
Client-side:
There is many code to show, so I have just a few pieces for you guys:
The calculations of positions, widths and heights are not been calculated per frame. They are calculated once: when opening or re-sizing the game-window. So there is room enough for other calculations like falling-food and things like that!
I test the game on a old windows laptop (3gb memory, intel home) and the game plays very smooth! So, I think it must be playable on every computer!
Some of the position calculation and drawing:
What do you think? Do you have questions? Suggestions?
Let it know in this topic!
Greets,Mike
2020 update: The game has been released. Check the 2020 topic.
Update 2 of 2019, public beta, click here to see the update.
The game is in BÈTA now, click here for more information
Would you like to test FastFood at your hotel? Contact me through an PM or add me on Discord: MikeDev#5692
There is a new discord-group with changelog-updates:
You must be registered to see links
Quick dev updates (2017 & 2018):
Update 17-02-2018: http://forum.ragezone.com/f331/habb...s-websockets-1132094-post8858115/#post8858115
Update 19-02-2018: http://forum.ragezone.com/f331/habb...s-websockets-1132094-post8858502/#post8858502
Some background information:
A time ago I started to re-create the Fastfood game from Habbo! You all know Fastfood as a game in the Habbo Gamecenter. In 2014 the game-center got discontinued en has been removed. So did the FastFood game...
Some others got it working again, but the code has been removed from the Habbo SWFs these days, and many people still like the game or liked it very much. So I thougt: Let's take it back!I worked more than one month at the game right now. It is pretty much above the 70% of beeing finished!
What is the idea?
I do not have a hotel at the moment (and I don't want it too), but many hotels want to have the FastFood game inside their hotel.
So what I am going to do is making a public server, making a API for the game and hotel-owners can let their users connect to The Fastfood Game!
Api?
Yeah, I think it is the best for a game like this, to make the game public but source closed. I will keep the game up-to-date and make new features inside the game. The reason I will keep it by myself is so there are not many different versions of the game around the retro world, just one version with a big amount of players (I hope so? XD). Hotels can create a API-key, so they can give their users access to the FastFood server.
Create a API key:
The hotel owner will get a Private Key and must register to get a key to The Fastfood Game. We only need these details:
- Hotel name
- Hotel URL
- Hotel language (Dutch, English, French, German, Spanish...): The game will be shown in that language for that particuar user/hotel!- Hotel country (The COM, NL, DE, FR, Es, etc.) boards will be used
Create a user:
1. Hotel API key
2. Give some details about the user:
- Username
- Unique user ID (maybe just your userID)
- Avatar
- Allow full-server: There will be an option to play international (full-server), or just play with people from only the current hotel.
With those information the game can save the user status (won how many times, rockets, parachutes etc.)
The API will generate a session for the user and will return a URL to where you can redirect them, something like this:
You must be registered to see links
This link does work only once, so users cannot access someone else his/hers account
What has been build already?
- The API- Multi
- Multi-language
- Loading all images & sounds
- Server connection
- Communication between server & game
- Searching for a match
- Opening the game
- Loading avatars
- Every player has it own place within the game
- Drop food
- Shields
- Countdown
- Receiving stars (animation & serverside sent)
- Winning (at 6 stars)
- Winning boars will be under the right user
- The guests around the tables are random placed
- Guests interaction: They'll get scared and angry if you drop your food!
- Parashutes: Save your food before it is too late!
Sounds finished? What is left to be made then?
There are some things that I have to be build:
- Power ups (rocket, big parachute)
- Playing the game within just the hotel option
- Maybe spectating? Would we like that for events? Not sure about it. Give your reaction about it
Custom ideas for the game:
- Halloween theme (let the hotel choose the theme of FastFood)
- Christmas theme
- Easter theme
- More food available. There are now 5 different of food types. Maybe someone likes to design more food?
- Maybe your idea?
How many lines code are there?
There are over 3.000 javascript lines for the canvas (included white-space and comments). Serverside there are 1000 lines code.
How is the server build?
The server is build in Node.JS, I liked to learn it, so this would be a great experiment! It is fast and javascript, so it wasn't dificult to try it out!I am using the Socket.io module for handling the sockets. It is a very popular way to use websockets! So I used it.
The server may be not perfect right now, there is a lot to do, but it works very well right now
The following downstairs is not updated yet. The game is now in a better state and in BÈTA. Please check the dev-notes mentioned at the top of this topic
Some gamplay for what is done now:
Yesterdag (15-05-2017) I started to make it possible to drop the food. Today (16-05-2017) I made it working to save the food with the parashutes.
Look at some gameplay:
You must be registered to see links
A gif (with not many frames, I suggest you click the link above for more frames)
Screenshots:
Screen of the server:
You must be registered to see links
Loadwindow of FastFood:
You must be registered to see links
Lobby of FastFood:
You must be registered to see links
Countdown:
You must be registered to see links
Mike did win, he is receiving his 6th star (old image, the gameplay already works!). The food of the others will explode!
You must be registered to see links
The winner will be indicated:
You must be registered to see links
Snippets
Serverside:
When a user connects to the server with their session information, the server will look for the user and temporarely save the data as long the user is online:
Code:
[COLOR=#363636]/*[/COLOR]
[COLOR=#363636]* Get user info[/COLOR]
[COLOR=#363636]* getUserGameInfo("/#oF3c6P29k9nuncCjAAAA"); => NO RETURN[/COLOR]
[COLOR=#363636]*/[/COLOR]
[COLOR=#363636]function getUserGameInfo(sid) {[/COLOR]
[COLOR=#363636] var serverUID = userSessionToServerId(sid);[/COLOR]
[COLOR=#363636] if(serverUID == "unknown") {[/COLOR]
[COLOR=#363636] currentServer.io.to(sid).emit("get_alert", "Something went wrong. Try again later. User session did not exists.");[/COLOR]
[COLOR=#363636] return;[/COLOR]
[COLOR=#363636] }[/COLOR]
[COLOR=#363636] var hotelId = serverData.onlineUsers[serverUID].hotel_id;[/COLOR]
[COLOR=#363636] var hotelUid = serverData.onlineUsers[serverUID].hotel_uid;[/COLOR]
[COLOR=#363636] //var[/COLOR]
[COLOR=#363636] var tempUserInfo = {};[/COLOR]
[COLOR=#363636] // Ok, check the database for results[/COLOR]
[COLOR=#363636] db.query("SELECT uinfo.won, uinfo.lost, uinfo.played, uinfo.rockets, uinfo.parachutes, uinfo.shields FROM user_info AS uinfo WHERE uinfo.hotel_id = "+ db.escape(hotelId) +" AND uinfo.hotel_uid = "+ db.escape(hotelUid) +" LIMIT 1").on('result', function(_inf_){[/COLOR]
[COLOR=#363636] // Put information in place[/COLOR]
[COLOR=#363636] tempUserInfo.won = _inf_.won;[/COLOR]
[COLOR=#363636] tempUserInfo.lost = _inf_.lost;[/COLOR]
[COLOR=#363636] tempUserInfo.played = _inf_.played;[/COLOR]
[COLOR=#363636] tempUserInfo.tracks = _inf_.rockets;[/COLOR]
[COLOR=#363636] tempUserInfo.fundys = _inf_.parachutes;[/COLOR]
[COLOR=#363636] tempUserInfo.tuckys = _inf_.shields;[/COLOR]
[COLOR=#363636] })[/COLOR]
[COLOR=#363636] .on('end', function() {[/COLOR]
[COLOR=#363636] currentServer.io.to(sid).emit("lGgL");[/COLOR]
[COLOR=#363636] currentServer.io.to(sid).emit("pn74bda", tempUserInfo);[/COLOR]
[COLOR=#363636] console.log("CLIENT [" + sid + "]: Go for it! Send to lobby!");[/COLOR]
[COLOR=#363636] });[/COLOR]
[COLOR=#363636]}[/COLOR]
Client-side:
There is many code to show, so I have just a few pieces for you guys:
You must be registered to see links
The calculations of positions, widths and heights are not been calculated per frame. They are calculated once: when opening or re-sizing the game-window. So there is room enough for other calculations like falling-food and things like that!
I test the game on a old windows laptop (3gb memory, intel home) and the game plays very smooth! So, I think it must be playable on every computer!
Some of the position calculation and drawing:
You must be registered to see links
What do you think? Do you have questions? Suggestions?
Let it know in this topic!
Greets,Mike
Attachments
You must be registered for see attachments list
Last edited: