Discuss Scratch

JCubas02
Scratcher
2 posts

How to make a strategy game like Risk?

Hello, after playing many hours of HOI IV, I have had a urge to make a WW2 strategy game for scratch. Obviously It would be very difficult to remake HOI IV game play in scratch so I have decided to do a risk turn based style instead. However I had trouble trying to figure out how to code the territory and units. I would like to know how to code a system that keeps track of territory and how many units there are on each territory. Even if you don't know an answer for me, I would appreciate it if you would point me in the right direction!
Wettining
Scratcher
500+ posts

How to make a strategy game like Risk?

JCubas02 wrote:

Hello, after playing many hours of HOI IV, I have had a urge to make a WW2 strategy game for scratch. Obviously It would be very difficult to remake HOI IV game play in scratch so I have decided to do a risk turn based style instead. However I had trouble trying to figure out how to code the territory and units. I would like to know how to code a system that keeps track of territory and how many units there are on each territory. Even if you don't know an answer for me, I would appreciate it if you would point me in the right direction!
Of course there are many ways to do this but one way would be to have a grid of ‘Observers’ basically that count how many units are touching them.
If you were to make a custom block for it I would think it would be kinda fast.
Or you could use mathematics and store the location of all the units in a list then testing each one to see if it's in territories but this could get exponentially slower as more troops are added so I am not sure this would be the best way
JCubas02
Scratcher
2 posts

How to make a strategy game like Risk?

Thanks for the advice, I'll try out your strategy and see how it plays out!
jji10
Scratcher
1000+ posts

How to make a strategy game like Risk?

The Scratch collaboration @RiskGames creates that type of game - and quite well, if I do say so myself. Maybe you can play their games, look at the code a bit and get some inspiration?

Last edited by jji10 (Aug. 30, 2017 13:39:17)


<– This is me. Totally. Courtesy of @Tymewalk for the image.
Macky527
New to Scratch
3 posts

How to make a strategy game like Risk?

I am trying to make a strategy game like Eu4. I have Your text to link here… that I wanna use.

Good luck!

Last edited by Macky527 (Dec. 6, 2017 10:14:37)

Macky527
New to Scratch
3 posts

How to make a strategy game like Risk?

Why Cant i post pictures?!?

Last edited by Macky527 (Dec. 6, 2017 10:16:21)

Sheep_maker
Scratcher
1000+ posts

How to make a strategy game like Risk?

Macky527 wrote:

Why Cant i post pictures?!?
To prevent spam, new Scratchers can't post links. There's also a whitelist for image hosts.

- Sheep_maker This is a kumquat-free signature. :P
Urgently need to search for something? Project Search | Studio Search | User Search | Forum Search
.postsignature {overflow: auto;}

Powered by DjangoBB

Standard | Mobile