Features Beyond Tutorial?

39 views
Skip to first unread message

rubenrp

unread,
Dec 21, 2010, 5:58:27 AM12/21/10
to Google Breadcrumb Developers
What other features does Breadcrumb have beyond those featured in the
tutorial? For instance:
- Is it possible to create a score for a player, based upon their
choices?
- Are there conditional features built into the language? (e.g., if
player has already visited room 1, then this choice leads to room 2,
otherwise it leads to room 3)

Adam Blinkinsop

unread,
Dec 21, 2010, 1:20:06 PM12/21/10
to google-brea...@googlegroups.com
It's an interesting question, considering Breadcrumb sits on top of HTML
and Javascript, giving you pretty much the full power of both.

Create a score for a player? Just set a Javascript variable and change it
over time:

(1: score = 5) Hello, world! [Points get!](2: score = score + 1)

(2) You have <%= score %> points!

Conditional features? Of course! (At least, this _should_ work...)

(1: so = false) Have you been here [before](?: if (so) { goto('2'); } else
{ goto('3') })?

Willem Karssenberg

unread,
Jan 3, 2011, 11:54:32 AM1/3/11
to google-brea...@googlegroups.com
This could be interesting if it works.
Do you have a live working example of this code?

Copy and pasting this code did not work with me...

Willem Karssenberg

unread,
Jan 4, 2011, 5:46:15 PM1/4/11
to google-brea...@googlegroups.com
Thanks for the code!
Finally I got the counting points part working on:
(sorry it's in Dutch)

One could easily use this in some sort of game!
There should be more examples like this available to help people start coding.
Since my blogpost about Breadcrumb some students in Dutch schools are working on this already!


Matt B

unread,
Feb 1, 2011, 11:02:55 AM2/1/11
to Google Breadcrumb Developers
Here's the text for a little example I created. Haven't added the
conditionals or anything at this point however goes to show how we can
impliment more than just a score (yes, I realize it's not a real
'inventory' yet at this point but that could be expanded on to create
more indepth objects).

(1: inventory = new Array(), has = 0)You Currently have <%= inventory
%> [proceed](2).

(2) Ooo what's this? [Pick up stick](2: inventory.push("stick"), has =
1 ) [proceed](3)

(3) Now you have "<%= inventory %>" and has is: <%= has %> [proceed]
(4).

(4) Darn Stick! [Break stick](5: if(inventory.length)
{inventory.pop()})

(5) That stick was pretty useless anyways.
You now have: "<%= inventory %>"


Try picking up more than one stick. Or no sticks. One thing I'm still
trying to decide on is how to make text appear conditionally. Though I
think I have a couple ideas.

Matt


On Jan 4, 6:46 pm, Willem Karssenberg <w.karssenb...@gmail.com> wrote:
> Thanks for the code!
> Finally I got the counting points part working on:http://breadcrumb.googlelabs.com/read?id=ag5nbGFiczIwLXBhdmxvdnIOCxIF...
Reply all
Reply to author
Forward
0 new messages