2048 game I made as a testing game when setting up my dev environment. If you don’t know the rules, Wikipedia has you covered
Code and bin can be found here:
Everything is CC0 licensed, so you can do anything with it. Feel free to play around, port it to other platforms, report bugs etc. If you enjoy the game and want to thank me, the best way to do it is by sharing your games as free and open source – with appropriate licenses – as well.
What’s the issue? Anyway thanks for the tips, I keep them all in mind, just am usually lazy to apply them right away if there’s no bug etc. Notice that I’ve started using enums with underlaying types
Ok downloaded it and I do like it, I would add sound though, perhaps a sound like the iPhone space bar sound for a 1+1 and get slightly higher pitched as the number gets bigger.
Great idea! I was thinking about sound but I have trouble with my simulator producing sound, so I’d have to keep testing it right on Pokitto, which is uncomfortable, so I just left it.
Once either I fix my simulator sound or I replace it with the emulator I may add it. Or, you (or someone else) can add it – the source code is right there If it’s good && I like it && you agree, I’ll include it in the “official” game here
I’ve been looking into it too, valgrind says it crashes in pulseaudio library called from SDL, that’s all I know. I’ll try to figure out the exact line of code when I’m bored.
I used to be addicted to this game a few years back. After some practice I’ve been able to win, but now it’s been some time and can’t do it, had to cheat in order to test winning the game Fun fact: there are people who can get much higher than 2048, search on YouTube.
It’s possible that it’s used in the library definition but not the compiler.
As far as I’m aware the compiler and the standard library were written by different people.
It would make sense that GCC wouldn’t be aware of something so part specific, but the writers of the stdlib might be (I would assume there’s a different define for each target MCU and thus detecting which optimisations are available would just be a bit of conditional compilation).