Search found 23 matches

by cloudstrifer
Tue May 22, 2018 1:10 pm
Forum: SGDK
Topic: MegaAtoms - Made with SGDK
Replies: 4
Views: 753

Re: MegaAtoms - Made with SGDK

Nice!
by cloudstrifer
Fri May 18, 2018 5:31 pm
Forum: SGDK
Topic: Animation Sample
Replies: 9
Views: 905

Re: Animation Sample

Thank you!
by cloudstrifer
Thu May 17, 2018 3:57 pm
Forum: SGDK
Topic: Animation Sample
Replies: 9
Views: 905

Re: Animation Sample

Is there a way to customize frame animation like Construct 2?

For example:

Frame 1: 2 Frames
Frame 2: 5 Frames
Frame 3 : 1 Frame

If animation will loop or not and if it is ping-pong.

Image
by cloudstrifer
Thu May 17, 2018 3:15 pm
Forum: SGDK
Topic: Pathfiding grid 16x16
Replies: 6
Views: 489

Re: Pathfiding grid 16x16

I will try to use your code Sik.

Chilly Willy, thank you for advices.
Stef, the SGDK is so good, thank you.

Thank you for your big help.
by cloudstrifer
Wed May 16, 2018 9:31 pm
Forum: SGDK
Topic: Pathfiding grid 16x16
Replies: 6
Views: 489

Pathfiding grid 16x16

Hi, my demo use a pathfinding algorithm "converted" from C++ to C ( https://www.geeksforgeeks.org/a-search-algorithm/ ). I don't know how to optimize it to MD, it takes 0.5 sec to create the path (20 x 14 grid). I have to generate a partial path or improve speed. I need a timeout parameter, the code...
by cloudstrifer
Mon Apr 30, 2018 8:25 pm
Forum: SGDK
Topic: Show 30 Sprites or more [solved]
Replies: 11
Views: 840

Re: Show 30 Sprites or more

:shock: So dumb!

Code: Select all

SPR_init(80, 256, 256);

Thank you!
by cloudstrifer
Mon Apr 30, 2018 7:04 pm
Forum: SGDK
Topic: Show 30 Sprites or more [solved]
Replies: 11
Views: 840

Re: Show 30 Sprites or more

Basicaly this is my code.
by cloudstrifer
Mon Apr 30, 2018 3:41 pm
Forum: SGDK
Topic: Show 30 Sprites or more [solved]
Replies: 11
Views: 840

Re: Show 30 Sprites or more

It shows only first 16 sprites. Sorry, but i don't know how to inspect VRAM. Item, objects, enemy and icons are 16x16px. char01 and char02, enemy2, enemy3 are 24x40px (width x height). arrPlayers[0] = SPR_addSprite(&char01_sprite, 160, 160, TILE_ATTR(PAL1, TRUE, FALSE, FALSE)); arrPlayers[1] = SPR_...
by cloudstrifer
Mon Apr 30, 2018 1:43 pm
Forum: SGDK
Topic: Show 30 Sprites or more [solved]
Replies: 11
Views: 840

Re: Show 30 Sprites or more

Same problem, I can't show more than 16 sprites.

I have distributed the sprites by all screen, changed priority, creating one by one by pressing buttons.
Sem títulox.png
Sem títulox.png (8.7 KiB) Viewed 695 times

:(
by cloudstrifer
Fri Apr 27, 2018 1:22 pm
Forum: SGDK
Topic: Show 30 Sprites or more [solved]
Replies: 11
Views: 840

Re: Show 30 Sprites or more

It shows only first 16 sprites. Sorry, but i don't know how to inspect VRAM. Item, objects, enemy and icons are 16x16px. char01 and char02, enemy2, enemy3 are 24x40px (width x height). arrPlayers[0] = SPR_addSprite(&char01_sprite, 160, 160, TILE_ATTR(PAL1, TRUE, FALSE, FALSE)); arrPlayers[1] = SPR_a...
by cloudstrifer
Thu Apr 26, 2018 5:09 pm
Forum: SGDK
Topic: Show 30 Sprites or more [solved]
Replies: 11
Views: 840

Show 30 Sprites or more [solved]

Hi, I want to show 30 Sprites or more at once.

I have 5 (16x16 px) different sprites, is there a way to show more than 16?

Thank you!
by cloudstrifer
Wed Apr 04, 2018 2:08 pm
Forum: SGDK
Topic: Differentiate a sprite from another during comparisons [SOLVED]
Replies: 8
Views: 689

Re: Differentiate a sprite from another during comparisons [SOLVED]

Sorry guys, the problem is sizeof function, my mistake. :oops: Thank you! int size = (sizeof(itemSprites)/sizeof(itemSprites[0])) -1; for(int y = 0; y <= size; y++) { //do get item } int size = (sizeof(objectSprites)/sizeof(objectSprites[0])) -1; for(int y = 0; y <= size; y++) { //do collisions }
by cloudstrifer
Tue Apr 03, 2018 1:59 pm
Forum: SGDK
Topic: Differentiate a sprite from another during comparisons [SOLVED]
Replies: 8
Views: 689

Re: Differentiate one sprite from another during comparisons

I have 2 comparations one to get itens and other to collide, block passage.

But my itens have collisions.

All sprites have only one index?


Code: Select all

for(int y = 0; y <= sizeof(itemSprites) -1; y++) {
    //do get item
}


for(int y = 0; y <= sizeof(objectSprites) -1; y++) {
    //do collisions
}
by cloudstrifer
Tue Apr 03, 2018 1:23 pm
Forum: SGDK
Topic: Differentiate a sprite from another during comparisons [SOLVED]
Replies: 8
Views: 689

Re: Differentiate one sprite from another during comparisons

I have some issues with this code below. Sprite* charSprites[2]; Sprite* itemSprites[10]; Sprite* enemySprites[10]; charSprites[0] = SPR_addSprite(&char01_sprite, 16, 112, TILE_ATTR(PAL2, FALSE, FALSE, FALSE)); charSprites[1] = SPR_addSprite(&char02_sprite, 16, 112, TILE_ATTR(PAL2, FALSE, FALSE, FAL...
by cloudstrifer
Thu Mar 29, 2018 7:36 pm
Forum: SGDK
Topic: Differentiate a sprite from another during comparisons [SOLVED]
Replies: 8
Views: 689

Differentiate a sprite from another during comparisons [SOLVED]

Hi! I do not know how to differentiate one sprite from another during comparisons. How can I differentiate between char01_sprite and item_sprite in a FOR LOOP? // init sprites arrSprites[0] = SPR_addSprite(&char01_sprite, 160, 160, TILE_ATTR(PAL2, FALSE, FALSE, FALSE)); arrSprites[1] = SPR_addSprite...