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 / Sprite Questions

Author
Message
The Krush
16
Years of Service
User Offline
Joined: 1st Feb 2008
Location:
Posted: 1st Feb 2008 22:52
So I just recently started looking at the Dark GDK and getting things setup and I had a few questions that came up when looking at the functions provided for sprites:

- Does
do an allocation, and is that the only way of setting the position of the sprite? I see no other functions for setting position.
-
sends the object in the current direction it's 'pointed', but how can we make the object slide around without rotating it?

I'm sure I'll have more later but this is what I initially noticed when looking through it.

Krush

http://lostminions.org/kyates/
Theone2k
16
Years of Service
User Offline
Joined: 31st Jan 2008
Location:
Posted: 2nd Feb 2008 00:07
dbSprite ( SpriteID, XLock, YLock, ImageID );

change the X/Y will move the sprite tho you will need to redraw the sprite for it to move on screen

ie


that will move the sprive along the X axis in 2d not ventured in to 3d stuf myself yet....hope thats what your after
The Krush
16
Years of Service
User Offline
Joined: 1st Feb 2008
Location:
Posted: 2nd Feb 2008 00:21
So then
is in fact the way of changing the position. Seems rather strange there wasn't another function to move it without the image id.

What about velocity without rotation? Any ideas from anyone? I was thinking of setting up my own function to handle it, but I want it move the same as the DarkGDK velocity (so if my sprite is moving at velocity 10 and one that the DarkGDK is handling is moving at 10 they move the same speed).

Krush

http://lostminions.org/kyates/
Theone2k
16
Years of Service
User Offline
Joined: 31st Jan 2008
Location:
Posted: 2nd Feb 2008 12:30
velocity and speed will need to be worked out before you give it the new X/Y Location

The Faster its going the bigger the X/Y would be. This would then move a lot quicker.

I need to test my self but i think you could use floats for the X/Y witch will give you more exact controll of where things go.

btw im new to DarkGDK an i could be talking aload of rubbish but this is what i have worked out so far
Theone2k
16
Years of Service
User Offline
Joined: 31st Jan 2008
Location:
Posted: 2nd Feb 2008 12:49
Ahh Sorry im completely wrong just found
Quote: "
dbMoveSprite
This command will move the sprite a specified distance. Used in combination with the dbRotateSprite command a very simple top-down player character can be achieved very easily.

Syntax
void dbMoveSprite ( int iNUmber, float fVelocity )
"


Now i have to change me Prog
Kira
16
Years of Service
User Offline
Joined: 25th Jan 2008
Location:
Posted: 2nd Feb 2008 17:26
@theone2k

where'd you get the help files for the sprite syntax/codes? ive been looking for it for a while now
Theone2k
16
Years of Service
User Offline
Joined: 31st Jan 2008
Location:
Posted: 2nd Feb 2008 18:37
C:\Program Files\The Game Creators\Dark GDK\Documentation\Dark GDK.chm

Thats what I Found it in...tho the search can be a bit odd at times. I found that when looking if you could use floats in.



glad to help
Kira
16
Years of Service
User Offline
Joined: 25th Jan 2008
Location:
Posted: 3rd Feb 2008 17:24
^
thanks a lot! this will keep me away from the forums for a while!

Login to post a reply

Server time is: 2024-11-20 01:18:06
Your offset time is: 2024-11-20 01:18:06