Jump to content

[WIP] Valhalla


tomdanvers
 Share

Recommended Posts

post-12603-0-51225900-1440143128.jpg

 

Hi Game Devs,

I've been working on a multiplayer game and would love some feedback! The nodejs server is using socket.io and the client is built using PhaserJS. The server is in Western Europe so apologies for chronic lag if you are too far away (I've not done any lag mitigation yet).

 

From the main menu click the 'Normal' button. Cursor keys to move and space to attack. The game modes and (2) maps cycle automatically. There is still a long way to go but hopefully you can see where I'm heading with this. The 'Screen Only' mode is a spectator mode. I'm going to enhance that feature so that you can have the game running on a big screen and use your mobile as the controller (so multiple people can crowd around the screen). The bots are pretty dumb so apologies for that. Also dev graphics alert, Yuck!

 

http://valhalla.tomdanvers.com/

 

The 'story', if I need one, is based on the Norse myth of Valhalla. A vast hall where Odin gathers together the souls of fallen warriors to feast and fight in preparation for the end of the world (Ragnarok) where he'll call on their aid to defeat the monstrous wolf Fenrir. I liked the descriptions of Valhalla being a place where warriors fight each other and reappear un hurt after each battle to feast and fight again, it seemed like a neat explanation for a respawn mechanic!

 

Thanks,

Tom

 

P.S. I've not implemented any load balancing or queueing so the server might well blow up...

P.P.S. Sorry no mobile control interface yet (you can spectate on mobile but not play)

post-12603-0-83681000-1440143511.jpg

Link to comment
Share on other sites

Further to the above here is some methodology i wrote up for a friend:

 

TL;DR Game running on NodeJS server using socket.io. Client built using PhaserJS. Code and stuff...

 
The nodejs server is running on an amazon EC2 instance. It uses socket.io to handle the connections from the clients. The client is just hosted on my personal website.
 
All the game logic (mode/level selection, map generation, level initialisation and per frame updates) is running on the server. As there are bots involved the cycle of deathmatches and teamdeathmatches are playing out even when no one is connected. I sometimes lie awake thinking about the poor little sods locked together in perpetual combat... In the grim darkness of the node server there is only war etc...
 
Every time the game updates it broadcasts the game state (player position etc) to all the connected clients. As a result the client code is super simple, it handles rendering the game world and processing per frame updates to show the players in the correct position. Another nice side effect of having the game logic on the server is that it makes it fairly hard to hack. All that the clients tell the server is which buttons are pressed (up, down, space etc) and the game server updates the game world based on those inputs. The alternative is that the clients handle the player position and broadcast to each other but thats pretty easy to cheat. 
 
Another nice side effect of the game being on the server is that it makes it really easy to create a screen share mode with players using their phones as the input device (which I've started doing with the bottom two options in the main nav). If you open two browser windows and in one choose the 'Screen' option and in the other choose the 'input' option you can use the keyboard in the input window to control your character in the other window. Now imagine using your phone as the input client (once I've implemented touch screen controls) and having the 'screen' version running on a big screen multiple people could crowd around and see the action on one screen. Maybe we can try it at the next NR meet :D
 
I'm doing nothing to handle lag (it seems smooth just because you are on a fast connection and the server is only in Ireland! Net code to mitigate lag is something that I guess I should do at some point but it doesn't sound terribly fun... Also there is no concept of lobbies/rooms and so the game will just accept players until the server melts :D
Link to comment
Share on other sites

Logged into it to check it out, it's a very nice start! I love platformers, hope to see it turn out to be something great.

 

Seems you are going to make a deathmatch type game? If so, you should try and make it more than just the average "team deathmatch" and add some RPG elements! Always fun to be constantly advancing when playing a game rather than stuck at the same state.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...