PDA

View Full Version : chutes and ladders ?


john316
05-12-2015, 02:46 PM
x

RavenOfCode
05-12-2015, 08:37 PM
World is not rendering for me...

Edit: Alice was not able to load your custom texture for the world.

Could you post a screenshot of it so i can apply is manually?

Also john, no one on here is looking for money, we are here to help people learn Alice and what awesome stuff it can do.

RavenOfCode
05-13-2015, 05:41 AM
Attached is the file I used as a texture map on a billboard. The (spinner) project might look familiar. Are the methods and the objects showing ?

Once I took off the texture everything looked fine... I will see if I can do this tonight after school.

RavenOfCode
05-13-2015, 09:42 PM
As your world was very filled with code that was virtually useless to me, i decided to make a new world. (ie. your code would not work)

Here is the basic concepts to a working chutes/ladders type game.

I have only implmented this basics (ie. 1 ladder and movement of characters)

But the rest should be very easy to do but will take some time.

If you have questions feel free to ask.

Hope this helps you,
RavenOfCode

fourbros
05-13-2015, 10:13 PM
Your project sounds rather ambitious, but I'm pretty sure that you'd be the first person to make a board game on alice since I've been here. Good luck!

john316
05-14-2015, 09:39 AM
1. I want to say that you've saved my life.
2. You said '' But the rest should be very easy to do but will take some time.'' Trust me no I'm an idiot.

What I've done so far
1.Created corner Squares and used the same code that you implemented, but I'm having issues with that characters. They're still going off the board. The method has been called (EndAlwaysEvent#)

2. I have created chutes/ladders methods for both characters, however when the player is within the certain distance the method does not follow through for (player 2) in some cases player1 (tortoise). I looked through and I don't see a mistake. In some cases the corner square methods don't register.

When the world is opened you will see new squares. (They're in groups)
Square color key
Yellow=square 100
White=corner
Purple=Chutes
Green=Ladders
Cyan= curves in chutes.

I'm sorry for being annoying


As your world was very filled with code that was virtually useless to me, i decided to make a new world. (ie. your code would not work)

Here is the basic concepts to a working chutes/ladders type game.

I have only implmented this basics (ie. 1 ladder and movement of characters)

But the rest should be very easy to do but will take some time.

If you have questions feel free to ask.

Hope this helps you,
RavenOfCode

chickentree
05-14-2015, 01:32 PM
1. I want to say that you've saved my life.
2. You said '' But the rest should be very easy to do but will take some time.'' Trust me no I'm an idiot.

What I've done so far
1.Created corner Squares and used the same code that you implemented, but I'm having issues with that characters. They're still going off the board. The method has been called (EndAlwaysEvent#)

2. I have created chutes/ladders methods for both characters, however when the player is within the certain distance the method does not follow through for (player 2) in some cases player1 (tortoise). I looked through and I don't see a mistake. In some cases the corner square methods don't register.

When the world is opened you will see new squares. (They're in groups)
Square color key
Yellow=square 100
White=corner
Purple=Chutes
Green=Ladders
Cyan= curves in chutes.

I'm sorry for being annoying

Well I for one would accept large sums of untraceable money :)

You have a couple of problems with you events.
First any event that contains an infinite loop will never finish (unless you have purposely engineered a way around it)
Second, the "When the world starts" event will only happen once, at the start of the movie. Once the method is done it will not be started again through this event.
Three, There is no guarantee which of the "When the world starts" events will be called first, or in what order they will execute.

What I think you are after is something like this:
Event:
While Object is within 1 meter of end10
Before - method to make any preparations for the event
During - method to move the object or whatever.
End - method to perform any cleanup needed.
In a lot of cases you will only need to use the During method and the Begin and End will be blank.

This event will run continuously checking to the while part to see if it is true. If the while part is false it will not do anything except check to see if the while part has changed.
If at some point the object is within 1 meter of the target ( in this case end10) then the methods will be called.
Caveats:
1. Any infinite loop will halt the movie and probably end up crashing Alice.
2. At the end of the "During" method the while condition should, in most cases, be false. Otherwise the event will be triggered again.
3. At any time only one while event should be active (true).

Hope this helps
Mark

RavenOfCode
05-14-2015, 02:30 PM
Here was the problem
1. The boys methods for 'end' made it move from 10 every time i changed it to for each 'end' not just 10.

2. The boy player was not at the same start position as the tortoise player.

3. The cubes (chutes and ladders) were not on the same line.

What i mean by line is that cubes are not on the same 2d plane (as it is a 2d game) they must be on the same 2d line.

Heres a screenshot of what it looked like:
7119

Heres a screenshot of what it looks like after i fixed it:
7120


Hope this helps and good job with what you put in.

Test it out a bit more, then you can turn all the cubes invisible (use isShowing not opacity for a better effect) and your good. :)

RavenOfCode
05-14-2015, 02:52 PM
1. I want to say that you've saved my life.

...

I'm sorry for being annoying

Your not being annoying in any way, i enjoy helping people with alice projects, especially if they are willing to do work for their project (which you are). :)

john316
05-14-2015, 03:42 PM
So did you find out what the problem was? I looked carefully at the method and couldn't find anything. I'll reattach just in case.

RavenOfCode
05-14-2015, 03:47 PM
Here was the problem
1. The boys methods for 'end' made it move from 10 every time i changed it to for each 'end' not just 10.

2. The boy player was not at the same start position as the tortoise player.

3. The cubes (chutes and ladders) were not on the same line.

What i mean by line is that cubes are not on the same 2d plane (as it is a 2d game) they must be on the same 2d line.

Heres a screenshot of what it looked like:
7119

Heres a screenshot of what it looks like after i fixed it:
7120


Hope this helps and good job with what you put in.

Test it out a bit more, then you can turn all the cubes invisible (use isShowing not opacity for a better effect) and your good. :)

You must of missed this post (the original one has screenshots and world attached)... :)

john316
05-14-2015, 04:43 PM
Got it ! I'm looking through the bugs now. I've been fixing minor issues. Im still testing. Everything else seems to be working. I really appreciate it. I've never been so stuck doing an Alice program. I also accepted your friend request.

RavenOfCode
05-14-2015, 07:14 PM
Got it ! I'm looking through the bugs now. I've been fixing minor issues. Im still testing. Everything else seems to be working. I really appreciate it. I've never been so stuck doing an Alice program. I also accepted your friend request.

Glad youve gotten somewere :) always remember to test... or you will find alot of bugs, if you want when you think your done i could have a look at it and test it. :)

john316
05-15-2015, 09:50 AM
I tested everything just one error. The corner squares. They still go off the board for example Sq 40 and 80. I tried looking through for all. If you could please look through it ?



Glad youve gotten somewere :) always remember to test... or you will find alot of bugs, if you want when you think your done i could have a look at it and test it. :)

RavenOfCode
05-15-2015, 03:13 PM
I tested everything just one error. The corner squares. They still go off the board for example Sq 40 and 80. I tried looking through for all. If you could please look through it ?

Here you go, you had one chute (47-26) that was messed up, fixed that for you. Also the reason 40 and 80 were not working was they were to far into the gameboard and not within 1 meter of the playing surface (ie. were the players are).

Good job on this project, all you needed was a bit of guidance (like 20 likes of code) and you made it work.