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)
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)
Code:
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;
};