epic7
Yay! What was that double-buffering thing?
Logged
Current Projects:
Title Language Progress Status DrillMiner C (ndless) 35% Active ? C (ndless) 0% Unconfirmed
Spoiler for Programming languages I currently know :
Java (Learning in AP Comp Sci)
C (Specifically Ndless)
Unity JavaScript
LabView (For FIRST robotics)
z80 ASM (Just a little bit
)
totorigolo
LV2 Member (Next: 40)
Offline
Gender:
Last Login: 28 April, 2013, 02:07:00
Date Registered: 19 December, 2011, 00:19:11
Location: Bouches-du-Rhône
Posts: 24
Topic starter
Total Post Ratings:
+9
Yay! What was that double-buffering thing?
If you are talking about "PS: For epic7, I haven't change your code, but I've just added the double-buffering :", I was seemingly wrong because I use only one buffer... I actually don't know how to name it, but it's a buffer
If you are talking about the code, here it is :
http://pastebin.com/UPmJT0nB . There are not several changes.
---------------------------------------------------
You can download the v0.3 samples
here !
« Last Edit: 19 April, 2012, 18:06:39 by totorigolo »
Logged
nRGBlib - A portable graphic library for Nspire !
epic7
Cool!
I didn't know that I could add buffers like that.
Now that it looks like the flashing is no longer an issue, I can start making a better game!
* epic7 downloads 0.3
« Last Edit: 19 April, 2012, 20:19:20 by epic7 »
Logged
Current Projects:
Title Language Progress Status DrillMiner C (ndless) 35% Active ? C (ndless) 0% Unconfirmed
Spoiler for Programming languages I currently know :
Java (Learning in AP Comp Sci)
C (Specifically Ndless)
Unity JavaScript
LabView (For FIRST robotics)
z80 ASM (Just a little bit
)
epic7
How do I draw images/sub-images? Also, could sub-images possibly be used as sprites?
Logged
Current Projects:
Title Language Progress Status DrillMiner C (ndless) 35% Active ? C (ndless) 0% Unconfirmed
Spoiler for Programming languages I currently know :
Java (Learning in AP Comp Sci)
C (Specifically Ndless)
Unity JavaScript
LabView (For FIRST robotics)
z80 ASM (Just a little bit
)
totorigolo
LV2 Member (Next: 40)
Offline
Gender:
Last Login: 28 April, 2013, 02:07:00
Date Registered: 19 December, 2011, 00:19:11
Location: Bouches-du-Rhône
Posts: 24
Topic starter
Total Post Ratings:
+9
* How do I draw images/sub-images?
Take a look at the RPG sample.
1 2 3 4 5 6 7 8 9 10 11 12 13
// Create the sub-image ImageSubrect tile; setImage(&tile, &img); tile.w = CELL_SIZE; tile.h = CELL_SIZE; tile.x = 0; tile.y = 0; tile.offset_x = CELL_SIZE * 3; tile.offset_y = CELL_SIZE * 2; drawImagesubrect(&tile, buffer);
edit 1: * Also, could sub-images possibly be used as sprites?
I don't know what is exactly a sprite, but you can use it to draw tiles from a tileset, or to draw an animated sprite.
A sub-image is just like a frame on an image, where you can change its height, width and position.
I hope you understand me... edit 2: Sub-Images are like SDL_Rect in these tuto :
http://vally8.free.fr/coinprog/sdl/tut5/sprite.php -
http://www.aaroncox.net/tutorials/2dtutorials/sdl_sprite.pdf . But SDL_SetColorKey() doesn't exists yet.
« Last Edit: 25 April, 2012, 02:44:58 by totorigolo »
Logged
nRGBlib - A portable graphic library for Nspire !