Build Blocks Wii - 3D blocks sandbox game

Discussion in 'Wii - Emulation and Homebrew' started by Poklik, Dec 5, 2013.

  1. Poklik
    OP

    Poklik Newbie

    Newcomer
    8
    6
    Dec 5, 2013
    Poland
    [​IMG]


    Download links:
    http://poklik.pl/buildblocks/wii/

    Updated, version 0.2:

    bbwii02.png

    Changelog:
    • map loader/saver (fully compatible with Nokia S60/Asha version),
    • splitscreen mode (up to 4 screens with different layouts),
    • bigger maps (not THAT big, just 32x32x32 for now),
    • GUI,
    • screenshots support (press "2" on wiimote for full screenshot with GUI),
    • fps counter (in debug console - press "up" on wiimote),
    • messed up aspect ratio in 576i, will fix that in next update.


    Controls in v 0.2: (same for every connected Wii remote):
    • A : zoom in/place block,
    • B : rotate camera,
    • - : remove block,
    • + : quick place block (without zooming),
    • down : zoom out,
    • left/right : select block color,
    • up : toggle debug console (with FPS counter),
    • 2 : screenshot (with GUI),
    • home : main menu.

    Enjoy!


    Original post, version 0.1:

    Hi!

    Just wanted to share with you guys my new homebrew app for Wii. As title says - it's 3D sandbox style game, where you can build stuff with blocks. Yes, it's obviously based on original simply and clever Minecraft idea of placing block in 3D space. But don't expect much, it's not meant to be a Minecraft clone. For now it's just simple place/remove block on board. Originally I designed it to be easily controlled on smaller smartphones screens, but I think it works well also with Wii remote.

    [​IMG]

    There's no gui yet, and you can only place/remove blocks on small 8x8x8 board. So really you can't do much with it at this point. Also there's no save/load functionality.
    Anyway, up to 4 players on one screen are supported. You can control stuff with standard Wii remote, nunchuck is not required (and not supported).
    16:9 and 4:3 TVs are supported. Should also work with Wii U on virtual Wii mode, but I can't really test it as I don't own Wii U.

    Controls in v 0.1 (same for every connected Wii remote):
    • A : zoom in/place block,
    • B : rotate camera,
    • - : remove block,
    • + : quick place block (without zooming),
    • down : zoom out,
    • left/right : select block color,
    • up : toggle debug messages,
    • home : exit.


    Video from version 0.1:


    Enjoy!
     
    newo, ipwndeveloper and Maxternal like this.
  2. beredezebe

    beredezebe Newbie

    Newcomer
    7
    0
    Jun 12, 2010
    France
    It sounds great !
    I'll try it today.
     
  3. OriginalHamster

    OriginalHamster UStealthy

    Member
    3,381
    642
    Nov 2, 2008
    Cote d'Ivoire
    Looks great, I would request a screenshot system to share our creations with other Tempers :lol:
    By the way there's a limit in the blocks you can use?
     
  4. Poklik
    OP

    Poklik Newbie

    Newcomer
    8
    6
    Dec 5, 2013
    Poland
    As I said before, for now you can build only on 8x8x8 board, so 512 blocks max.

    Will be in next release. :)

    [​IMG]
     
  5. beredezebe

    beredezebe Newbie

    Newcomer
    7
    0
    Jun 12, 2010
    France
    Good job, really well-done.
    Are you going to post it on Wiibrew ?
     
  6. Poklik
    OP

    Poklik Newbie

    Newcomer
    8
    6
    Dec 5, 2013
    Poland
    Thanks!

    Actually wanted to post there in first place, but looks like they disabled account registration:

     
  7. newo

    newo GBAtemp Regular

    Member
    131
    32
    Apr 7, 2011
    Jamaica
    cool. good stuff. Are you planning to make the grid any bigger? And how did you get the widescreen to work?
     
  8. Poklik
    OP

    Poklik Newbie

    Newcomer
    8
    6
    Dec 5, 2013
    Poland
    Yup. Now I'm working on some simple gui, then bigger boards. In fact it's not about coding map stuff, because it's now works ok with 128x128 and bigger maps, but more about camera and controls on bigger boards. At this point when you zoom out, camera automatically tries to show whole board, so it's not working well on huge maps, as everything is just too small. Will see how to resolve that, and keep wii remote-only controls.

    About widescreen, I just do something like:

    Code:
        bool widescreen=(CONF_GetAspectRatio()==CONF_ASPECT_16_9);
        f32 wreal=rmode->viWidth; //real witdh
        f32 aspectRatio=w/h;
        if (widescreen)
            aspectRatio=16.0f/9.0f;
        else
            aspectRatio=4.0f/3.0f;
        f32 w=h*aspectRatio; //calculate new width, also works for non-widescreen 576i
        f32 h=rmode->viHeight;
    
    So basically I took "virtual" screen width and then set wii remote vres and draw aspect ratio to it:

    Code:
        WPAD_SetVRes(i, w, h);
        ...
        guPerspective(perspective, fovy, aspectRatio, nearClip, farClip);
        ...
        guOrtho(perspective,0,h-1,0,w-1,0,300);
    
    Tested on few CRT and LCD TVs, and looks like it works ok.
    Also I don't write directly to frame buffer, so graphics unit do every widescreen stuff for me.
     
  9. Poklik
    OP

    Poklik Newbie

    Newcomer
    8
    6
    Dec 5, 2013
    Poland
    Splitscreen coming soon.

    [​IMG]
     
    bezem and OriginalHamster like this.
  10. Poklik
    OP

    Poklik Newbie

    Newcomer
    8
    6
    Dec 5, 2013
    Poland
    New version 0.2:

    bbwii02.png

    Changelog:
    • map loader/saver (fully compatible with Nokia S60/Asha version),
    • splitscreen mode (up to 4 screens with different layouts),
    • bigger maps (not THAT big, just 32x32x32 for now),
    • GUI,
    • screenshots support (press "2" on wiimote for full screenshot with GUI),
    • fps counter (in debug console - press "up" on wiimote).


    Enjoy!


    Edit:
    Also after uploading I noticed, that I've messed up a little aspect ratio in 576i mode. Sorry! Will fix that next time, I hope.
     
    Maxternal likes this.
  11. newo

    newo GBAtemp Regular

    Member
    131
    32
    Apr 7, 2011
    Jamaica
    wow, splitscreen turned out more useful than I thought it would be! Are you drawing the map several times for each split? good job!
     
  12. Poklik
    OP

    Poklik Newbie

    Newcomer
    8
    6
    Dec 5, 2013
    Poland
    Thanks!
    And yes, it's renders map multiple times every frame in split screen mode - one time for every window (I mean window with camera, not gui window :) ) visible on screen.
     
  13. newo

    newo GBAtemp Regular

    Member
    131
    32
    Apr 7, 2011
    Jamaica
    I think you need a button to resume editing. I kept clicking exit when I brought up the menu.
     

    Attached Files:

  14. Poklik
    OP

    Poklik Newbie

    Newcomer
    8
    6
    Dec 5, 2013
    Poland
    Well, I was trying to keep some of the original Wii home menu feel, where there is no on screen continue button, and you actually have to press home button on wiiremote. But yep, I think exit confirmation would be useful.

    BTW, about screenshots. Currently I use pngu lib to save screenshots, but looks like they are kinda blurry. Is this due to YUY2->RGB framebuffer conversion, or maybe I do something wrong?