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 / Questions on LoopSDK() & other subjects.

Author
Message
Digital Scribe
18
Years of Service
User Offline
Joined: 16th Sep 2005
Location:
Posted: 17th Jan 2006 04:03
First, I have seen the function LoopSDK() in several DarkSDK programs and I'm curious on what it's used for.
Second, since the docs for the SDK looks like it was copy & pasted from the DBPro docs, I was wandering if there was any important quirks (or problems) to watch out for in the SDK.
Third, does anybody know an way to have a single sprite image have alternate coloring without having seperate image files?

Example 1: If I'm makeing a 2D tile-graphic fantasy RPG and I want to let the player to be able to choose his hair color, but I don't want to draw separate versions of the PC's sprite, how would I go about this?
Example 2: If I'm making a game with colored blocks and I want to have variable color blocks with only one sprite image, how would I do this?

I know some games use grayscale images as a sort of template and then color them, but I don't know how to do it with the SDK.

Many thanks ahead of time to all of you.
Todah rabah liphney hamo'ed el-atem.
OSX Using Happy Dude
20
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 17th Jan 2006 10:16
Quote: "First, I have seen the function LoopSDK() in several DarkSDK programs and I'm curious on what it's used for."

Its a replacement for the PeekMessage & Translate message functions (plus other SDK related stuff), so the program (and any others running) can continue running.

Quote: "Second, since the docs for the SDK looks like it was copy & pasted from the DBPro docs, I was wandering if there was any important quirks (or problems) to watch out for in the SDK."

Some functions currently require a DWORD pointer when passing a string, some are spelt differently to the help file, and a few dont currently work - but thats about it.

Quote: "Third, does anybody know an way to have a single sprite image have alternate coloring without having seperate image files? "

No, because you cant rotate a palette.

Quote: "If I'm makeing a 2D tile-graphic fantasy RPG and I want to let the player to be able to choose his hair color, but I don't want to draw separate versions of the PC's sprite, how would I go about this?"

Probably some sort of fill routine would be best.

Quote: "If I'm making a game with colored blocks and I want to have variable color blocks with only one sprite image, how would I do this?"

Again, either a fast fill routine or recreate the block on the fly - but then you would suffer a speed hit.

Quote: "I know some games use grayscale images as a sort of template and then color them, but I don't know how to do it with the SDK."

I dont believe the SDK will let you create and use your own palettes.

Blog:http://spaces.msn.com/members/BouncyBrick/
Web Site:http://www.nicholaskingsley.co.uk
Smoke me a computer chip, I'll be baking breakfast.
Paisleys finest
18
Years of Service
User Offline
Joined: 11th Nov 2005
Location: In a house
Posted: 17th Jan 2006 13:03
Here's how to access the image data:

http://forum.thegamecreators.com/?m=forum_view&t=67020&b=1

I'm working on a sprite colourisation algorithm myself. Yeah there will be a CPU hit in the code I write, but thats usually the tradeoff against memory usage

Scott Tunstall
Author of the UNIFIED ZOMBIE MOD (www.unifiedzombiemod.wz.cz)
Current work in progress: Retro Remake of BRUCE LEE, by Datasoft (1984)
Digital Scribe
18
Years of Service
User Offline
Joined: 16th Sep 2005
Location:
Posted: 17th Jan 2006 14:47
With LoopSDK(), how would it be used in a program and why.
OSX Using Happy Dude
20
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 17th Jan 2006 15:20
Why I've already explained before. To use is do something like :



Blog:http://spaces.msn.com/members/BouncyBrick/
Web Site:http://www.nicholaskingsley.co.uk
Smoke me a computer chip, I'll be baking breakfast.
Barnski
18
Years of Service
User Offline
Joined: 26th Jan 2006
Location: Switzerland, Zurich
Posted: 28th Jan 2006 00:25
Hello Stinky Stoat,

Actually LoopSDK() was exactly what I was looking for, since the program crashes if I don't use this function and click on the close button of the window -> [X].

But looking at the code you pasted;
can you tell me why the program crashes if I leave out the && !dbEscapeKey() part and then hit escape when the program runs?

What if I want my escapekey to be assign to something different than having my program crashed?

greets,
Barnski.

-- I just started with DarkSDK, by translating DBP Projects. So please be patient when helping me thanx! --

Login to post a reply

Server time is: 2024-05-17 08:41:06
Your offset time is: 2024-05-17 08:41:06