Homebrew Tetris3DS

UltiNaruto

Well-Known Member
OP
Member
Joined
Sep 4, 2015
Messages
182
Trophies
0
Age
29
XP
193
Country
France
EDIT (28/02/2016) : The project is now discontinued! I'm working on a new project. I will give you details about this new project later.

Tetris 3DS

I ported this SDL game (http://www.aaroncox.net/tutorials/arcade/FallingBlocks.html) to 3DS. I had to change background because it wouldn't fit with 3DS. There's still lots to do though.

It has 99 levels and speed increase quite fast after level 6.

That's my first homebrew games for 3DS and I'll try to do more in the future.

Keys

DPad UP - Rotate block clockwise
L Trigger - Rotate block reverted clockwise
R Trigger - Rotate block clockwise
DPad DOWN - Move block down faster
DPad LEFT/RIGHT - Move block to the left/right
A Button - Instantly drop down the block
Start - Exit to HB Launcher
Select - Pause the game

v0.1a (OLD) :
03qtnDP.png


v0.305b :
QLnLEYs.png


Known bugs :
  • Image is wrongly rotated (90° clockwise)
  • Colors doesn't match the PNGs attached in gfx folder
Source
Download
 
Last edited by UltiNaruto,

730

Professional Shitposter
Member
Joined
Apr 2, 2015
Messages
485
Trophies
0
XP
628
Country
Argentina
I'm not sure since I've never done any C++, even less for 3DS, but I think you can solve the color bug converting your .pngs to .bins with this tool. This happens because the 3DS reads images in BGR color instead of RGB so it gets messed up.
 
  • Like
Reactions: UltiNaruto

Rinnegatamante

Well-Known Member
Member
Joined
Nov 24, 2014
Messages
3,162
Trophies
2
Age
29
Location
Bologna
Website
rinnegatamante.it
XP
4,857
Country
Italy
I'm not sure since I've never done any C++, even less for 3DS, but I think you can solve the color bug converting your .pngs to .bins with this tool. This happens because the 3DS reads images in BGR color instead of RGB so it gets messed up.

You can simply switch R and B channels (some decoders like lodepng can also do this by theirselves).
 
  • Like
Reactions: UltiNaruto

UltiNaruto

Well-Known Member
OP
Member
Joined
Sep 4, 2015
Messages
182
Trophies
0
Age
29
XP
193
Country
France
I'm not sure since I've never done any C++, even less for 3DS, but I think you can solve the color bug converting your .pngs to .bins with this tool. This happens because the 3DS reads images in BGR color instead of RGB so it gets messed up.

Thanks for the tool. I'll try now.

Nice Job! :)
Thanks. :)

Thanks. :)

You can simply switch R and B channels (some decoders like lodepng can also do this by theirselves).

Well it's easier than reconverting PNGs :P

EDIT:
sounds like imgur.com killed my screenshot ...
I will host it on my personal website...

EDIT2:
It was a bug...
 
Last edited by UltiNaruto,

UltiNaruto

Well-Known Member
OP
Member
Joined
Sep 4, 2015
Messages
182
Trophies
0
Age
29
XP
193
Country
France
I didn't rotate it :)
There's a box to uncheck in the script

I tried @Rinnegatamente 's method but it freezes.
Guess I'll stick with those colors for now until I find another way.
 
Last edited by UltiNaruto,

UltiNaruto

Well-Known Member
OP
Member
Joined
Sep 4, 2015
Messages
182
Trophies
0
Age
29
XP
193
Country
France
Since I can't code to save my life why don't you put this on the bottom screen
CHZILKm

At first I wanted to use fonts on background.png but sftdlib doesn't want to compile due to unknown errors and I don't know any other viable ways to draw text on images using ctrulib. Still glad that I don't have to use sf2dlib and sfillib which are far from being optimized. Though they are very good they lack of performance.

--------------------- MERGED ---------------------------

I added my homebrew to the list : http://wiki.gbatemp.net/wiki/List_of_3DS_homebrew
 
Last edited by UltiNaruto,
  • Like
Reactions: HaloEffect17

UltiNaruto

Well-Known Member
OP
Member
Joined
Sep 4, 2015
Messages
182
Trophies
0
Age
29
XP
193
Country
France
New update available : v0.2a

Known bugs:
  • Same as v0.1a
Changes:
  • Replaced 5 level limit to endless (99 levels)
  • Added highscore table (saves into a file into the same folder as the executable(.3DSX/.CIA)
  • Binded Select key to pause key
 

Wolfy

Person That Never Was
Member
Joined
Aug 18, 2015
Messages
1,131
Trophies
0
Age
25
Location
Somewhere In The Aether...
XP
3,002
Country
United States
New update available : v0.2a

Known bugs:
  • Same as v0.1a
Changes:
  • Replaced 5 level limit to endless (99 levels)
  • Added highscore table (saves into a file into the same folder as the executable(.3DSX/.CIA)
  • Binded Select key to pause key

Nice job with adding a pause button and the highscores :)

Just gotta fix the Exit button bug, and maybe change the rotate button to R and L?

Edit: Restarted N3DS running 10.0, getting an error whenever I start it up now, perhaps a problem with calling the highscores file?

--------------------- MERGED ---------------------------

Ok, so you can fix the problem by deleting the high scores file, but it comes back after you restart.
 
Last edited by Wolfy,

UltiNaruto

Well-Known Member
OP
Member
Joined
Sep 4, 2015
Messages
182
Trophies
0
Age
29
XP
193
Country
France
Yeah because of blank line. I will have to fix this when I'll be back home.

You can fix this by removing the last line in highScores.bin.

Edit: For the rotation buttons I'll add the L and R buttons but I'll keep the Dpad UP button for default rotation.
 
Last edited by UltiNaruto,

Wolfy

Person That Never Was
Member
Joined
Aug 18, 2015
Messages
1,131
Trophies
0
Age
25
Location
Somewhere In The Aether...
XP
3,002
Country
United States
Yeah because of blank line. I will have to fix this when I'll be back home.

You can fix this by removing the last line in highScores.bin.

Edit: For the rotation buttons I'll add the L and R buttons but I'll keep the Dpad UP button for default rotation.

Thanks, I'll do it when I get the chance.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    cearp @ cearp: Welcome hazbeans