Search found 144 matches

by POLYGAMe
Mon Mar 28, 2016 9:30 pm
Forum: SGDK
Topic: Garbled GFX when I add sprite
Replies: 10
Views: 3192

Re: Garbled GFX when I add sprite

Stef wrote:Try to download the last rescomp tool directly from the github repository, I believe I fixed this issue few time ago !
Will do. Thanks!
by POLYGAMe
Mon Mar 28, 2016 6:02 pm
Forum: SGDK
Topic: Garbled GFX when I add sprite
Replies: 10
Views: 3192

Re: Garbled GFX when I add sprite

Hehe the joys of classic systems.

Just looking in gens and my flipped tiles are showing up as unique tiles. Is there a way to fix this? By cutting those I'd save half of my VRAM :)
by POLYGAMe
Mon Mar 28, 2016 4:31 am
Forum: SGDK
Topic: Garbled GFX when I add sprite
Replies: 10
Views: 3192

Re: Garbled GFX when I add sprite

Ok, it turns out I'm running out of tiles. I'm going to have to optimise my graphics. Might cut cars in half etc and flip the sprites. I also just realised that my road image isn't set up properly so the flipped duplicated tiles won't be detected and utilised...
by POLYGAMe
Mon Mar 28, 2016 4:03 am
Forum: SGDK
Topic: Garbled GFX when I add sprite
Replies: 10
Views: 3192

Re: Garbled GFX when I add sprite

I tried manually allocating but the following didn't work, either:

Code: Select all

   u16 iBuggyTileSet;
    iBuggyTileSet = TILE_USERINDEX + sky_tropical.tileset->numTile + road_tropical.tileset->numTile;
    SPR_setVRAMTileIndex(&sprite_buggy,iBuggyTileSet);
Gave me the same result...
by POLYGAMe
Mon Mar 28, 2016 3:24 am
Forum: SGDK
Topic: Garbled GFX when I add sprite
Replies: 10
Views: 3192

Garbled GFX when I add sprite

Hi again, I have got to the stage where I want to start adding sprites. I believe the VDP handles the tiles for me and I don't have to allocate tile memory like I do with the backgrounds, right? Anyway, the game works fine but when I add the car in, it seems part of the tileset on frame four of my r...
by POLYGAMe
Mon Feb 22, 2016 5:46 pm
Forum: SGDK
Topic: Is there a tool to tell how many tiles I'm using?
Replies: 4
Views: 1517

Re: Is there a tool to tell how many tiles I'm using?

Retro Graphics Toolkit can tell you the number of unique tiles in a given image, remove duplicates and even dither to reduce: http://gendev.spritesmind.net/forum/viewtopic.php?f=7&t=1392 It won't work for sprites though since sprite tiles not mapped by ID (unless you keep one sprite per tile). Ther...
by POLYGAMe
Mon Feb 22, 2016 9:34 am
Forum: SGDK
Topic: is a fix32 positive only?
Replies: 4
Views: 1466

Re: is a fix32 positive only?

Found the culprit - my offset variable was a u16. Oops! All working now :D
by POLYGAMe
Mon Feb 22, 2016 8:47 am
Forum: SGDK
Topic: is a fix32 positive only?
Replies: 4
Views: 1466

Re: is a fix32 positive only?

Stef wrote:Fix32 is signed but it all depends from your code implementation : having a single non signed comparison can make every thing wrong !
Good point. I'll take a closer look at my code. I could be using a u16 somewhere...
by POLYGAMe
Mon Feb 22, 2016 8:16 am
Forum: SGDK
Topic: is a fix32 positive only?
Replies: 4
Views: 1466

Re: is a fix32 positive only?

Here's a video showing what I mean:

https://www.youtube.com/watch?v=bAfB155 ... e=youtu.be
by POLYGAMe
Mon Feb 22, 2016 7:30 am
Forum: SGDK
Topic: is a fix32 positive only?
Replies: 4
Views: 1466

is a fix32 positive only?

I am having problems with numbers less than zero in scrolling my road. It works fine scrolling right but when I scroll left and it gets below zero it turns to garbled gfx. Is fix32 positive only or perhaps the problem is with the fix32toint function? What other options are there?
by POLYGAMe
Sun Feb 21, 2016 11:03 pm
Forum: SGDK
Topic: Is there a tool to tell how many tiles I'm using?
Replies: 4
Views: 1517

Re: Is there a tool to tell how many tiles I'm using?

It depends what qualifies as "using" - all tiles are "in use" at all times I guess. Do you want to keep a counter of how many tiles you've uploaded to VRAM, or determine if a specific art asset is going to fit at compile time? I'm from an assembler background so mileage may vary, but my game has a ...
by POLYGAMe
Sat Feb 20, 2016 8:58 pm
Forum: SGDK
Topic: Is there a tool to tell how many tiles I'm using?
Replies: 4
Views: 1517

Is there a tool to tell how many tiles I'm using?

I seem to remember seeing screenshots in one of the threads of an app that gives detailed VDP data but I can't find it. Anyone know where I could get it? Want to keep an eye on my tile count.
by POLYGAMe
Sun Feb 14, 2016 5:14 am
Forum: SGDK
Topic: Issue with scrolling that I just can't fix
Replies: 3
Views: 1592

Re: Issue with scrolling that I just can't fix

r57shell wrote:write equations, how much should be scroll on top of road.
and you'll see your bug.
reason is because you're calculating from bottom.
Looks like you were right. I combined the two into one function and made it less messy and counted through all 224 lines in sequence and it works. Cheers!
by POLYGAMe
Sun Feb 14, 2016 3:26 am
Forum: SGDK
Topic: Issue with scrolling that I just can't fix
Replies: 3
Views: 1592

Re: Issue with scrolling that I just can't fix

write equations, how much should be scroll on top of road. and you'll see your bug. reason is because you're calculating from bottom. Each plane is counting in different directions and meeting in the middle. The numbers are correct and even if they weren't I'm controlling the scrolling of the plane...
by POLYGAMe
Sat Feb 13, 2016 2:27 am
Forum: SGDK
Topic: Issue with scrolling that I just can't fix
Replies: 3
Views: 1592

Issue with scrolling that I just can't fix

So I've checked EVERYTHING and I can't see what's wrong. When I bend my road and leave the sky still, it works properly. My road bends to make a corner and the sky stays still. Sky not scrolling - road bent.png When I scroll the sky but don't bend the road, that also works, I get a straight road and...