[Homebrew] 3dsmandelbrot

Discussion in '3DS - Homebrew Development and Emulators' started by xantoz, Dec 3, 2014.

  1. xantoz

    xantoz Advanced Member

    Nov 28, 2014
    No homebrew scene is complete without a gazillion mandelbrot zoomers, so here is another one.

    zoom in by selecting an area (drawing a rectangle) on the touchscreen and lifting the pen (currently missing a useful indicator, so please imagine a red rectangle or something similar) Press A to reset zoom to standard level. Press START to quit

    First homebrew release (ever) I guess. Code is available at: https://github.com/xantoz/3dsmandelbrot
    Text drawing routine shamelessly stolen from lua player project. Uses the C99 complex number support if that is interesting or anything (might explain why it's so damn slow...).

    This is an early version so it lacks a bit in the UI department (mostly the rectangles).
    Note that I've compiled two versions. One that is slow, with grayscale, and one that is even slower with more interesting colors. The reason the nicer color version is slower is that it has a larger iteration depth.

    Feel free to stalk me on github as I might throw up more 3ds related stuff there in the future.

    EDIT: Oops, seems I still left the 3D setting on in these builds even though they have no 3D functionality... Oh well... Just don't use the 3D slide. On the plus side you can now use it as a calibration for your position relative the 3D screen. Just close your left eye and move until the screen looks black :D

    New version: 3dsmandelbrot_finalish_version.zip
    This can cycle between three rendering modes with the B button. One of them is a silly 3D-like thing.
    I leave the others ones up if anyone wants to use the inferior version for some reason.

    Attached Files:

  2. Gettwobirdsstone

    Gettwobirdsstone Triforce Guardian

    Jul 1, 2012
    Behind you breathing heavily
    Pretty colours..... Seems really cool, inversion of colours would be sweet.
  3. hippy dave

    hippy dave BBMB

    Apr 30, 2012
    United Kingdom
    Awesome, gotta have fractals. Will give it a go. You should try adding a 3d effect of some sort just for novelty - different depths per colour maybe?
  4. DoJo_Master

    DoJo_Master GBAtemp Advanced Fan

    May 7, 2013
    I'm downloading now, I agree with hippy add a 3D mode!
  5. xantoz

    xantoz Advanced Member

    Nov 28, 2014
    I've had plans to update this, but real life sort of happened and I haven't been able to keep up with the HB scene. In particular my toolchain is horribly out of date and fails on errors in the library (maybe I should just downgrade libctru).

    I already fixed a simple hackish indicator of what area you are zooming into while sliding which helps immensly. I was able to do this without introducing double-buffering using cheap little xor-hacks (It seems to work so long as I only draw a small amount of pixels, but lines seems to be out of the question...).

    I might make a button cycle through the modes. Actually I have a 3D mode that can be conditionally compiled in already in the code at github, but I should probably make it all switchable at run-time. The 3D stuff isn't as impressive as one might think though, it's based on the color values and the color values are rather badly posterized so...

    Oh well I needed an excuse to get my toolchain up to date.

    Could maybe speed it up some too with the support for different bitdepths and stuff, but the main problem lies in the slow fp computations, but I'm too lazy for that right now.

    There was something about doing -mfloat-abi=hard instead of the -mfloat-abi=softfp in ctrulib many weeks ago but it was instantly reverted, maybe it was buggy. But having that should theoritically speed things up... except ctrulib needs to be built with it too I think (I might be wrong).
  6. xantoz

    xantoz Advanced Member

    Nov 28, 2014
    Ah there we go, NEW RELEASE. WOOP WOOP.

    Quick fix when I got around to it.
    Pressing B now cycles between the three rendering modes. Nice colors, silly 3d and B/W.

    Maybe I should get around to that HB game I was working on.
    I would... but I have a thesis to work on too ;_;
    I hate when that happens...

    I call this finalish because I might still add stuff/fix bugs. I would like to add a screenshot feature but not right now.

    Attached Files:

    VeniaSilente and hippy dave like this.
  7. ChrisCerne

    ChrisCerne Advanced Member

    Aug 23, 2012
    United States
    I love you. The mandlebrot set is quite amazing.
  8. Cyan

    Cyan GBATemp's lurking knight

    Global Moderator
    Oct 27, 2002
    Engine room, learning
    Thanks for updating this homebrew :)