2048 DS

So when I realized there's no 2048 homebrew for DS, i wanted to make one,
since i didn't make any gaming project lately, and this one is pretty nice to implement.

Yes i had a fun, with testing and improving code I learned something new again.
So you know how it goes, you have some concept, but sometimes it doesn't work so
you need to test and find out what's wrong and correct or change concept.

One of this thing is why some tiles stops during slide animation,
so changing condition's checking direction and repeating move at least three times solved that issue.
And another one - it's better not to use power function from math library, Why?
I decided that tile variable store a bit number instead of value, so adding points is realized by power function.
So if you want to use pow(2,x) when you cast integer on float and don't use ceil function...
well you loose one point while taking some moves.
Using a bit rotation is best for that, and computer was designed for counting in that way.
So if you want count 2^x remember to use:
Code:
score += 1 << field[x][y+1];
istead of:
Code:
score += int(pow(2,field[x][y+1]));
which is wasting of cpu usage and without ceil function counts faulty.
-------
Update:
Tile reduction works different than original but i leave it. It means it's possible to reduce 4 tiles to one instead of 2.
v0.93
- added colors
- added restore last move
- guard variable and game over
- improved RNG for a new tile
- seperated grid and tile layer (fixed screen flickering)
- added toogle colors / black&white switch (R button)
- added reset (L button)
- pause works in funny way, it's taken from my old arkasnake game so I can say it's useful here :]
- minor tweaks and fix like scoring and text positioning
- added winner screen
v0.94:
- fixed stupid captions for 14bit(16K) tile and 15bit(32K) tile
- added saving top score on a card (libfat), tested on R4 and works ok.

screenshots:
rev1:View attachment 196741 rev2:View attachment 196885
rev3(current and impossible tileset):View attachment 197211
-----------
commercials:
2048 DS - The Power of Future - Use your future calendar today!
Released!

Comments

Nice try, but score won't help you to win, you have to join tiles to produce tile with a number 2048. I guess you need 10 times more points. ;) I managed to make 1024 tile, that's halfway.
----
Update, I got a suggestion from my tester that top score should be saved on a card. So now it's possible.
 
  • Like
Reactions: 1 person

Blog entry information

Author
plasturion
Views
581
Comments
9
Last update

More entries in Personal Blogs

More entries from plasturion

  • second one
    So yeah, First homebrew for DS was simple and playable, but I wanted to...
General chit-chat
Help Users
    Xdqwerty @ Xdqwerty: @BakerMan, https://youtu.be/KaMSXIRReOo?si=2hRoijJtiwPUHXk5