Author Topic: nSDL 1.1.1 Anniversary Edition—The Ultimate TI-Nspire Graphics Library  (Read 142997 times)

0 Members and 5 Guests are viewing this topic.

Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: nSDL 0.3.0—A fast & robust TI-Nspire graphics library
« Reply #195 on: May 11, 2012, 01:56:06 pm »
This looks great :D
I hope a lot of people will code games for Nspires with this :)

Btw, if it is now v0.3.0, you might want to change the title of the first post Nevermind :P
« Last Edit: May 11, 2012, 01:56:49 pm by Hayleia »
I own: 83+ ; 84+SE ; 76.fr ; CX CAS ; Prizm ; 84+CSE
Sorry if I answer with something that seems unrelated, English is not my primary language and I might not have understood well. Sorry if I make English mistakes too.

click here to know where you got your last +1s

Offline Adriweb

  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1708
  • Rating: +229/-17
    • View Profile
    • TI-Planet.org
Re: nSDL 0.3.0—A fast & robust TI-Nspire graphics library
« Reply #196 on: May 11, 2012, 03:20:06 pm »
Very nice :D

Also, since it's a "universal binary", what the size difference with the version before ? Probably not much ? (which means it's easier anyway for the programmer/user)
« Last Edit: May 11, 2012, 03:21:14 pm by adriweb »
My calculator programs
TI-Planet.org co-admin.
TI-Nspire Lua programming : Tutorials  |  API Documentation

Offline willrandship

  • Omnimagus of the Multi-Base.
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2953
  • Rating: +98/-13
  • Insert sugar to begin programming subroutine.
    • View Profile
Re: nSDL 0.3.0—A fast & robust TI-Nspire graphics library
« Reply #197 on: May 11, 2012, 04:15:30 pm »
hmm....

BASIC commands that use this....mmmmm :)

Offline hoffa

  • Project Author
  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 304
  • Rating: +131/-13
    • View Profile
Re: nSDL 0.3.0—A fast & robust TI-Nspire graphics library
« Reply #198 on: May 12, 2012, 08:00:45 am »
Very nice :D

Also, since it's a "universal binary", what the size difference with the version before ? Probably not much ? (which means it's easier anyway for the programmer/user)
There's practically no difference.

Offline compu

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 275
  • Rating: +63/-3
    • View Profile
Re: nSDL 0.3.0—A fast & robust TI-Nspire graphics library
« Reply #199 on: May 13, 2012, 08:10:30 am »
Nice!

GCC has __builtin_fscanf() as far as I know.

Offline critor

  • Editor
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2079
  • Rating: +439/-13
    • View Profile
    • TI-Planet
Re: nSDL 0.3.0—A fast & robust TI-Nspire graphics library
« Reply #200 on: May 13, 2012, 08:23:22 am »
Please correct me if I'm wrong:

We can easily port only:
- games whose source code is available
- games which relies on the SDL library
- games which doesn't use assembly (between an MS-DOS and a Linux version of the same game, we should choose to work on the Linux version)
- games written in C (no C++)


Meaning that until we've got a C++ toolchain for Ndless, most of the greatest SDL games/emulators can't be ported?...
« Last Edit: May 13, 2012, 08:24:01 am by critor »
TI-Planet co-admin.

Offline hoffa

  • Project Author
  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 304
  • Rating: +131/-13
    • View Profile
Re: nSDL 0.3.0—A fast & robust TI-Nspire graphics library
« Reply #201 on: May 13, 2012, 08:43:51 am »
We can easily port only:
- games whose source code is available
- games which relies on the SDL library
- games which doesn't use assembly (between an MS-DOS and a Linux version of the same game, we should choose to work on the Linux version)
- games written in C (no C++)
Also resolution should be taken into account, as nSDL handles resolution <= 320x240. Oh and global variables can be a source of frustration on bigger programs as there's no stable loader currently. Thankfully GP32/GP2X and some other machines have many games, use SDL, have a 320x240 resolution and many (most?) of the games are written in C. Oh and of course all the DOS clones/ports in SDL (C-Dogs, OpenTyrian and whatnot) and generic flexible SDL games.

EDIT:

I hardcoded (using a simple script) the map data in the program and compiled it. Magic happened:

I've attached the game here in my post. I'd appreciate it if someone with a CX could try it (just dump the whole folder in the Examples folder on the TI-Nspire) and tell me how it runs. Even better would be to upload a video about it. If you have a Touchpad/Clickpad you can try it too, but the games' colors are quite dark; I couldn't see much (that made me think of a function that inverts the palette...hmm).

The controls are CTRL, tab, arrow keys (player 1) and 8/2/4/6, enter (player 2). Yes there's 2 player mode also.
« Last Edit: May 13, 2012, 09:12:13 am by hoffa »

Offline Adriweb

  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1708
  • Rating: +229/-17
    • View Profile
    • TI-Planet.org
Re: nSDL 0.3.0—A fast & robust TI-Nspire graphics library
« Reply #202 on: May 13, 2012, 01:46:27 pm »
Awesome ! :D

I just tried it on my CX-CAS and took a video of my lame playing-while-recording skills :P

:


(Anyway, this was filmed under bad (camera, lightning etc) conditions, so if anyone wants to do a better recording, please do so :D)
« Last Edit: May 13, 2012, 02:29:20 pm by adriweb »
My calculator programs
TI-Planet.org co-admin.
TI-Nspire Lua programming : Tutorials  |  API Documentation

Offline alberthrocks

  • Moderator
  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 876
  • Rating: +103/-10
    • View Profile
Re: nSDL 0.3.0—A fast & robust TI-Nspire graphics library
« Reply #203 on: May 13, 2012, 02:23:35 pm »
Please correct me if I'm wrong:

We can easily port only:
- games whose source code is available
- games which relies on the SDL library
- games which doesn't use assembly (between an MS-DOS and a Linux version of the same game, we should choose to work on the Linux version)
- games written in C (no C++)

Meaning that until we've got a C++ toolchain for Ndless, most of the greatest SDL games/emulators can't be ported?...
To address some points:

- Yup, but that goes without saying. There is no way we can do any binary translation; otherwise, iOS apps could then be ported to Android. (OK, bad example, but you know what I mean)
- Yeah, pretty much. But SDL will still let people create new games too :)
- Somewhat - assembly can be ported too. SDL emulators in particular can use this. More or less, C -> ASM for any emulator work because C would be (somewhat) slow.
- There's a bFLT loader that is supposedly done, which supports C++ programming. (See here.) I do not know of its status, and whether or not it has merged with the official ndless tree, or if it's stable or not. (I think the author, tangrs, is busy with his finals, so... ExtendeD and tangrs can clarify its status.)

There's one little thing that I'd like to see implemented before it gets off: replacing library IDs with Java-style names. (For instance, "com.alberthrocks.myawesomelibrary") There's a max of 256 libraries that can be had, which in the future may not be enough. (I've indicated that idea here.) Unfortunately I don't have enough experience to try this, so... :P
Withgusto Networks Founder and Administrator
Main Server Status: http://withg.org/status/
Backup Server Status: Not available
Backup 2/MC Server Status: http://mc.withg.org/status/


Proud member of ClrHome!

Miss my old signature? Here it is!
Spoiler For Signature:
Alternate "New" IRC post notification bot (Newy) down? Go here to reset it! http://withg.org/albert/cpuhero/

Withgusto Networks Founder and Administrator
Main Server Status: http://withg.org/status/
Backup Server Status: Not available
Backup 2/MC Server Status: http://mc.withg.org/status/

Activity remains limited due to busyness from school et al. Sorry! :( Feel free to PM, email, or if you know me well enough, FB me if you have a question/concern. :)

Don't expect me to be online 24/7 until summer. Contact me via FB if you feel it's urgent.


Proud member of ClrHome!

Spoiler For "My Projects! :D":
Projects:

Computer/Web/IRC Projects:
C______c: 0% done (Doing planning and trying to not forget it :P)
A_____m: 40% done (Need to develop a sophisticated process queue, and a pretty web GUI)
AtomBot v3.0: 0% done (Planning stage, may do a litmus test of developer wants in the future)
IdeaFrenzy: 0% done (Planning and trying to not forget it :P)
wxWabbitemu: 40% done (NEED MOAR FEATURES :P)

Calculator Projects:
M__ C_____ (an A____ _____ clone): 0% done (Need to figure out physics and Axe)
C2I: 0% done (planning, checking the demand for it, and dreaming :P)

Offline Lionel Debroux

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2135
  • Rating: +290/-45
    • View Profile
    • TI-Chess Team
Re: nSDL 0.3.0—A fast & robust TI-Nspire graphics library
« Reply #204 on: May 13, 2012, 02:29:17 pm »
Quote
I do not know of its status, and whether or not it has merged with the official ndless tree
It has not yet.

Quote
There's one little thing that I'd like to see implemented before it gets off: replacing library IDs with Java-style names.
If it cannot be done with standard bFLT (and I'm not aware it can be done), it's unlikely to be something we want to do: hacked up formats require non-standard toolchains, which are a maintenance burden in the long term ;)
Member of the TI-Chess Team.
Co-maintainer of GCC4TI (GCC4TI online documentation), TILP and TIEmu.
Co-admin of TI-Planet.

Offline alberthrocks

  • Moderator
  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 876
  • Rating: +103/-10
    • View Profile
Re: nSDL 0.3.0—A fast & robust TI-Nspire graphics library
« Reply #205 on: May 13, 2012, 03:10:04 pm »
Quote
I do not know of its status, and whether or not it has merged with the official ndless tree
It has not yet.
Ahh... if only I had time to work on this :/ (I have college-like finals, aka CollegeBoard AP tests this week.)

If it cannot be done with standard bFLT (and I'm not aware it can be done), it's unlikely to be something we want to do: hacked up formats require non-standard toolchains, which are a maintenance burden in the long term ;)
True :) Well... I guess we could reserve a few numbers for ndless' core and particular important libraries, and then use some kind of ID manager for the rest. I just hope implementing all of this won't get too messy...
Withgusto Networks Founder and Administrator
Main Server Status: http://withg.org/status/
Backup Server Status: Not available
Backup 2/MC Server Status: http://mc.withg.org/status/


Proud member of ClrHome!

Miss my old signature? Here it is!
Spoiler For Signature:
Alternate "New" IRC post notification bot (Newy) down? Go here to reset it! http://withg.org/albert/cpuhero/

Withgusto Networks Founder and Administrator
Main Server Status: http://withg.org/status/
Backup Server Status: Not available
Backup 2/MC Server Status: http://mc.withg.org/status/

Activity remains limited due to busyness from school et al. Sorry! :( Feel free to PM, email, or if you know me well enough, FB me if you have a question/concern. :)

Don't expect me to be online 24/7 until summer. Contact me via FB if you feel it's urgent.


Proud member of ClrHome!

Spoiler For "My Projects! :D":
Projects:

Computer/Web/IRC Projects:
C______c: 0% done (Doing planning and trying to not forget it :P)
A_____m: 40% done (Need to develop a sophisticated process queue, and a pretty web GUI)
AtomBot v3.0: 0% done (Planning stage, may do a litmus test of developer wants in the future)
IdeaFrenzy: 0% done (Planning and trying to not forget it :P)
wxWabbitemu: 40% done (NEED MOAR FEATURES :P)

Calculator Projects:
M__ C_____ (an A____ _____ clone): 0% done (Need to figure out physics and Axe)
C2I: 0% done (planning, checking the demand for it, and dreaming :P)

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: nSDL 0.3.0—A fast & robust TI-Nspire graphics library
« Reply #206 on: May 14, 2012, 07:04:54 pm »
That is great. I love the progress on this. Hopefully converting SDL games won't be too hard in the future. :)

Offline hoffa

  • Project Author
  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 304
  • Rating: +131/-13
    • View Profile
Re: nSDL 0.3.0—A fast & robust TI-Nspire graphics library
« Reply #207 on: May 15, 2012, 01:11:47 pm »
As the porting went rather well, I'm now working on an improved public version (named Dodgin' Diamond 2X) of the aforementioned game, Dodgin' Diamond 2. As usual, a screenshot, of the game's menu:

« Last Edit: May 15, 2012, 05:03:48 pm by hoffa »

Offline Adriweb

  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1708
  • Rating: +229/-17
    • View Profile
    • TI-Planet.org
Re: nSDL 0.3.0—A fast & robust TI-Nspire graphics library
« Reply #208 on: May 15, 2012, 01:27:25 pm »
Can you share the file ? :P

edit : whenever it's done :D
« Last Edit: May 15, 2012, 01:27:39 pm by adriweb »
My calculator programs
TI-Planet.org co-admin.
TI-Nspire Lua programming : Tutorials  |  API Documentation

Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: nSDL 0.3.0—A fast & robust TI-Nspire graphics library
« Reply #209 on: May 16, 2012, 11:58:57 am »
I hardcoded (using a simple script) the map data in the program and compiled it. Magic happened:
Spoiler For Spoiler:
I've attached the game here in my post. I'd appreciate it if someone with a CX could try it (just dump the whole folder in the Examples folder on the TI-Nspire) and tell me how it runs. Even better would be to upload a video about it. If you have a Touchpad/Clickpad you can try it too, but the games' colors are quite dark; I couldn't see much (that made me think of a function that inverts the palette...hmm).

The controls are CTRL, tab, arrow keys (player 1) and 8/2/4/6, enter (player 2). Yes there's 2 player mode also.
I tried it on my CX, then with one of my friend, we couldn't stop playing in two player mode :P
However, would it be possible to remap the keys for the first player (or maybe the two players) ? Because the Touchpad sucks a lot.
I own: 83+ ; 84+SE ; 76.fr ; CX CAS ; Prizm ; 84+CSE
Sorry if I answer with something that seems unrelated, English is not my primary language and I might not have understood well. Sorry if I make English mistakes too.

click here to know where you got your last +1s