Code challengers

@Dravin @kenobi

I was thinking of making a challenge where a bot helicopter is flying across the screen and has to land on a flat ground surface.
The ground would be randomly generated, so some parts are flat,a little bumpy, or largely bumpy or tilting on an angle.

The challenge would be to code so the helicopter can detect the closest flat ground and land on it.
This can be done using Ready code and allowing a user to add extra sprites to use.
(no code is allowed to change the random ground generation or add extra ground sprites)

If i make the project with ground random code and add the helicopter with physics would you like to try this challenge.?

I haven’t tried coding this yet.
On a chosen day we could all upload our projects and compare what solutions each of us came up with.
So please reply back soon.

I was inspired after watching this video of an autonomous passenger drone.

3 Likes

I would be interested in this :slight_smile: I would just have to find time for it

3 Likes

I understand.
I’ll wait to see if @kenobi replies back.
I could place a 1 month time to upoad a project.

3 Likes

Let’s do it!! I have a four day weekend coming up

2 Likes

Great.
I’ll post the link for the starter project tomorrow on this topic.
We’ll each post a link to our projects with solutions at the end of this month. I 'd like to make a rule that only a maximum of 6 extra sprites can be added by the user and the sprites can’t be bigger than the copter.
@Dravin
Tagging you as well.

2 Likes

This sounds fun! I was going to ask if I can play too, but I have the same availability problem as @Dravin :stuck_out_tongue:

4 Likes

I’ll be posting the project on friday

4 Likes

So here’s the rules.The challenge is to have the pink square only land on a flat green land at least as long as the pink squares width, with little or no empty spaces beneath the pink square.
A user can add a maximum of 6 extra sprites.
No code is allowed to affect the ground creation code or create more ground.
Tap the pink square to make it start moving left.
When you are ready for the pink square to land, set the variable FLY to 1
No code or behaviour is allowed to change/control the movement of the pink square, other than changing the FLY variable.
The pink square is allowed to touch any sprites.
Once the pink square starts moving, the user isn’t allowed to touch the screen until the pink square lands or flies off screen.
A user can add any extra variables if they want to, as long as rhey don’t change the land or pink square creation/movement
Your code must in some way detect the flat ground for the box to land on
You’re not allowed to manually choose an area for the box to land, like dragging a sprite to the flat area, then changing FLY to 1 when the box touches or is near the sprite.
Lets set a time at the end of october to upload our projects with solutions.
@auntiel @kenobi @Dravin

https://ready.app.link/jkRbORTXG0

Please reply back if you will get involved takiing up this challenge.

4 Likes

I can’t wait to get started on this after work

4 Likes

me too, it looks super fun! Thanks for inviting me, @Suzzy-Grey! :slight_smile:

I do have an extra packed schedule and low availability for the next several months, but I plan on participating :heart_eyes:

4 Likes

Hi @Suzzy-Grey, I started playing with the challenge over my lunch hour and noticed a problem. The condition “sensing/collided with object” in the event “box finish landing” seems to be not working. This seemed really odd so I tried isolating the use case in a separate project and got the same result (tap the small square to make it start moving downwards).

https://ready.app.link/Zb7ekI75F0

Any ideas? Is this a bug in ready? Or am I just brain-freezing?

edit: or is figuring it out part of the challenge? :upside_down_face:

edit 2: d’oh! got it now :crazy_face:

3 Likes

Thank you @Suzzy-Grey for the competition.

To make things fun, @Ready- can we have a “Competitions” category for forum competitions?

I’ll get to starting this soon. End of October is good timing for me

I’m kind of confused. Can you explain the main objective in a different way? Everything else is fine

2 Likes

@Dravin, my understanding of the objective is that the pink square must land in a spot where its entire width (or nearly all of it) is touching the tops of the green landing planks. In other words, our code is to detect a region where several adjacent green planks are at the same Y value, and have the box land there.

4 Likes

Yes, that’s correct.
@auntiel @Dravin @kenobi
Thanks for trying this challenge.

@auntiel @Dravin @kenobi
Please turn SOLID off for the pink square in your projects/remix
This is needed so the box stops falling when touching the ground.
You are allowed to increase rhe speed the box moves left and down

4 Likes

@Suzzy-Grey I figured that out about the solid (see my second edit lol). I knew that use case rang a bell, then I found it in one of my old projects. Also, thanks for the tip about the box speed.

I have tried several ideas already but none of them worked properly. I have a few more ideas to try. This is so tricky in Ready and would be so easy with code - it feels a little like the software development version of the game Taboo! It’s fun! :smiley:

3 Likes

@auntiel @Dravin @kenobi
Please use the link by @auntiel made to make your project if you haven’t dowloaded it yet.
I finished my project and it will show if you click the original link.

I thought this would be difficult.
It depends how accurate you want to be/code.
I coded to be very accurate and the Box couldn’t land, so i had to be less strict on the conditions.
Good luck @auntiel

3 Likes

Here’s my copy of the original if anyone needs it. (The other one I posted was a separate very simple project.)

https://ready.app.link/jkRbORTXG0

edit: fixed typo

3 Likes

Thanks. Luckily my finished project didn’t show on the link but the original.
I wasn’t sure if i saved my project it would replace the original projects code, because my edited project isn’t labelled as a REMIX by the Ready app.

3 Likes

Haha I guess that’s my problem. I’ve been trying the same approach - drop a plumb line and look for a flat region wide enough for the flying box to fit, but probably I’ve been trying for too much accuracy. Well done, @Suzzy-Grey! You’re a real wiz! :+1:

3 Likes

You haven’t seen my code/solution yet.
You and the other 2 users could have come up with better ideas than what i coded.

3 Likes