Author Topic: [nRGBlib] W.I.P - Colorful librairy for Ndless 3.1  (Read 30591 times)

0 Members and 1 Guest are viewing this topic.

Offline totorigolo

  • LV2 Member (Next: 40)
  • **
  • Posts: 24
  • Rating: +9/-0
    • View Profile
[nRGBlib] W.I.P - Colorful librairy for Ndless 3.1
« on: January 04, 2012, 04:00:48 pm »
Hello everybody,

I'm coming from TI-Planet to inform you about the progression of nRGBlib, which is a Ndless colorful (but compatible with classic Nspire) library.
You can see the corresponding news :
And you can see the original topic on TI-Planet here (FR). Note that this topic, on Omnimaga, may be outdated because I'm French so...
------------------------------------------------------------------------------------------

Roadmap :

nRGBlib 0.1 : First stable version - available on request
  • Drawing pixel in color.
  • Clearing the screen in color.
  • Drawing an ordinary line in color.
  • Drawing rectangle, square or vertical and horizontal line in color.
  • Drawing circle and disc in color.
  • Drawing an empty triangle (only borders) in color.
  • Drawing 8x8 pixels tile (good definition, but in french) with possibility to resize them (only x2, x4,... for 0.1 version) in single color and multi colors mode.
  • Drawing a character with possibility to resize it (only x2, x4,... for 0.1 version) in color.
  • Drawing a string, with possibility to resize it (only x2, x4,... for 0.1 version) and possibility to enable / disable line wrap, in color.

nRGBlib 0.2 : Former stable version - public
  • Compile statically, like libndls, to alleviate the executable.
  • Organize the library to allow proper expansion in continuity.
  • Classic Nspire and CX compatibility, without re-building.
  • Reduce the number of arguments of the functions, to accelerate the execution ? only colors for this version.
  • Mozilla Public License 2.0 added.
  • Version ready for Ndless 3  ;)
nRGBlib 0.3 : Last stable version - public
  • Images support. The images' format is a custom one. However, an exporter is provided and is capable to export all popular formats (bmp, dds, jpg, png, tga, psd (thanks to SFML  :) ) ).
    The images' weight is smaller than BMP, but heavier than PNG : 320x240 image => BMP = 225Ko, PNG = 6.19Ko et CUSTOM = 151Ko.
    Images are saved outside of the program, unlike tiles.
    Currently, 4bpp calculators can't draw images which have uneven width, so 240x245 is bad ? 240x244.
  • Sub-images support, ie drawing only a part of an image.
  • Buffering support. Possibility to use several screen buffers and to make a screen shot (but can't save it yet).
  • Boost of the drawBox() function, which is used by several others. The former version, slower, is still available : drawBoxSl().

------------------------------------------------------------------------------------------

Features:

nRGBlib is composed of several packages to perfectly suit your needs.

  • nCOMMON:
    • Color, RGB <-> BW conversion, precomputed colors.
    • Screen buffer, creation, drawing, screen shootinh, clearing.
    • setPixel(), clearScreen().
  • nGEO:
    • Shapes: Discus, Circle, Line, Rectangle, Square, Triangle.
    • Display functions of these shapes.
  • nTILE:
    • Tile 8x8 in one color or in multicolors.
    • Display functions of tiles.
    • ? Tiles are saved INSIDE of the program.
  • nIMAGE:
    • Image, initializing, loading, drawing, getPixel().
    • Sub-image, initializing, loading, drawing, getPixel().
    • ? Images are saved OUTSIDE of the program.
  • nGUI:
    • Structures: Letter, Text.
    • Display functions of these structures.
  • nMATHS:
    • rand() and randMinMax() functions.
------------------------------------------------------------------------------------------

Medias :

GeometriCX v0.1


nRGBlib v0.1 with CXSnake and GeometriCX


nRGBlib v0.2dev with HelloRGB, CXSnake and GeometriCX (Thanks to Goplat for his emulator)


nRGBlib v0.3 indev : RPG + map editor

4bpp drawing has been accelered a lot since v0.3, but the video was taken before the optimization.

------------------------------------------------------------------------------------------

Downloads:
Here is my Bitbucket (Mercurial) repository. Go in "Downloads" section :
https://bitbucket.org/totorigolo/nrgblib/overview
  • Tags ? v0.* ? zip to get source.
  • "samples-v0.*.zip" to get only the samples.
------------------------------------------------------------------------------------------
If you have any question or suggestion about this library, please feel free  :)

totorigolo
« Last Edit: September 12, 2012, 05:53:29 am by totorigolo »
nRGBlib - A portable graphic library for Nspire !

Offline Jim Bauwens

  • Lua! Nspire! Linux!
  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1881
  • Rating: +206/-7
  • Linux!
    • View Profile
    • nothing...
Re: [nRGBlib] W.I.P - Colorful librairy for Ndless 3.1
« Reply #1 on: January 04, 2012, 04:03:02 pm »
Very nice totorigolo :)
I've been looking into my copy, and it looks very straitforward to use. I haven't done anything with it yet, but I definitly will :D
« Last Edit: January 04, 2012, 04:03:22 pm by jimbauwens »

Offline totorigolo

  • LV2 Member (Next: 40)
  • **
  • Posts: 24
  • Rating: +9/-0
    • View Profile
Re: [nRGBlib] W.I.P - Colorful librairy for Ndless 3.1
« Reply #2 on: January 04, 2012, 04:06:08 pm »
The 0.1 version is in only one file, and I didn't pay attention about organization. In the future version, the code will be more structured  ;)
nRGBlib - A portable graphic library for Nspire !

Offline Adriweb

  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1708
  • Rating: +229/-17
    • View Profile
    • TI-Planet.org
Re: [nRGBlib] W.I.P - Colorful librairy for Ndless 3.1
« Reply #3 on: January 04, 2012, 04:07:36 pm »
This lib is awesome :)

You should post a screenshot/video ;)
My calculator programs
TI-Planet.org co-admin.
TI-Nspire Lua programming : Tutorials  |  API Documentation

Offline epic7

  • Chopin!
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2200
  • Rating: +135/-8
  • I like robots
    • View Profile
Re: [nRGBlib] W.I.P - Colorful librairy for Ndless 3.1
« Reply #4 on: January 04, 2012, 04:25:11 pm »
This looks useful!
I can't wait for ndless 3 to come out :)

 

Offline totorigolo

  • LV2 Member (Next: 40)
  • **
  • Posts: 24
  • Rating: +9/-0
    • View Profile
Re: [nRGBlib] W.I.P - Colorful librairy for Ndless 3.1
« Reply #5 on: January 04, 2012, 04:27:03 pm »
Adriweb: Done ! I used the same images than jimbauwens.

epic7: Thanks you !
« Last Edit: January 04, 2012, 04:28:08 pm by totorigolo »
nRGBlib - A portable graphic library for Nspire !

Offline Nick

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1166
  • Rating: +161/-3
  • You just got omnom'd
    • View Profile
    • Nick Steen
Re: [nRGBlib] W.I.P - Colorful librairy for Ndless 3.1
« Reply #6 on: January 04, 2012, 04:50:53 pm »
when watching that video, it looks like you're gonna be burried below a bunch of colored circles, since they seem to come closer xp

but it's really great, this will be a big help in game development.. congratz

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: [nRGBlib] W.I.P - Colorful librairy for Ndless 3.1
« Reply #7 on: January 04, 2012, 06:25:31 pm »
Looks very nice, any demo will be available soon? :)

Keep us updated when you can :)

Offline totorigolo

  • LV2 Member (Next: 40)
  • **
  • Posts: 24
  • Rating: +9/-0
    • View Profile
Re: [nRGBlib] W.I.P - Colorful librairy for Ndless 3.1
« Reply #8 on: January 05, 2012, 01:53:46 pm »
What do you mean when you say "demo" ? Ndless 3 isn't yet public. Currently, there are CXSnake and GeometriCX. (Perhaps CXSnake screen shots ?  ;D)
nRGBlib - A portable graphic library for Nspire !

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: [nRGBlib] W.I.P - Colorful librairy for Ndless 3.1
« Reply #9 on: January 05, 2012, 02:27:41 pm »
Oh I meant so we can test it, but yeah you're right about Ndless x.x. Maybe more animated screenshots?
« Last Edit: January 05, 2012, 02:28:04 pm by DJ_O »

Offline totorigolo

  • LV2 Member (Next: 40)
  • **
  • Posts: 24
  • Rating: +9/-0
    • View Profile
Re: [nRGBlib] W.I.P - Colorful librairy for Ndless 3.1
« Reply #10 on: January 05, 2012, 04:11:20 pm »
New video on the presentation topic, about compatibility between Nspire CX / Nspire Touchpad/Clickpad.


I did this compatibility with the following formula : color = ((R + G + B) / 3) / 16; and then I use the Ndless 2.1 setPixel(); function.
I have also edited my Color structure to be able to do this :

Code: [Select]
    //...
    Color appleCol; // Red for CX and Black for Classic
        appleCol.R = 255; // |
        appleCol.G = 0;   // |-> Red
        appleCol.B = 0;   // |
        appleCol.BW = 0; // Black

    drawSthColor(x, y, appleCol);
    //...
nRGBlib - A portable graphic library for Nspire !

Offline apcalc

  • The Game
  • CoT Emeritus
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1393
  • Rating: +120/-2
  • VGhlIEdhbWUh (Base 64 :))
    • View Profile
Re: [nRGBlib] W.I.P - Colorful librairy for Ndless 3.1
« Reply #11 on: January 11, 2012, 03:25:30 pm »
Nice video and great work! ;)


Offline totorigolo

  • LV2 Member (Next: 40)
  • **
  • Posts: 24
  • Rating: +9/-0
    • View Profile
Re: [nRGBlib] W.I.P - Colorful librairy for Ndless 3.1
« Reply #12 on: January 16, 2012, 04:26:42 pm »
Here it is ! The new nRGBlib v0.2 :). It will be available soon to Download...  ;)
« Last Edit: January 16, 2012, 05:42:02 pm by totorigolo »
nRGBlib - A portable graphic library for Nspire !

Offline Jim Bauwens

  • Lua! Nspire! Linux!
  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1881
  • Rating: +206/-7
  • Linux!
    • View Profile
    • nothing...
Re: [nRGBlib] W.I.P - Colorful librairy for Ndless 3.1
« Reply #13 on: January 17, 2012, 03:11:48 am »
Very nice !
I'll soon take a look at it :D

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: [nRGBlib] W.I.P - Colorful librairy for Ndless 3.1
« Reply #14 on: January 17, 2012, 03:42:39 am »
Pretty good so far :)