Level: Steering the Steers

This level is not quite ready for prime-time yet, but I’d appreciate some feedback on it.

In particular, I’d be interested if anyone is able to get a “Success” result using a strategy that shouldn’t work. The level just requires surviving for 60 seconds to get a “success”, so I need to know if there’s some way to luck the cows into a path that manages to avoid the farms for long enough that the level ends successfully without the player actually providing a real solution.

Thanks for taking a look!

I won by simply moving to the nearest cow all the time. I am not sure if this counts as a strategy that shouldn’t work. Since it took 1 min to write the code it felt a bit like cheating

This is a really cool level , I think you should make each cow move in a random direction and reduce their speeds.ANd like @Hanspagh said you can win this level by just following the nearest cow

Hmm, that’s what I was afraid of as far as solving the level by just following the nearest cow. I’m going to have to rethink this a bit. Thanks for the feedback.

For my seed, following the nearest cow doesn’t work–it does drive them into the rightmost farm. However, the level only ends in failure the second time they eat that farm.

Don’t know if I just got “lucky”, but for my seed I hadn’t had to move at all to win :smiley: Cool idea though :wink:

I tried it - looked at it it ran first time and gave me a sucess message

@DaFreeLum @hKaspy @DollarAkshay @Hanspagh I’ve added some additional farms, so it should be a little harder to succeed by luck. Could you take another look? Thanks!

@nick I think there’s either a bounding box issue with the farms, or else something is wrong with how the “Keep All away from locations” goal is being handled. Should the bounding box be the physical width and height?

Fun to resolve.
Not sure what you expect people to do or learned with this level.
The difficulties seems to me:

  • handle a loop to calculate the distances
  • calculate the x y to move.

Maybe it could help to display in the available sorts the for loop.
It could help also to explain how to get x and y (pos.x and pos.y). It works for both cow and farm.

Last remark : the way you store the farms do not help people to put them in an array, and then use a loop. Maybe you could directly provide them in an array (too easy ?), or better to provide a method to get all farms, as you can have a list of all enemies in some levels.

I won simply by moving on to farm 2.

I think the cows should be motivated to head towards farms

it could be made a bit harder by making the player move slower, or a much bigger map with more farms

I agree with Vettax. Would be nice to be able to use this.getByType to get an array of all the farms and an array of all the cows. With the currently available functions it is difficult to figure out what direction the cows are moving and thus to figure out which farm to protect.

But the level is easy enough:


@Vettax @dwhittaker OK, I’ve converted to using this.getFarms() and this.getCows(), and included some additional example code. Let me know if you think it could still be made better.

Edit: Correction, use this.getByType(‘farm’) and this.getByType(‘cow’)

@Frazer Yeah, it does look like just moving to Farm 2 will solve the level. I’ll work on that.

@Frazer @dwhittaker OK, I’ve added a very slight desire for the cows to go towards the farms (tried to make it pretty subtle). That should remove the ability to just park on top of Farm 2 to win the level. Let me know if you still have a magic spot to stand to win the level trivially.

this.getByType(‘farm’) works great. No more getNearest ?
The result, at least with my solution, is better. cows path is nicer.
I don’t restart the level completely, so maybe I didn’t see you’re examples. But there is still nothing in the guide.
I only handle cow[0] and it works fine. So for me, one cow, or more, it’s the same. But it’s not necessarily a problem.

@Vettax Yes, the new default code includes examples of everything. I’ll eventually put something in the guide.