I have taken the gpusprites example to start from and I succeed in replacing the sprites and move them with the buttons and things like that. I am now at the stage of implementing a tiled background and moving the player sprite around the screen which works fine, but when the sprites move out of the screen they disappear instantly! I figured out that changing the "center" moves the point at which they disappear but it still happens. Looking around in the citro2d and citro3d documentation and sources on github did not give me much info on why this happens either, but I did find the viewport function and while that moves the 400x240 screen sized portion out of the visible area on screen it seems that nothing is being rendered outside of it.
Since I am new here on the forum I think I should explain what I have been doing the last few months....
Years ago I wanted to recreate a 2D platform game that used the game engine from Jazz Jackrabbit 2 but I never really understood how the graphics and levels were loaded from the game files. A few months ago I finally found this information and I started prototyping the whole thing in Python and used Pygame to render the graphics on screen. This prototype is in an advanced enough state that it can read the levels, tiles, sprites and even the menu graphics. Originally I wanted to write the game for the GameCube and/or Wii since those where the systems I was moding for homebrew...but the thought of needing to use a 3D library for a 2D game scared me a bit. I did write a working demo for the Sega MegaDrive a couple of years ago so using Tiles, Tilemaps and sprites was familiar to me. While the prototype in Python evolved further I started modifing the demos for the NDS and got the menu system of my game working. But the low resolution annoyed me and the tiles and sprites looked out of place so I started looking at the 3DS...
Then the same issue came up that I had on the GameCube and Wii: No 2D hardware graphics on the GPU meant no easy tiles and tilemaps with sprites! The most logical thing for me was to look at all the SNES and MegaDrive emulators for the Wii and 3DS but it still did not make much sense to me. As said above I started from the gpusprites example and played around with changing it to load my own graphics and moving the sprites with the buttons. I also started porting my python code into C so I can eventually load the game graphics directly on 3DS. For now I just dump to PNG and write the t3s file to convert it all into textures and load them into the modified demo.
I hope after that long story someone can help me figure out the issue with the viewport, or whatever the problem might be.
Thanks
Since I am new here on the forum I think I should explain what I have been doing the last few months....
Years ago I wanted to recreate a 2D platform game that used the game engine from Jazz Jackrabbit 2 but I never really understood how the graphics and levels were loaded from the game files. A few months ago I finally found this information and I started prototyping the whole thing in Python and used Pygame to render the graphics on screen. This prototype is in an advanced enough state that it can read the levels, tiles, sprites and even the menu graphics. Originally I wanted to write the game for the GameCube and/or Wii since those where the systems I was moding for homebrew...but the thought of needing to use a 3D library for a 2D game scared me a bit. I did write a working demo for the Sega MegaDrive a couple of years ago so using Tiles, Tilemaps and sprites was familiar to me. While the prototype in Python evolved further I started modifing the demos for the NDS and got the menu system of my game working. But the low resolution annoyed me and the tiles and sprites looked out of place so I started looking at the 3DS...
Then the same issue came up that I had on the GameCube and Wii: No 2D hardware graphics on the GPU meant no easy tiles and tilemaps with sprites! The most logical thing for me was to look at all the SNES and MegaDrive emulators for the Wii and 3DS but it still did not make much sense to me. As said above I started from the gpusprites example and played around with changing it to load my own graphics and moving the sprites with the buttons. I also started porting my python code into C so I can eventually load the game graphics directly on 3DS. For now I just dump to PNG and write the t3s file to convert it all into textures and load them into the modified demo.
I hope after that long story someone can help me figure out the issue with the viewport, or whatever the problem might be.
Thanks