Search found 2692 matches

by Stef
Tue Apr 24, 2018 7:35 am
Forum: SGDK
Topic: A missing byte from initialized vars?
Replies: 9
Views: 104

Re: A missing byte from initialized vars?

Yeah indeed... but that was what i meant by speaking about "size alignment", i mean having a padding byte when needed to compute segment size so it's always word based. We can use different method for that, using ALIGN(2) and label difference instead of the SIZEOF(..) operator as Chilly Willy made ;)
by Stef
Mon Apr 23, 2018 9:17 pm
Forum: SGDK
Topic: A missing byte from initialized vars?
Replies: 9
Views: 104

Re: A missing byte from initialized vars?

yep, just realized that :p
I fixed the var initialization routine, should be fine :) my memory allocation routine take care of unaligned segment anyway.
by Stef
Mon Apr 23, 2018 8:46 pm
Forum: SGDK
Topic: A missing byte from initialized vars?
Replies: 9
Views: 104

Re: A missing byte from initialized vars?

I'm a bit surprised by this issue, as Sik pointed i though the segment size was always word aligned...
I will fix that, thanks for reporting :)
by Stef
Wed Apr 11, 2018 8:22 pm
Forum: Megadrive/Genesis
Topic: Where do I start? I'm seeking technical documents.
Replies: 40
Views: 1660

Re: Where do I start? I'm seeking technical documents.

No SGDK uses it as it can do partial update of SAT so at contrary that is a good way of using it but what i meant is that the sprite engine by itself is heavy in general (but that s the cost of its flexibility) and having a more customized engine designed on purpose can be faster just updating the w...
by Stef
Wed Apr 11, 2018 3:43 pm
Forum: Megadrive/Genesis
Topic: Where do I start? I'm seeking technical documents.
Replies: 40
Views: 1660

Re: Where do I start? I'm seeking technical documents.

Well in fact the SGDK Sprite engine does use the link field to define sprite order and it does help a bit but just because the Sprite Engine by itself is a heavy beast (each sprite internally has a prev / next link anyway).
by Stef
Wed Apr 11, 2018 7:44 am
Forum: Megadrive/Genesis
Topic: Iridon Introduction
Replies: 12
Views: 682

Re: Iridon Introduction

80 px cell is quite big indeed, and having ^2 size is better. Usually we use 16x16, 32x32 or 64x64 cells (and 64x64 cells is already quite big). If some sprite are really bigger than max cell size then you can also add your sprite to several cells. Having too large cells almost kill the point of doi...
by Stef
Sun Apr 08, 2018 4:09 pm
Forum: Megadrive/Genesis
Topic: Iridon Introduction
Replies: 12
Views: 682

Re: Iridon Introduction

Normally you define your cell size depending your actor size, and so cell size should be equivalent to the biggest actor less or more.. When adding actor to cell, you have to consider using the actor mass center / barycenter to find which cell own it, when you do collision checking don't forget you ...
by Stef
Fri Apr 06, 2018 7:59 am
Forum: SGDK
Topic: Layer priority
Replies: 4
Views: 151

Re: Layer priority

You can update / set TileMap using the VDP_fillTileMapxxx(...) or VDP_setTileMapxxx(...) methods. Then you can use the TILE_ATTR(..) or TILE_ATTR_FULL(..) macros on any methods (mentioned above) using basetile or baseflags arguments. But before telling you that, you need to know how work the Megadri...
by Stef
Thu Apr 05, 2018 4:11 pm
Forum: SGDK
Topic: Layer priority
Replies: 4
Views: 151

Re: Layer priority

Yep :
put plan B and plan A in high priority while using low priority sprites.
You can set priority per tile on plan, and per sprite, that offer many possibilities :)
by Stef
Thu Apr 05, 2018 1:34 pm
Forum: Megadrive/Genesis
Topic: Iridon Introduction
Replies: 12
Views: 682

Re: Iridon Introduction

You can hopefully escape the n² complexity for collision, you can use screen partitioning to compute collision only on adjacent screen 'cells'.
by Stef
Wed Apr 04, 2018 8:55 am
Forum: SGDK
Topic: Differentiate a sprite from another during comparisons [SOLVED]
Replies: 8
Views: 292

Re: Differentiate a sprite from another during comparisons

I'm not sure to understand what is your problem...
You want to make collision between which kind of object ?
by Stef
Fri Mar 30, 2018 9:23 am
Forum: SGDK
Topic: Differentiate a sprite from another during comparisons [SOLVED]
Replies: 8
Views: 292

Re: Differentiate one sprite from another during comparisons

Why not using separate variable to store you different kind of sprite ? Sprite* charSprite; Sprite* itemSprites[10]; charsprite = SPR_addSprite(&char01_sprite, 160, 160, TILE_ATTR(PAL2, FALSE, FALSE, FALSE)); itemSprites[0] = SPR_addSprite(&item_sprite, 16, 112, TILE_ATTR(PAL2, FALSE, FALSE, FALSE))...
by Stef
Mon Mar 26, 2018 8:34 am
Forum: Demos
Topic: Unnamed "ninja" game (Dev Diary thread)
Replies: 123
Views: 4739

Re: Unnamed "ninja" game (Dev Diary thread)

It looks quite nice and only minors slowdowns noticed, again using some optimizations as you made on sprite allocation should be enough to get rid of them, well done ! I'm glad to see the sprite engine is fast enough even using 100% C code right now, i may pass some critical sections in assembly lat...
by Stef
Wed Mar 21, 2018 3:58 pm
Forum: Demos
Topic: Unnamed "ninja" game (Dev Diary thread)
Replies: 123
Views: 4739

Re: Unnamed "ninja" game (Dev Diary thread)

Are you using tile/line hoz scroll instead of plane scroll? Perhaps VDP_init() doesn't set the mode back to plane but didn't check myself. normally VDP_init() reset everything (registers and VRAM)... that's weird. To expand on the debug assertion idea, GCC provides the macros __FILE__, __LINE__, an...
by Stef
Wed Mar 21, 2018 3:53 pm
Forum: Demos
Topic: Unnamed "ninja" game (Dev Diary thread)
Replies: 123
Views: 4739

Re: Unnamed "ninja" game (Dev Diary thread)

...i think i prefer my original SGDK logo, need to change the text though :p You already have a logo? Where is it? :) Not yet put on the repository, in fact this is the one you can find from the profil picture here : https://github.com/turiaso This guy is actually writing the resourcemanager tool, ...