Omnimaga

Calculator Community => Other Calc-Related Projects and Ideas => TI-Nspire => Topic started by: kevinkore3 on June 10, 2014, 06:53:31 pm

Title: Squares
Post by: kevinkore3 on June 10, 2014, 06:53:31 pm
Simple squares game (mainly testing ndless)
Press R to restart
In case you're wondering why I created the tempw array, it was because there was some glitch that randomly changed the w and h part of SDL_Rect (can't find it, be thankful if someone can).

To do:
Figure out how to draw text (Probably gonna have to use NTI images :L) - did with SetPoint :P
Fix glitch where they randomly congregate at the corner (kind of fixed meh)
Get nSDL_DrawString to work

Edit:
OK, I noticed that the squares exited and entered smoothly on the right and bottom sides, but not on the left and top sides (x<0 and y<0), so I'm guessing that nSDL, unlike SDL2, doesn't support drawing rectangles with negative x and y coordinates :P
Title: Re: Squares
Post by: Legimet on June 11, 2014, 02:55:39 pm
You can draw text either using nSDL's built-in font support, Freetype, which I compiled for Nspire and is now in the Ndless SDK, or charmaps (there's one in nRGBlib). Don't make NTI images for that.
Title: Re: Squares
Post by: DJ Omnimaga on June 11, 2014, 09:57:59 pm
I'll try this when I have a chance. By the way a good rule of thumb for a calculator project is to include screenshots when posting about it. It will draw more attention since people generally like to see how a game looks like before downloading it. :)

EDIT: I see you edited your post. Thanks for the screenie :D
Title: Re: Squares
Post by: kevinkore3 on June 12, 2014, 10:22:37 pm
Any way to convert int to string with ndless?