Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / Help with sprite tileing algorithm

Author
Message
wickedly kick it
17
Years of Service
User Offline
Joined: 13th Jul 2006
Location: Fort-worth Texas
Posted: 9th Aug 2011 04:26
So far i have something like this:

loader is the number of objects,
tileSystem[array of 79].load(idofimage,image path, xpos, ypos);

it just shows a blue screen, just curious what i'm doing wrong here.

Hassan
15
Years of Service
User Offline
Joined: 4th May 2009
Location: <script> alert(1); </script>
Posted: 9th Aug 2011 05:27
does your tile system update itself (i.e uses dbSprite)? are you missing dbSync? though, you should have showed us more code

wickedly kick it
17
Years of Service
User Offline
Joined: 13th Jul 2006
Location: Fort-worth Texas
Posted: 9th Aug 2011 05:50
Here's the full source


And the "Engine.h"


JTK
14
Years of Service
User Offline
Joined: 10th Feb 2010
Location:
Posted: 9th Aug 2011 07:59
Two things come to mind:

First, make sure that "grass.png" is in the project directory (when running from the IDE) or in the same directory as the EXE (when running from the window's explorer).

Second, your load() method is using the first parameter as ID values for GDK Images and Sprites. Passing the first one as a Zero(0), I believe is causing you some problems... Change it to this:




Hope this helps,

JTK
wickedly kick it
17
Years of Service
User Offline
Joined: 13th Jul 2006
Location: Fort-worth Texas
Posted: 9th Aug 2011 16:24
I feel stupid I should've known i couldn't use a zero sprite. it works now thank you!

Login to post a reply

Server time is: 2024-05-23 21:57:15
Your offset time is: 2024-05-23 21:57:15