No Control by mosaic

Code your own controls. Hey, less work for me!
Play a triangle (let's be honest, nobody likes graphics) thats trying not to be obliterated by the evil red squares.
No controls for you at the beginning. I will give you three minutes to figure out something clever. Of course you can also change your code later. If you can type fast enough.

//Instructions (also available ingame)
0 // HAPPY CODING!
1
2 // List of essential commands:
3 // st a 0 - Store 0 in a!
4 // add a 0 - Add 0 to a!
5 // jmp 0
6 // - Jump to line 0 in Code!
7 // jpcom a b
8 // - if a == b:
9 // Jump 1 line forwards
10 // - if a > b:
11 // Jump 2 lines forwards
12 // - if a < b:
13 // Jump 3 lines forwards
14
15 // List of commands:
16 // step - Step forwards!
17 // turnLeft - Turn left!
18 // turnRight - Turn right!
19
20 // For example:
21 // Step forward when A pressed.
22 //#A#
23 //step

Known issues:
lines disclosures are buggy (fix: click to the right of them)
code overflows
| Youtube | https://mosaicdev.itch.io/no-control |
| Original URL | https://ldjam.com/events/ludum-dare/45/no-control |
Ratings
| Overall | 226th | 3.475⭐ | 22🧑⚖️ |
| Fun | 250th | 3.225⭐ | 22🧑⚖️ |
| Innovation | 34th | 4.05⭐ | 22🧑⚖️ |
| Theme | 64th | 4.025⭐ | 22🧑⚖️ |
| Graphics | 250th | 3.3⭐ | 22🧑⚖️ |
| Audio | 262th | 2.944⭐ | 20🧑⚖️ |
| Humor | 235th | 2.528⭐ | 20🧑⚖️ |
| Mood | 248th | 3.158⭐ | 21🧑⚖️ |
| Given | 19🗳️ | 19🗨️ |
But some DBG-tools could help.
Thanks for your feedback! A simple strategy for having a positive score I used when testing is having a button which makes you go three steps. Tutorials always were and always will be my weakness :)
@despdair
I thought about only using the 'commands' (step, turnLeft, turnRight), because these are really all you need. I just added the 'essential commands' (no idea why I called the bonus commands essential) for an extra dimension, because I thought it was a bit boring with just three commands. So now its kind of similar to machine language. As I said, nobody has to use them, but you can make loops and so on (as demonstrated in the menu) with them.
**If anyone has trouble with the commands, read what I just wrote to despdair.**
@nikita-demidov I agree and I considered it, but no time. If I ever come back to this game, this will definitly be one of the first things on my to-do list.
But it's a fun and very clever entry overall, just could be a little simpler ^^
The line numbers need fixing. They shouldn't be part of the same text field as the code. Put them in another not-editable text field on the side and make sure they line up correctly (with appropriate line wrap).
Maybe jumping to line numbers could be removed entirely because it's not done much in practice.
And the rotations seem flipped.
The script I ended up with:
```
#A# // Slide up.
turnRight
step
turnLeft
#B# // Slide down.
turnLeft
step
turnRight
// Step forward 1, 2, 3, 4.
#C#
step
#B#
step
step
#D#
step
step
step
#F#
step
step
step
step
```
Possible extensions:
* _Must_ fix the line numbers
* Highlight parsing errors (better UX)
* Allow scrolling the editor
* Consider removing the warped graphics around the editor for visibility
* Add functions (better than goto line)
* Add API with functions for detecting obstacles -- allows users to implement more advanced tactics
* Consider more traditional coding syntax and keywords. (e.g. skipping letters in symbols like `st` and `jmp` doesn't help much with developer experience)
A power-user strategy would be to implement a script with pathfinding that plays everything for them, but we don't have the API for that.
The script looks good. Better than mine for testing :). What was your score?
```
#A#
step
#B#
turnLeft
#C#
step
step
step
```
(my testing script)
The line numbers are really annoying, I know. I nearly wasted the whole first day on them and they are not what I hoped for.
Scrolling in the editor should be supported, that's why I got these in-text-field line numbers in the first place; I just couldn't get the scrolling to work right.
YES, detecting obstacles, that was my next big goal. Unfortunatly, no time.
I used `st` and `jmp` because I thought it would make it more similar to assembly language and I honestly didn't want to programm a whole complier. You are of course right nonetheless. It would have turned out way better with functions, error highlighting, better syntax and all that good stuff.
Maybe I'll make a post-jam version when I find time and then your suggestions are definetly in there.
When I saw the prompt, I thought it would be a more direct puzzle game- something like "here's a set path you need to execute", but this caught me off guard and was pretty neat.
My biggest complaint was that losing causes you to reset completely, when you really just want to iterate on the code you made last time- so I think not resetting the script every playthrough would be a nice move.
The fact that you added things well beyond the basic movement was also really cool, but I think difficult to convey to people unfamiliar with this level of coding.
Perhaps a series of levels that show you how they can be used would be beneficial? Although, then we're probably getting into the memorization puzzle thing I mentioned before.
The presentation was also really clean looking, although it was a bit unclear at first.
I couldn't figure out how to start the game, and when I first saw the button correspondence I tried to hit buttons on my keyboard rather than the onscreen ones, something that I think a little bit of walkthrough would also have made clear.
Still, for a compo game? This is hella cool. Awesome work!
I actually considered having the button functionality linked with the keyboard, but then I was too lazy :P
Happy you liked it.
@envy-softworks No problem;
All in all, just assigning basic control logic yourself does fit the theme.
Maybe you can turn this concept into a full game, possibly with a simpler user interface (like link buttons to controllable things and pick actions).
Good job.