ForumsProgramming ForumHow to make flash board game???

15 7999
Haku1234567890
offline
Haku1234567890
1,720 posts
Nomad

I have Macromedia 8 and I would like to make a board game, I know how to make animations in it but I don't know many commands, can anyone help me?

Things I would want to have in game

-random dice rolling (I have no idea how to make something random)
-hit points (when you land on some spaces you lose hit points)
-switches (when you land on switch it my activate trap on other space, like spikes)
-potions (when you land on it it restores your health)
-players (I would like 2-6 players options)
-other (some spaces do diffrent actions when you land on them)

If that is too much, for my first game I would just wat to leard how to make player move that many spaces showed on dice and I would like to have dice that show random "dots" from 1-6 after that I How to make hitpoints, traps and potions

  • 15 Replies
Haku1234567890
offline
Haku1234567890
1,720 posts
Nomad

and also...

-items (like keys that unlock doors)
-crossroads (crossing where you can chose which way you will go)

plasmafish
offline
plasmafish
252 posts
Nomad

You will need a lot of actionscript for your game.

driejen
offline
driejen
486 posts
Nomad

for rolling, you need a function on the main timeline that will generate a random number between 1 and 6 when triggered.
the code would be something like
function roll(){

driejen
offline
driejen
486 posts
Nomad

my browser is playing up..

or rolling, you need a function on the main timeline that will generate a random number between 1 and 6 when triggered.
the code would be something like

function roll(){
result=Math.ceil(Math.random()*6)
moveplayer()
}

moveplayer would be another function that will move a player based on the result. also to trigger the function roll, you will need a button with the code,
on(release){
_root.roll()
}

PixelSmash
offline
PixelSmash
566 posts
Nomad

As I've said to a lot of people before... the key to creating a game (or any sort of project for that matter, not just flash or programming) is breaking it down into manageable chunks.
You see, learning a language might sometimes be challenging, but it helps so much to be able to say what exactly you want.

For instance, you ask about dice rolling. You could break this down into smaller chunks, like 'click on a button', 'getting a random number from 1 to [maximum]', 'store the result', 'displaying that to the user for a specific time', 'moving the (current) player result spots forward'.
This might seem pretty straight-forward, and it is actually, but it helps you determine what it is you want. Another benefit is that because you've broken it down into small pieces, you can easily ask for help, tips or hints on how to implement that - meaning that even if you don't know the code, you know what exactly to ask for. This makes life for you a lot easier, and also for those you ask help from

And, for rolling, driejen's code looks great!

Cheers!

Haku1234567890
offline
Haku1234567890
1,720 posts
Nomad

function roll(){
result=Math.ceil(Math.random()*6)
moveplayer()
}

I have made square, I have converted it to simbol and put this (above) in actions and I got error...:/ I guess Im too big noob

**Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 1: Statement must appear within on handler
function roll(){

Total ActionScript Errors: 1 Reported Errors: 1

rjbman
offline
rjbman
215 posts
Nomad

You will need a lot of actionscript for your game.


That's quite helpful. Unlike most games (Sonny 2, etc.) this game will need a lot of actionscript.

Sorry, but that just seems like spam.
rjbman
offline
rjbman
215 posts
Nomad

Sorry about that, I was being sarcastic about that. I guessed it was more.

plasmafish
offline
plasmafish
252 posts
Nomad

Well I think it is a good idea for him to make the board game on paper or something equivalent. Make it for real and then try and put that game into Flash.

You will find out what you need to do to get it into flash by taking the same steps you did in building the real game as the digital one. You can also add a lot of neat things dynamically in flash that you cannot with a real board game.

Here is a link to dice animations to give you a little idea of differences: Dice Animations

Here is one for download with the source: Dice

Darkroot
offline
Darkroot
2,763 posts
Peasant

I'll give someone a cookie if they can make a chess game in which the AI is higher than 1200 elo.

Darkroot
offline
Darkroot
2,763 posts
Peasant

No it's just flash sucks for that kind of stuff I can easily see it using way more resources than a software based system.

I heard that my friend go his computer up to 110 celcius playing flash games. He could literally boil water on his cpu (maybe even make some eggs and bacon to boot). Though his motherboard sucked at regulating temp but still it puts it into perspective.

Haku1234567890
offline
Haku1234567890
1,720 posts
Nomad

I give up...I can't make it

Showing 1-12 of 15