Is there somewhere on to get help with homebrew creation?

Discussion in '3DS - Homebrew Development and Emulators' started by jasonmbrown, Nov 29, 2014.

  1. jasonmbrown

    jasonmbrown Member

    Sep 11, 2010
    Figured I would do something simple, and recreate space invaders for the 3ds. Since this is the first C++ Il have done (besides Making HelloWorlds for the wii, and tweaking the examples), I dont have much experience. And was wondering If there's somewhere on the forums to ask for help?

    Currently, Don't have much done up Besides a simple way to create 8x8 sprites and animate them. I had one of them Moving left and right Just to make sure that there wasnt anything weird happening with the variables. However Now that Im drawing multiple "Invaders" It keeps drawing them diagonally which means I have a logic issue somewhere that I cant find...

    if anyone wants to take a look feel free, This has the source as well as the buggy diagonal animated "invader" Besides that I havent done much lol. Just this has taken me all night XD.
    Crappy Code.

    So Ya If anyone wants to take a quick glance and see where I derped, and also If there's somewhere on the forums to post home-brew questions?

    (code thats probably causing the issue)
    int alien_layout[121] = {
        1,1,1,1,1,1,1,1,1,1,  1,0,0,0,0,0,0,0,0,0,
        1,1,1,1,1,1,1,1,1,1,  1,0,0,0,0,0,0,0,0,0,
        1,1,1,1,1,1,1,1,1,1,  1,0,0,0,0,0,0,0,0,0,
        1,1,1,1,1,1,1,1,1,1,  1,0,0,0,0,0,0,0,0,0,
        0,0,0,0,0,0,0,0,0,0,  0,0,0,0,0,0,0,0,0,0,
        0,0,0,0,0,0,0,0,0,0,  0,0,0,0,0,0,0,0,0,0,0
    int get_xpos(alien_array_position){//Minimum 100px: Maximum 300px
       int xpos = 0;
       xpos = (150 + (alien_array_position * 13));//150
    return xpos;
    int get_ypos(alien_array_position){
        int ypos = 0;
        ypos = (50 + (alien_array_position * 11));//100
    return ypos;
  2. gamesquest1

    gamesquest1 Nabnut

    GBAtemp Patron
    gamesquest1 is a Patron of GBAtemp and is helping us stay independent!

    Our Patreon
    Sep 23, 2013
    minexew and jasonmbrown like this.


    Dec 21, 2010
    United States
    Looking at the full code, if I understand it correctly (downloaded it and took a at draw.c mainly).
    When you shift left and right, you are changing the array position?

    Doing so then changes the y position in get_ypos by 11, so they go diagonally. You may want to consider making a multidimensional array instead, so that you can keep track of what y position each should be at anyway...

    Actually, I am becoming a huge fan of entity component programming for games myself, which would be great for this.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice