Search found 80 matches

by danibus
Wed Jan 29, 2020 12:46 pm
Forum: SGDK
Topic: Horizontal Scroll not showing all background image
Replies: 20
Views: 2191

Re: Horizontal Scroll not showing all background image

Hi again folks Finally it's working! I just change the code a bit and works perfectly, only scrolling in one direction, that means pressing DPAD right it's ok, scroll works and the image is showing complete :D Remember, I'm working with a 1024x224px PNG file. But not sure why moving in the other dir...
by danibus
Mon Jan 27, 2020 10:24 pm
Forum: SGDK
Topic: My SGDK Tutorials (Spanish)
Replies: 10
Views: 2820

Re: My SGDK Tutorials (Spanish)

by danibus
Fri Jan 17, 2020 9:18 am
Forum: SGDK
Topic: Horizontal Scroll not showing all background image
Replies: 20
Views: 2191

Re: Horizontal Scroll not showing all background image

This is working but not for column-tile 127, not sure why but tile 127 are being painted with column-tile 63. Just wait for moving 8 pixels to update tile, so it's painted out of "TV zone" [...] s16 offset=512; s16 offsetTILES = 0; s16 offset_old = offset; while(TRUE) { offsetTILES = (offset>>3) & 1...
by danibus
Wed Jan 15, 2020 10:51 pm
Forum: SGDK
Topic: Horizontal Scroll not showing all background image
Replies: 20
Views: 2191

Re: Horizontal Scroll not showing all background image

Thanks again Chilly Willy Now it's like this [...] VDP_drawImageEx(PLAN_B, &bgd_image, TILE_ATTR_FULL(PAL2, FALSE, FALSE, FALSE, ind), 0, 0, FALSE, TRUE); ind += bgd_image.tileset->numTile; VDP_setScrollingMode(HSCROLL_PLANE ,VSCROLL_PLANE); s16 offset=512; //PIXELS from 0 to 1023px s16 offsetTILES ...
by danibus
Wed Jan 15, 2020 3:23 pm
Forum: SGDK
Topic: Horizontal Scroll not showing all background image
Replies: 20
Views: 2191

Re: Horizontal Scroll not showing all background image

Thanks Chilly Willy, changed with offsetTILES = (offset>>3) % 128; //offset=0..1023 then offsetTILES=0..127 Anyway, I can see 1st tile-column (left part of visible tiles) updating. I think I have to update in another place but not sure why, as 1st column dissapearing at left part (tile column 0 i.e....
by danibus
Wed Jan 15, 2020 12:42 pm
Forum: SGDK
Topic: Horizontal Scroll not showing all background image
Replies: 20
Views: 2191

Re: Horizontal Scroll not showing all background image

I'm fighting with scroll code again, it's working but there is a small problem 320x224px, horizontal scroll from right to left, using an image with size 1024x224px The problem is that I can see when tiles are being updated, just when left tile colum is going to dissapear at the left part, it's updat...
by danibus
Fri Jan 03, 2020 4:32 pm
Forum: Megadrive/Genesis
Topic: Shinobi arcade port
Replies: 3
Views: 720

Re: Shinobi arcade port

Nice project, can't wait to see bosses
by danibus
Thu Dec 12, 2019 12:45 pm
Forum: SGDK
Topic: My SGDK Tutorials (Spanish)
Replies: 10
Views: 2820

Re: My SGDK Tutorials (Spanish)

Little update Lesson 00 - SGDK + CodeBlocks (instalation) Lesson 01 - Hello World Lesson 01 - Clone and Mistakes Lesson 02 - Controls Lesson 03 - Tiles and Plans Lesson 03 - Tiles and Plans (II) Lesson 04 - Tiles from Images Lesson 04 - Tiles from Images (II) Lesson 04 - Tiles from Images (III) Less...
by danibus
Sat Oct 12, 2019 8:08 pm
Forum: SGDK
Topic: Horizontal Scroll not showing all background image
Replies: 20
Views: 2191

Re: Horizontal Scroll not showing all background image

If scrolling is still troubling you, I've altered the SGDK's "Sprite" example to do basic scrolling. (see attachment, scrolling.zip) Made the playfield wider (1280px wide) to see the effect. Also, removed the BEST compression for the tilemaps, as VDP_setMapEx is slower when decompressing data (too ...
by danibus
Fri Oct 11, 2019 11:02 am
Forum: SGDK
Topic: Horizontal Scroll not showing all background image
Replies: 20
Views: 2191

Re: Horizontal Scroll not showing all background image

Still having problems with scroll. Let's work simple. Horizontal scroll only (from left to right). 320x224px. Only 1 plane. No sprites. I'm using sonic background from SGDK sample folder but I add px position (see background's bottom) scroll_v3.png As you can see this image have 640x224px, then 80x2...
by danibus
Mon Oct 07, 2019 6:08 am
Forum: SGDK
Topic: Test Sprite Collision Flag
Replies: 8
Views: 2883

Re: Test Sprite Collision Flag

Hi there, here testing sprite collision flag also :mrgreen: It's working, but not sure why... this is my code [..] //include and all these stuff int a = 0; main() { [...] //add sprites, pals,... and these things while(1) { handleInput(); check_collision(); SPR_update(); VDP_waitVSync(); } } check_co...
by danibus
Sun Oct 06, 2019 10:17 am
Forum: SGDK
Topic: Horizontal Scroll not showing all background image
Replies: 20
Views: 2191

Re: Horizontal Scroll not showing all background image

Awesome, best explanation ever!! :D

Thanks a lot, I will try again, have a nice day
by danibus
Sat Oct 05, 2019 9:20 pm
Forum: SGDK
Topic: Horizontal Scroll not showing all background image
Replies: 20
Views: 2191

Re: Horizontal Scroll not showing all background image

Hi again, I'm afraid I saw lot of threads but no success at all. Ok so by default with SGDK we have 512 pixels wide, that is, 64 tiles (from 0 to 63). Question. bga.png is 640px wide. Where are the last 640-512=128px (16 tiles)? (from 64 to 79) Are they still in memory somewhere? I tried to use VDP_...
by danibus
Tue Oct 01, 2019 10:24 pm
Forum: SGDK
Topic: Horizontal Scroll not showing all background image
Replies: 20
Views: 2191

Re: Horizontal Scroll not showing all background image

Try with another NONE name, img_file, compression, mapopt IMAGE bgb_image "gfx/bgb.png" NONE NONE IMAGE bga_image "gfx/bga.png" NONE NONE This is not working properly, lot of artifacts. The tilemap is 512px wide. You need to draw in new tiles on the sides as you scroll it. Yes, I think this is the ...
by danibus
Tue Oct 01, 2019 3:00 am
Forum: SGDK
Topic: Horizontal Scroll not showing all background image
Replies: 20
Views: 2191

Re: Horizontal Scroll not showing all background image

This is my .res

IMAGE bgb_image "gfx/bgb.png" NONE
IMAGE bga_image "gfx/bga.png" NONE

Tried also

IMAGE bgb_image "gfx/bgb.png" BEST
IMAGE bga_image "gfx/bga.png" BEST

No changes at all