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.

DarkBASIC Professional Discussion / i need help with my sprite

Author
Message
raixgambit
15
Years of Service
User Offline
Joined: 25th Oct 2010
Location:
Posted: 26th Oct 2010 04:26
im tryin to make the white box that appears around my sprite transparent


do:me/repeat that again
until im done
loop
Grog Grueslayer
Valued Member
21
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 26th Oct 2010 17:37 Edited at: 26th Oct 2010 23:27
You can use SET IMAGE COLORKEY to set the color that will be transparent. But because your using .jpgs it'll be hard because .jpgs don't keep solid colors. It'll probably only make a little bit of the images transparent and you'll still see some off-white on the sprites. It's best to use .png for all images so they stay exactly the way their drawn (no color changes) and .pngs allow you to use transparencies (like a window that you can see through).

Edit: Wow that's a huge SYNC RATE you've got there. Most people use 60 or totally off like I do (at zero... but when you do that you need TIMER() based movement).

Edit again: I just looked at the bottom of your code. You don't have to use REPEAT/UNTIL because just having an IF/THEN to check for the arrow keys will look just the same without the REPEAT/UNTIL for each key. You can also have more than one command within an IF/THEN check if you drop the THEN and use ENDIF to close the IF/THEN conditional check (so there's no need to have two checks for arrow keys). And you only need one SPRITE command to show where the player is outside of any IF/THEN check.



If you haven't checked them out yet take a look at TDKs tutorials to learn the basics:

http://forum.thegamecreators.com/?m=forum_view&t=99497&b=10

raixgambit
15
Years of Service
User Offline
Joined: 25th Oct 2010
Location:
Posted: 26th Oct 2010 19:30
thanks alot

do:me/repeat that again
until im done
loop
Beyond the Humans Knowledge
15
Years of Service
User Offline
Joined: 27th Oct 2010
Location:
Posted: 1st Nov 2010 16:42
make sure to use the keystate() command so you can move diagonally. You cant move diagonally with the inkey$() command.

onhcet d(-_-)b techno
baxslash
Valued Member
Bronze Codemaster
19
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 1st Nov 2010 16:59
Quote: "make sure to use the keystate() command so you can move diagonally. You cant move diagonally with the inkey$() command."

He isn't using inkey$() as far as I can tell...

Beyond the Humans Knowledge
15
Years of Service
User Offline
Joined: 27th Oct 2010
Location:
Posted: 1st Nov 2010 17:32
Its a headsups

onhcet d(-_-)b techno
baxslash
Valued Member
Bronze Codemaster
19
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 1st Nov 2010 18:31
Not quite sure of the point of the headsup in this particular case is all... Are you sure you didn't mean to post it here?

Login to post a reply

Server time is: 2026-07-22 04:37:09
Your offset time is: 2026-07-22 04:37:09