Continuous Alchemy feedback


#1
  1. The win is too easy - involves maybe 1-2 lines of code. While I like the examples of “continue” and had not really used it myself in my code previously, this level feels a little light on substance. As a minimum, remove the movement codes.

  2. Currently, you can win by just commenting out the code which summons the potions. You need to add a victory condition that you summon at least __ potions.

  3. Please consider correcting the english in the summon potions command - maybe to something like “Please give me a potion.” For better or worse, the word “gimme” shouldn’t be in a teaching game if we can avoid it (and we can).

  4. Summoned human troops (other than peasants) can sit on top of the potions without causing them to be drunk. They can also sit on top of the munchkin’s spawn point and just slaughter them. I can call for all the potions I want while the munchkins are dead and not drink a single one. Suggestion: human troops (soldiers on up) should be able to drink potions.

  5. Bug - it is very possible to end up with a stack of potions - some healing, some poison, even if you check to make sure there is no item prior to calling for a new one. I suspect it is because I’m calling for multiple potions during the delay prior to the potion showing up.

  6. Odd editing bug - adding lines of code via a hard return does not have the usual anticipated result. You have to go to the preceeding line and hit return in order to add a line … (python)

Suggestions for changes:
A. Add additional munchkins so there are at least 2 up at any given time (i.e. 1-3) and change the ogre’s logic code as follows:
(i) munchkins can spawn anywhere on the level
(ii) If there is an item, the ogre moves to the closest item, ignoring the hero and potion maker.
(ii) If there is not an item, the ogres attack the closest human (i.e. the hero, potion maker or summoned troops).
That way, they are no longer retreating to their corner … and they can come after you even as they die from the poison.

B. Add additional targets where the potion could be thrown.

C. Spawn multiple potions - 2 poison and 1 healing each time for example.

D. Hero and potion maker surviving should also be a victory condition. Given that it is also possible to park a suicidal peasant on the potion point (and have that peasant drink everything), the additional victory condition should probably be that all humans and the hero survive. [And that could add a level of strategy in that wounded soldiers can be sent to pick up a heal potion in order for them to survive…]

E. Make the base ogre summoned a bit tougher than munchkins … maybe even regular ogres which blow up into Brawlers?


#2

Fantastic assessment!

I just completed it myself on my first Javascript run-through. I originally played on Lua, which lacks a continue statement, so this was a great primer to continue statements. On that note, this level may need to be excluded from Lua playthroughs for the aforementioned reason.

I do agree with your point one especially, and would suggest that the sample code give fewer working examples of continue statements than it makes the player write themselves. So, if there end up being 5 continue statements in the working code, only provide two as examples. Two out of three currently seems a bit excessive.


#3

I agree with your points 1, 2, 3 and 5. The other “suggestions for changes” seem out of place: the level is focused on teaching the continue keyword, so the actual goal of the level is to get the player to understand, think and write a condition that uses the continue flow of control. Less is more. Making the level harder would only blur the player’s attention and remove the focus from the level’s actual goal.

That said, I’ve also got a couple suggestions:

  • The comments could have a space between the comment start token and the text. Right now they read:
#Like this in python
//and this in JavaScript

Please add a space between the comment start token and the text to make it more legible:

# Like this in python
// and this in JavaScript

I believe this is the standard code style used in the remaining levels as well.


  • Another point, I believe the current description of the continue statement is unclear or confusing (at least for me): “However, unlike break, the cycle of loop begins.”

Perhaps something in the line of:

  • However, unlike break, the loop cycle continues and jumps to the next iteration

I believe there is still room for improvement.


#4

The level can be beaten by using no code at all.


#5

Actually, the player can go to the munchkins’ spawnpoint and kill them 1 by 1 without taking any potion, or also not asking any potion. So, as Msakr suggested, you should maybe do a change in the level, but there’s not only the number of potions summoned which can be put as a winning condition : you can also make the alchemist throw potions even if you’re not asking for them. In that case, if a munchkin take the healing potion, he will kill you, like he does actually when you don’t take the healing potion.

Except for that and some points mentionned above, this level is well-done and is a good lesson for the “continue” command.


#6

We went through and updated the level to better handle your concerns. Please give it another play through (be sure to fully reload the sample code) and put your concerns here.


#7

Well, now the continuous loss of health force us to take the “water”, the code is less filled in order to make the player code a minimum in the level, and the “Gimme” has been replaced by a “Give me”. It’s a 9 out of 10 (just because nothing is perfect :wink: ).


#8

Also, if you want, I can make you a french translation of the level (by that, I mean the translation of the comments). Ask if you want me (or someone else) to do it.


#9

Managed to pick up all water before Munckins, and I get “drink water to survive” marked green, but still it says “run out of time” and level is still marked as not pased?

Other wise I realy like this level, “continue” coman gives me few ideas.

Thank


#10

Odd … even though the goal I could see was check marked green, I got a “ran out of time” response as well. [After the latest change, the good news is that this problem has been resolved.]

One additional point - there is actually no need to interact with the enemy as this is currently set up. There is actually no real need for a “continue” as well. Of course, with my glasses, I had to re-write the code for “item” … but after that, the loop ended up executing a single “if” statement with no reference to “enemy”:

    if not item:
        self.say ... 
    elif item.type != "poison":
        self.moveXY ... 
        self.moveXY ...

#11

I’ve updated the goals to fix the ‘run out of time’ problem. Keep the feedback coming.


#12

The level looks now much more “mature”. Well done!


#13

It still could be improved. As of now, you can still kill Omarn, but his ghost continues to throw potions on the X. Better to make the player fail if any humans die.


#14

I am at that level now…and maybe it is my own fault, for being a total beginner…
But how to you “check” whether the potion is water or poison?
Am I supposed to ask the alchemist? Does it show while I find the Item?

I really tried to figure it out, but for me, a absolute programming newbie, it is just a puzzle on how I would get to know the item’s type.:frowning:


#15

You use item.type. You check if the item.type is not "poison".


#16

Yeah, I tried that yet, though I don’t know how I tell my hero to " check" things…
I can find things, I can move to things, I can detect the distance to things, I can say messages and so on…

But how do I tell my hero that he is supposed to check the type of an item? I tried different things and apparently “item.type” is somehow unknown?


#17

You can check an item’s property in the same way you check your own position.

//First check if the item exists:
if(item) {
    //Check if the item's type is poison.
    if(item.type == "potion") {
        //Drink this!
    } else {
        //So what type is it? Let's do some debugging by saying the item property:
        this.say(item.type);
    }
}

#18

Ahhhhh thank you sooo much. I tried exactly that code yet… except not using two “==” … ^^
Sorry XD


#19

I updated and clarified the guide with the property they should be monitoring.

The level now ends if Omarn dies, and, his ghost doesn’t send out potions anymore.