Coding Task - 23 April 2012 - Make a Jetpack

As a republican with a small ‘r’ I cannot abide royalty. I also find most cakes absolutely delicious. Unfortunately, all the best desserts are made in celebration of some royal figure or wedding (Victoria Sponge, for one). Thus, for any given cake I may both absolutely detest it and absolutely love it, at the same time. This is the Battenburg Indeterminacy Principle.

Well, there’s definitely been a lot of plagiarism throughout the history of physics. In fact, Galileo Galilei, Alexander Fleming, Alexander Graham Bell, Albert Einstein, Thomas Edison and Sam Loyd have all taken credit for something that they did not invent or create.

:laughing: breaks into wild applause

Is that space invaders by any chance?

Yeah, you caught me out there. I made a room generating code for that. You didn’t expect me to do it all manually did you? :slight_smile:

Like this? I guess I could. I did put some thought into that, but having the actual rooms meant I could use the built in code to say how far you are from the docking station and which direction it is in.

That would make it more complex to code, although I guess it could be done.

As for Tanga’s broomstick game:

The creating of the broom handle needs to be bi-directional:

Combining objects with string is mechanically very fiddly, and your interpretation goes a long way to ameliorating much of that fiddliness (but I do note many of the dreaded excess-line breaks!). The similar string dynamics in Mammal were definitely the weak point of that game. Another way to combine things is to use a table of combinable objects, but then you don’t have the joy of yanking things on leads and so on.

Some of the code didn’t work exactly how you want it to. This:

Instead of attacking the witch finder: if the witch finder is normal: say "You swoop towards him but he ducks. As he stands he begins to shake, but not with fear. With anger. Oh, oh. Maybe that wasn't such a good idea."; now the witch finder is angry; if the witch finder is angry: say "He seems on his guard. Perhaps you'd better leave."; stop the action.
Gives the result:

Giving the secondary message after the first. This is because your instead rule runs through both section, with both firing. What you want is to throw an ‘otherwise’ in there, like so:

Instead of attacking the witch finder: if the witch finder is normal: say "You swoop towards him but he ducks. As he stands he begins to shake, but not with fear. With anger. Oh, oh. Maybe that wasn't such a good idea."; now the witch finder is angry; otherwise if the witch finder is angry: say "He seems on his guard. Perhaps you'd better leave."; stop the action.

Of course, I’d use check/carry/report rules nowadays rather than instead rules, but in general if something works in all ways that you want it to work, it doesn’t really matter how you do it!

No, it was an arcade game called Asteroids which (implausibly) had natural deceleration in space.

I refuse to play another Charlie the Spiffy game, so I’ll just assume that that’s what I had in mind. I guess in many ways, having the physical rooms makes things easier, and as you used a program to create them, it’s not really so much of a bother. Depending on your model of space, if you’re using the finite-but-unbounded paradigm, you could conceivable have a finite number of rooms that loop back round. I don’t know if that’s the current vogue in science, but it was at the time of Arthur Eddington, who I take as the last word on all things astrophysical.

Tanga, I haven’t had a chance to look at the code, but I played around with the game for a short while.

After a few (unsuccessful) attempts to do something with the pallet, I just tried walking through the window – and it let me do so. Evidently, I was flying on the brromstick, but when I tried to examine the broomstick I was told that I saw no such thing. I then moved again (I think it was to the east) and was told that I escaped and the game ended.

All of this makes me wonder whether the game somehow allowed me to do things that I shouldn’t have been able to do that easily.

Robert Rothman

So I made a free-falling jetpack game that simulates real physics!

You can play it and read the source code here. There are a number of issues with the game, which I’ve commented on in the source. If anyone could give me advice on these matters, I’m sure we’d all come away a little smarter.

Suggestion for next exercise: Mischievous Gibbon.

How much can one do with a simulation of a historian of ancient Rome? :slight_smile:

Robert Rothman

Lots, it turns out:

(Okay, this is really just a tangential excuse for me to post that link, because it is AWESOME.)

That’s soooooooooooooo cool. I’ve definitely just recommended it to my ancient history friends. But uh, way to bring things off topic Emily.

Very mischievous!

Is that the same as the string dynamics in Calm where you can combine items to make a fishing pole? That seemed to work pretty well.

You can see this in “Example 416 - What Makes You Tick” in the Inform 7 Documentation.

I don’t think that’s a Charlie the Spiffy game considering that Charlie the Spiffy gave the game a one star rating and called it boring.

That is really good! Funilly enough, I actually seem to recognise some of the ancient names of the gaulish cities. Ita diis placuit.

Plus, the History of Rome and the Roman Empire is actually very interesting, especially how after a long struggle the romans managed to conquer the ancient gauls and how one small village managed to hold out against the invaders.

For some reason, I can’t get to work properly. I choose the starting and ending cities and select a month; beyond that, it won’t accept any other input and nothing happens. What am I doing wrong?

Robert Rothman

That’s what he wants you to think! It’s hosted at Spiffy Games for glob’s sake!

Uh, did you press the ‘calculate route’ button? Otherwise, maybe it could be a browser issue?

I don’t see a “calculate route” button. I’m using IE8. [Ducking to avoid the rotten vegetables being lobbed in my direction.]

Robert Rothman

See image attached. (But I’m using Opera, a real browser :smiley: )

Obviously something is seriously wrong. I don’t get the map or most of the other stuff. Basically, a few lines of the input area on the top right (not inlcuding the calculate route button) appear on my screen, but they appear on the top left. Everything else is totally blank.

I don’t get it. Granted that Microsoft is a really lousy company, the fact remains that their browser is probably the most popular one in use (at least among the less technically savvy, who tend to play it safe and stick with what came pre-loaded on our computers). It seems odd that things like this are not designed to work with a browser that has so many people using it.

Robert Rothman

Maybe, but it’s the concept I was referring to. Oh all right, I’ll give another example. How about the moral maze in The Chinese Room? You can keep going infinitely in any direction. In fact, it probably even uses the same code as The Road That Goes East Forever!

Nope. Not a browser issue!