Brainfuck: The Game by PotatoIng_

[raw]
made by PotatoIng_ for LD36 (COMPO)
Quick, get back to your computer!
Oh, you forgot why?
You're a programmer and need to finish levels, with the Acient Technology of Brainfuck!

Main game features:
-Learn programming language Brainfuck the fun way!!
-Improve your logical thinking!!
-Get creative with solving Brainfuck challanges in the most optimal way possible!!
-Use debug mode to find errors in your programs!!
-Cry a bit, because the default font is Comic Sans..
-And much more!!

---------------

These great resources help you learn Brainfuck, in under 5 minutes, if you don't understand the in-game tutorial:
https://learnxinyminutes.com/docs/brainfuck/
https://esolangs.org/wiki/Hello_world_program_in_esoteric_languages
https://en.wikipedia.org/wiki/Brainfuck

Stuck on a level? No problem! Download save files from:
https://drive.google.com/open?id=0B7AV-TpUIxQEc3ZZUEw3RnpqaWc
(Put the extracted folder next to your BrainfuckTheGame.jar file.)

Found a bug? Please let me know in the ludum dare comments or tweet me @PotatoIng_.

Game inspired by Tis-100 and Human Resource Machine.

Game requires Java to run (non Java version coming soon)!

Own summary:
This is the first time I was working with GUI in java and I learned quite a bit. Sadly, there are still a few bugs and some unfinished features, because I ran out of time. However it was really fun to experiment with brainfuck and really fun to program this game, so I'll be making a post-compo version. If you're interested, follow me on twitter (@PotatoIng_) for updates. I hope you'll enjoy playing this game as much as I do. :)

Feedback

Teekeks
29. Aug 2016 路 01:03 UTC
But why brainfuck D: Hard stuff!
馃帳 PotatoIng_
29. Aug 2016 路 01:07 UTC
@Teekeks Sorry for that:(. But i promise you, that it takes under 5 minutes to learn and it's really fun once you get into it!:3
crazyrems
29. Aug 2016 路 01:42 UTC
I never used brainfuck. I can't tell that anymore :).
MaTeX-7seven
29. Aug 2016 路 02:01 UTC
Hahah finally got a chance to test out this so popular brainfuck XD nice work
BurntFeelings
29. Aug 2016 路 02:24 UTC
Hahaha what is this ? :D
Gray Sullivan
29. Aug 2016 路 02:34 UTC
Hard as hell but clever and cool!
KevKevOnFire
29. Aug 2016 路 02:39 UTC
I would've really liked this, first few levels were pretty neat with some clever ways to cheese them available. Unfortunately bugs left it unplayable for me a few levels in :(
dwhiffing
29. Aug 2016 路 03:10 UTC
Pretty awesome idea! Too hard for me right now, but I'll definitely try again later :) Nice work
Flatgub
29. Aug 2016 路 03:44 UTC
Wow O_O
This is by far one of the most unique programming games I've ever played. And on top of that, I've now learned brainfuck which is cool! I doubt I'll ever finish this game because I'm struggling with even level 2 ><
Azlen
29. Aug 2016 路 03:56 UTC
That's really cool! I managed to complete a few levels. Brainfuck and Comic Sans are not a good combination!
馃帳 PotatoIng_
29. Aug 2016 路 04:49 UTC
@crazyrems I hope you enojyed it! You can now put brainfuck on your resumee:).
馃帳 PotatoIng_
29. Aug 2016 路 04:50 UTC
@MaTeX-7seven Glad I could have been the one, that made you try:). Thank you for the positive comment!
馃帳 PotatoIng_
29. Aug 2016 路 04:51 UTC
@BurntFeelings brainfuck is an actual programming language. And it's really funto program in! I suggest you to look into it:)
馃帳 PotatoIng_
29. Aug 2016 路 04:52 UTC
@Gray Sullivan ( @graysullivan ). Thank you very much for the positive comment! I tried to make the difficulty scailing, but there's only so much you can program in Brainfuck:D
馃帳 PotatoIng_
29. Aug 2016 路 04:53 UTC
Tahnk you:3. That's kinda sad to hear:(. What kind of bugs? If you report them here, I can try and fix them:))
馃帳 PotatoIng_
29. Aug 2016 路 04:53 UTC
@KevKevOnFire Tahnk you:3. That's kinda sad to hear:(. What kind of bugs? If you report them here, I can try and fix them:))

Oops, forgot to mention name:0
馃帳 PotatoIng_
29. Aug 2016 路 04:54 UTC
@dwhiffing after two full days of coding, there's nothing better to do than to code:D. Thank you very much, I hope you'll have a blast playing, once you do!:3
馃帳 PotatoIng_
29. Aug 2016 路 04:55 UTC
@Flatgub Level 2 is a bit long:0. But after finnishing it, you can put brainfuck on your resumee!:).

Also, thank you very much! It's so awesome to hear this! x3
馃帳 PotatoIng_
29. Aug 2016 路 04:56 UTC
@Azlen I made brainfuck, even more brainfucky ;). Thank you for the positive comment! :33
Paximillian
29. Aug 2016 路 05:24 UTC
Ah, I've always heard tales of Brainfuck, but never actually got into it.
It's basically a turing machine lol

Anyway, lots of bugs, but thank you for exposing us to this hell of a language haha
馃帳 PotatoIng_
29. Aug 2016 路 05:36 UTC
@Paximillian sadly there are a few bugs. If you could mention any, that bugged you the most?:0

Also, thanks for the review:) Brainfuk is really fun and it's amazing to see what people can create with it, even if it's just a turning machine:D.
danilafe
29. Aug 2016 路 05:37 UTC
Am I really seeing comic sans? Woah there, man.
Love the hint on the first level.
Couldn't be bothered to learn brainfuck to play, but the concept is definitely very nice.
馃帳 PotatoIng_
29. Aug 2016 路 05:44 UTC
@danilafe sorry for that:D. I can see, why you wouldn't want to learn brainfuck:). Thank you :)
Bogden
29. Aug 2016 路 05:56 UTC
Thanks for this first intro into brainfuck. Neat progression of levels, and good that they gradually incorporate previous solutions.
馃帳 PotatoIng_
29. Aug 2016 路 06:00 UTC
@Bogden Intro was mostly just copied from a website, but you're welcome:). I tried to make the difficulty scale up:0. Hope you understood brainfuck and ejnoyed the game! Thank you, for the review:3
eevee
29. Aug 2016 路 06:17 UTC
FINALLY, someone has gamified Brainfuck. Bless you.

Putting "Hello world" as level 1 seems kind of intense, especially when level 2 is merely clearing a cell. :)

This is a perfect game jam concept: you can't really go much further with it without just becoming "write software in Brainfuck", which nobody really wants to do. But what's there is enough to be entertaining for a few minutes.
馃帳 PotatoIng_
29. Aug 2016 路 06:27 UTC
@eevee thank you very much for the kind comment!

I was justifying putting Hello World program first, as, that it doesn't require thinking - unlike clearing a cell:).

There are still some features I wanted to add - perhaps make it seem, like you're typing into a console - to make it look even more game like and less like a "write braifuck software" app. I'm glad this did the effect for you and that you seem to have enjoyed it!:)
Ghen
29. Aug 2016 路 07:23 UTC
i heard brainfuck programming a while ago, never really look it up, but holy mother of god....its no make sense lol xD
i'm really glad that you made a game out of it, at least now i can say "i already try brainfuck" lol
peterthehe
29. Aug 2016 路 07:59 UTC
A very clear tutorial - infinitely better than many of those online. Very much well done. If there were a ratings system, this would be pretty high up for me.
CptBubbles
29. Aug 2016 路 08:23 UTC
This is pretty fun and a nice way to learn a useless language! :)
I noticed a bug on Linux though: If a cell is over 2 digits long, it isn't fully displayed (just one digit plus "...") which can be a problem.

Other than that, great job!
tomisoka
29. Aug 2016 路 09:53 UTC
Nice game!
I found a bug on Linux. Any text that doesn't fit in the window is displayed as "Use Brainfuck to sol...", which makes it unusable since it can't be resized (window can be resized, but it's not updated to new window size).
馃帳 PotatoIng_
29. Aug 2016 路 11:05 UTC
@Ghen It looks complicated but only has 8 thingies, it's super easy to learn!:)
馃帳 PotatoIng_
29. Aug 2016 路 11:06 UTC
@peterthehe tank you very much, these kinds of comment are awesome to hear! Glad you enjoyed it:3
馃帳 PotatoIng_
29. Aug 2016 路 11:07 UTC
@CptBubbles It's fun to see, what you can program in Brainfuck, once you learn the kanguage:).

I didn't test on Linux, sorry:(. It's a simple one line fix, so I'll submit it soon:)
馃帳 PotatoIng_
29. Aug 2016 路 11:21 UTC
@tomisoka thank you for the kind comment and for letting me know of a new bug! I uploaded a temporary fix, that let's you resize the window:). (I'll admit, I haven't done much testing on linux/mac:0, sorry!)
Joff
29. Aug 2016 路 11:32 UTC
There is a special place in hell reserved just for Brainfuck and this game...

I would say it was fun to play but that would be a lie, It is a good game and a good take on the theme.
馃帳 PotatoIng_
29. Aug 2016 路 11:41 UTC
@Joff For whatever reason, I feel like brainfuck is pretty fun:D. I was not actually sure, if it entirely fits into the theme:0 Thank you for the comment!:)
Graham Weldon
29. Aug 2016 路 12:03 UTC
Brainfuck, now this takes be back... Nice :)
onyon
29. Aug 2016 路 12:12 UTC
Best programming tutorial in the world. 11101/10
snake5
29. Aug 2016 路 12:20 UTC
This is the first time ever I've tried to use Brainfuck for anything. While I can't say the language has warmed up to me (but then again, who could?), it was interesting to try and think from a different perspective.

Level 1 was an odd one though, seemed more like an exercise in typing or Wikipedia copy-pasting than actual thinking.
LCMW_Spud
29. Aug 2016 路 12:22 UTC
Art
馃帳 PotatoIng_
29. Aug 2016 路 12:53 UTC
@Graham Weldon ( @GrahamWeldom ) Glad to be the one, who reminded of the ol days:)
馃帳 PotatoIng_
29. Aug 2016 路 12:54 UTC
@onyon providing only the highest quality content :P Thanks for the comment:)
馃帳 PotatoIng_
29. Aug 2016 路 12:55 UTC
@LCMW_Spud for maximum enjoyment, play blues music in background, while playing the game.
馃帳 PotatoIng_
29. Aug 2016 路 12:56 UTC
@snake5 It's nice to see, what you can do in Brainfuck, test your skills :).

Sadly, I need to agree, level 1 was a bit useless. It was more filling the hole, than being a level and teaching you anything.

Thank you for the review!:3
AWOL
29. Aug 2016 路 20:49 UTC
Nice Work!
TMAT Productions
30. Aug 2016 路 00:49 UTC
Man woah! Cool AF.
tomisoka
30. Aug 2016 路 08:35 UTC
@Potatoing_
Well, it doesn't seem to fix the issue.
Here is a screenshot of the game (left side is old version, right side is new version): https://www.dropbox.com/s/dbd8cbmrnfx7gyj/Screenshot-16_08_30-10_28_37.jpg?dl=0

It might be also a problem because I am using i3 but I don't think it can cause such a problem.


Also another bug occurs when using "step" - only first cell is set to non-zero value even though in "run" there are more cells set to non-zero value.
馃帳 PotatoIng_
30. Aug 2016 路 09:44 UTC
@tomisoka That is not a problem, the problem is me baing a bat programmer, don't worry:). I'm really sorry, that it didn;'t work and it should now! Thank you very much, for helping me port it. I uploaded a version, that should fix the problem. Thank you very much!
馃帳 PotatoIng_
30. Aug 2016 路 09:45 UTC
@AWOL Thank you :)!
馃帳 PotatoIng_
30. Aug 2016 路 09:46 UTC
@TMAT Productions ( @TMATProductions ) Thank you very much!:3 Hope you had fun playing!:)
chrisdugne
30. Aug 2016 路 20:21 UTC
Discovering brainfuck thanks to you : ) madness !
馃帳 PotatoIng_
30. Aug 2016 路 21:24 UTC
@chrisdugne Thank you:) I hope you had fun with brainfuck!:)
tomisoka
31. Aug 2016 路 06:26 UTC
@Potatoing_
I have no idea what exactly you are doing but it doesn't help. Anyway I downloaded source code and "fixed" it by:
lblWork.setBounds(10, 11, 810, 14);
instead of:
lblWork.setBounds(10, 11, 410, 14);

What makes me wonder is why it works on Windows since it should suffer the same problem - text is longer than bounds.
So maybe the linux version uses different font? I am quite sure that "Comic Sans MS" is not standard linux font.
馃帳 PotatoIng_
31. Aug 2016 路 11:10 UTC
@tomisoka I actually did the same thing:0 sorry, that you had to fix it this way:(. Well, I'm not a programmer, but I think, that it's because of java. Basically, java looks different on all Operating Systems. On Windows it looks one way, on Linux it looks different way. Sorry, that you had to fix it this way:(.
tmpxyz
01. Sep 2016 路 05:38 UTC
After 72 hours coding, I would skip a low-level programming language.

Just kidding, this's a nice programming game.
leondryaso
04. Sep 2016 路 13:41 UTC
Really great idea! Finally got to use Brainfuck this way :D Only if I accidentally got into while(true), I couldn't stop it anyhow. Also, "aNcient", right? ^_^

btw, the LD map says you're Czech as well, is it correct?
馃帳 PotatoIng_
04. Sep 2016 路 14:26 UTC
@tmpxyz :D hope you enjoyed it:3
馃帳 PotatoIng_
04. Sep 2016 路 14:29 UTC
@leondryaso The while true loop is a bit of a problem;(. I'm trying to make it so, the program recognizes a while true loop and doesn't allow for the program to start or something like that. :P

I am! I'm living near the capital!:)
leondryaso
05. Sep 2016 路 16:43 UTC
@PotatoIng_ looking into your code, I suggest major cleanup (everything copy-pasted isn't really a great solution). A hot-patch here may be a simple counter variable that would be increased every loop and it would stop when it reaches a certain high value. For final implementation, I would probably run the whole interpreter in another thread that could be interrupted manually.

Dobr茅 tady vid臎t n臎jakou bl铆zkou du拧i :D
馃帳 PotatoIng_
17. Sep 2016 路 06:21 UTC
@leondryaso Sadly I need to agree. The plan was to make a level class and just pass it parameters, but then it turned out into this mess. Good idea! Thanks!:)

To vskutku je:D
TheMonsterFromTheDeep
17. Sep 2016 路 20:12 UTC
I liked this game. I haven't actually done any BF stuff before, so this was a nice little experience. ;)

I think that the Hello World program is in the wrong spot - the two methods for Hello World are either brute force all the characters using long strings of +'s, or - if you know BF well enough, you can use more advanced multiplication and things to make it smaller. I don't think anybody new to the language will be able to do that by level 2, so it's kind of just a bad placement for that level.

I couldn't get past the 6th and 7th levels. :(

I think the main thing that could improve a game like this is story - basically each challenge is part of some new thing that the company needs to do.

I think a more unique UI would also do it good - basically some kind of really cool looking IDE thing (my personal opinion is that it would be good in pixel art).

But it's certainly a good idea, especially for this theme. :)