Friday, August 22, 2014

3DS Particle Demo


    Particle Demo is a particle demo for the 3DS (creative, I know). There two versions, a multi-threaded version and a single-threaded version.

    The multi-threaded version utilizes two threads where it updates the main application in one thread and the particles in the other. This allows the main thread to run at about 60 fps even when particle thread begins to lag. While this does mean the two threads are constantly out of sync, it causes the multi-threaded version to have a pseudo alpha blending effect where some particles appear to be a darker color than others. This is due to the particle thread continuing to draw particles after the frame buffer started to be copied from the GSP heap to VRAM. Since the top left frame buffer is copied to first, more particles are rendered to the GSP heap by the time it is copied to the top right frame buffer. When 3D is diabled, the 3DS renders the left and right frame buffers on alternating frames. This, in addition to some particles just not rendering on certain frames because the thread isn't updating fast enough, tricks your eyes into thinking certain particles are darker when they are really flashing on and off the screen multiple times per second.

     The single-threaded version just updates all 4096 particles in the main application thread. Otherwise it works the same as the multi-threaded version but with inferior performance. It lacks the pseudo-alpha blending effect and the text on the upper screen starts spazzing out when the frame rate drops to low (caused by increasing the particle size to much).

    Only use the single-threaded version for performance comparison. If you want to play around with it use the multi-threaded version. Both are stable from my testing but the multi-threaded demo just runs better.

Video:


Download :
Particle Demo (Multithread) Download
Particle Demo (Singlethread) Download
Github

Controls:

  • D-pad - move particle source
  • Touch screen - change particle RGB color values
  • A/B - increase/decrease particle size
  • X - toggle gravity on/off
  • Circle-pad - change particle source direction
  • Start - pause particle generation



Saturday, July 26, 2014

Chip8-CTRU



Chip8-CTRU is a my 3DS port of gbatemp user st4rk's Chip8 emulator... for the 3DS.
Might sound stupid at first (and maybe it is) but st4rk's emulator was written for the old Launcher.dat homebrew and Chip8-CTRU written for userland with ctrulib. It also features a multi-rom menu and a slight set-in 3D effect



Thursday, July 17, 2014

3DS Homebrew - Shoot ya Friend

I finally got around to releasing some homebrew for the Nintendo 3DS. Ended up making a little 2 player game called Shoot ya Friend. It's based off of Marcel's Opposing Pricks game in this video. When I say a 2 player game I mean a "local" 2 player game. As in one player grabs one side of the 3DS and the other player grabs the other side. The icon is a little borked because the bmp to ctpk converter I made isn't done yet. The icon has been fixed and 3dsBannerMaker is a great converter by the way.

Video:

Music made on the Gameboy with LSDJ.

Download:

Just put shoot.3ds from shoot/ onto your Gateway SD Card and run it.
Controls:
  • Up/Down - move left player
  • L trigger - left player shoot
  • X/B - move right player
  • R trigger - right player shoot
  • Start - restart after game ends
Projectiles cannot pass through either barrier. Barriers move independently. Shoot at each other until someone's health hit zero (shown on bottom screen).

Hopefully some of you can learn something from the code as there seems the to be a huge lack of 3ds homebrew out right now. 3dsdefines.h has some macros that should help newbies make sense of some the 0x1000000, etc found throughout smea's examples.