A brand new game
for Windows, HTML5, 3DS Homebrew, iPhone, Android TV and more,
every week,
unless exhausted!
About Games Pixelart Music Poetry Home Patreon Mailbag Scores JNKPlat Levels
Blog
A Bit Closer...
  11th April, 2018


Three little squares..

-=-=-



Three squares.
Square one is top left, 32x32 pixels from the corner.
Square two is in the center of the screen.
Square three is floating around the place, controlled by the controller.


Game.DrawImg(0,32,32,0);

Game.DrawImg(0,jscrw/2,jscrh/2,0);

Game.DrawImg(0,plr[1],plr[2],0);

plr[1]=plr[1]+((Game.Joy(1)-Game.Joy(3))*4.0);
plr[2]=plr[2]+((Game.Joy(2)-Game.Joy(0))*4.0);

if (plr[1]<-8) {plr[1]=plr[1]+(jscrw+16);}
if (plr[1]>jscrw+8) {plr[1]=plr[1]-(jscrw+16);}

if (plr[2]<-8) {plr[2]=plr[2]+(jscrh+16);}
if (plr[2]>jscrh+8) {plr[2]=plr[2]-(jscrh+16);}


It's kinda working in the emulator, but also kinda crashing on the 3DS itself, so obviously not perfect yet, but this is Framework code trying to do it's thing.
Todo : Get the bloomin' thing working on the 3DS, and then try to get sprites showing on the squares.

Note that the squares are 10x10 pixels, not 8x8. That's to allow for the small pixel-sized padding on all the sprites, so I'm happy to say that the engine's drawing things properly. .. I think.. And should indeed be pixel-perfect once I've got the images rendering.

I hope..

Lots of hope going into this part of the framework!!

Views 22, Upvotes 4
3ds Homebrew
Site credits : Site built from the ground up, in php, using Programmer's Notepad 2, and a very bored Jayenkai.
(c) Jayenkai 2017 and onwards.
Blog - A Bit Closer... - AGameAWeek