Discuss Scratch

dazastuart
Scratcher
19 posts

help to make a board game

hi all i was wondering if you could help i am new to scratch and want to make a board game. the game is a game i use in my work
i work with children and this game is teaching about things in life. i want to make a digital version. the game has a lot off asspects so not sure if it can be done. basiclly is called the snail game and you roll a dice and go round the snails shell is coloured in 8 different colours and if u land of these colors you get a card from that color which tells you to go forward a faw spaces or back. any advice would be greatfull
deck26
Scratcher
1000+ posts

help to make a board game

I'm sure it can be done. For example, use lists for each square of the board giving the x,y position. You can then easily move from square 5 to square 9 or whatever. Colour detection is possible but another list for the contents of each square - eg 0 for no effect, +2 for move forwards 2 - would be as good.

Or, if I've misread what you need, each square has a colour associated with it which you then use to draw a card - a randomised list for each colour would be the obvious way.

Last edited by deck26 (Nov. 2, 2017 22:10:29)

Lili07
Scratcher
12 posts

help to make a board game

what type of advice do you need
consultWikipedia
Scratcher
52 posts

help to make a board game

dazastuart wrote:

hi all i was wondering if you could help i am new to scratch and want to make a board game. the game is a game i use in my work
i work with children and this game is teaching about things in life. i want to make a digital version. the game has a lot off asspects so not sure if it can be done. basiclly is called the snail game and you roll a dice and go round the snails shell is coloured in 8 different colours and if u land of these colors you get a card from that color which tells you to go forward a faw spaces or back. any advice would be greatfull

If you are a new Scratcher, I would recommend making some more simple games first. I have a website that I upload video tutorials on (Only two so far). LinkconsultWikipedia.com
deck26
Scratcher
1000+ posts

help to make a board game

Draw your board on the stage and then use this temporary script to add the centre of each square to the lists.

whenthisspriteclicked replace this with when stage clicked, it's a stage scriptaddmouse-xtox-posaddmouse-ytoy-pos
That's an easy way to add the x,y values to the lists. Disable the script by separating from the header block so you can use it again if necessary but it's not working when you don't want it to.

The rest of the basics can be seen in this project https://scratch.mit.edu/projects/183947541/ - it's very rough and ready but shows it needn't be difficult.

Last edited by deck26 (Nov. 3, 2017 09:42:56)

dazastuart
Scratcher
19 posts

help to make a board game

thanks for all the advice im very new and just working away each day. i do think it might be worth while me doing a few easy games first as the more i try make this game the more i realise it has a lot more content and parts to it that i thought lol.
dazastuart
Scratcher
19 posts

help to make a board game

is their a way to share what i have done so far this may give you a better understanding of what i need to do
deck26
Scratcher
1000+ posts

help to make a board game

Just share the project and either provide a link here or tell us what it is called.
dazastuart
Scratcher
19 posts

help to make a board game

ok i will upload and share nwo thanks for the help so far. the game is still in very early process but getting their with all your help
dazastuart
Scratcher
19 posts

help to make a board game

this is the link to the game. some times the dice works and some times it does not lol i have still to upload the cards that will be giving out when a player lands on a color and i have still to make more players i want to be able for people to select from 2-5 players


https://scratch.mit.edu/projects/183703086/
deck26
Scratcher
1000+ posts

help to make a board game

Just a very quick look - take out the forever loops in the stage - they're conflicting and unnecessary. Just use the code without the loops.
dazastuart
Scratcher
19 posts

help to make a board game

ok done thanks not sure what i have done now tho as sprite not moving lol. im going to just try adding evrythin i need to the game then work away at the coding
deck26
Scratcher
1000+ posts

help to make a board game

For the players you can either use separate sprites each with an id number or clones of one sprite. The latter may be too much for you at this stage.

So basically you have a current-player variable which can be changed by the dice after each move has completed. Each player then only moves if their number matches the current-player variable.
deck26
Scratcher
1000+ posts

help to make a board game

dazastuart wrote:

ok done thanks not sure what i have done now tho as sprite not moving lol. im going to just try adding evrythin i need to the game then work away at the coding
Apologies it was the start button that had the clashing forever loops. The stage doesn't need any working scripts now you've added the data points to the list. That may change but at the moment the stage doesn't do anything.

What is happening otherwise is the Start Game is being broadcast in a loop so the receivers of that broadcast are constantly restarting which includes the player script moving the player to the start position.

Last edited by deck26 (Nov. 7, 2017 13:29:59)

dazastuart
Scratcher
19 posts

help to make a board game

thanks again i have removed the loop have to admit this software is really good and the support is also very good
deck26
Scratcher
1000+ posts

help to make a board game

You look to be making good progress.

One problem with multiple players is they will end up on top of each other if they're in the same space. An easy fix would be to just offset the costume centre for each one in a different way as when you position the sprite it is the costume centre that you place at the defined position. Alternatively each needs a different offset for x and or y so, for example, the first one goes to the defined x + 4 and the defined y +4 but the second goes to the defined x - 2 and the defined y + 4.

For the colours you could use colour detection but I'd probably use another list to avoid confusion. ‘Touching’ may match for more than one colour but the list would only give one match for the current position which is what you need. You'll need to type the list in manually but you could create a short script to help - eg input of RGBYBRY gets expected to a list red, green, blue, yellow etc. If you make a mistake it would be easy to correct/insert/delete one of two items in the list as necessary. Once the list is set up you don't need to change it.
dazastuart
Scratcher
19 posts

help to make a board game

sorry was in work their thanks for the advice again i will try work through your suggestions. im going to try make the players bit work first then move on to when the players land in each colour
dazastuart
Scratcher
19 posts

help to make a board game

deck26 wrote:

For the players you can either use separate sprites each with an id number or clones of one sprite. The latter may be too much for you at this stage.

So basically you have a current-player variable which can be changed by the dice after each move has completed. Each player then only moves if their number matches the current-player variable.

so how would i add this code to my dice code
deck26
Scratcher
1000+ posts

help to make a board game

Dice at start set current-player variable to1. After the broadcast and wait it moves current-player to the next value.

A trick for you here
setcurrent-playertocurrent-playermod4+1for 4 players
since 4 mod 4 = 0 this goes round the loop after player 4. For other values it just adds 1. You could do it by adding 1 and then checking for exceeding the max and resetting to 1 if so if you prefer.

So each player has an if block around the code in its receiver for the ‘move’ broadcast to decide whether it should move.

eg player 2 has

whenIreceivemoveifcurrent-player=2then

Last edited by deck26 (Nov. 10, 2017 11:43:43)

dazastuart
Scratcher
19 posts

help to make a board game

thank yo so much for your help i will add this and hopefully thats my players sorted then ill move on to next part lol

Powered by DjangoBB