Brian Leighty

Risk Like Game Tutorial

Recommended Posts

Hi. I've had the idea for turning a board game that one of my friends came up with that's a spin off of Risk into an actual video game. I've tried to find some tutorials related to this but have been unsuccessful. There have been some pieces here or there of things I would need but nothing that's what I'm looking for. Main things are turn based per player, preferably how to do custom shapes vs hexagons but hexagon based map would work as well. How to Navigate/zoom the map would be great as well. Thanks for the links in advance. Also, so far I've chosen Phaser to learn as it seems to have a very good community but if there is a better game engine for this type of thing please reference that as well. Thanks!

Share this post


Link to post
Share on other sites

Definitely possible in Phaser. Conceptually though, this example would be a pretty good reference:

https://github.com/nullobject/risk

Hexagons should be easy to draw using graphics, followed by a texture conversion if you need to.

Setting turns is just setting some game state variable after  ending your turn:

game.turn = (game.turn + 1 ) % num_of_players

maps are definitely possible. I think cameras will help you out alot here. Navigating through a map can be done by scrolling. Have a look at the examples:

https://labs.phaser.io/view.html?src=src/camera/minimap camera.js

https://labs.phaser.io/view.html?src=src/camera/move camera with keys.js

https://labs.phaser.io/view.html?src=src/camera/scroll view.js

https://labs.phaser.io/view.html?src=src/camera/zoom to.js

https://codepen.io/Samid737/pen/zaLydB

For UI you can use seperate UI scenes, or you could again use cameras to layer and exclusively render UI stuff.

Good luck!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.