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.

Newcomers DBPro Corner / Paste Image fails

Author
Message
Wasp
10
Years of Service
User Offline
Joined: 8th Jun 2014
Location: Your PC
Posted: 20th Jun 2014 16:57
Ok, this is very very wierd so maybe someone can help me here. I can't post my whole code because it's too big and i feel a bit shy about it (it's messy, like really horrible and stuff because i just tested random things). Anyway it doesn't matter because i put this into a blank project and it still fails.



When i run it, only test1 shows up. I already tried swapping them around to load test2 and paste it first but it makes no difference. I'm sure it's me because i was just about to post about a loading image problem but i found i misspelled something when i was looking at it just now. I hope i haven't made a really stupid "noob" mistake. If i did plz don't be mean to me.

World's worst signature - ever!
TheComet
17
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 20th Jun 2014 20:24 Edited at: 20th Jun 2014 20:26
Try this:


Or if you prefer manual syncing:


Unrelated, but you should use relative paths when loading media. Instead of "c:\test1.png" you should use "test1.png" and place the image in the same folder as your executable. Or if you want to be more tidy, make a folder in your project folder "media/images" and place them in there, and load it with "media/images/test1.png"

MrValentine
AGK Backer
13
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 23rd Jun 2014 12:12
AS far as I can see, .GIF is not supported for load image...

You need to break it down into a single image with transparency and split the frames by a power of ^2 and look at using animated sprites... start with the 'create animated sprite' command...

Hope that helps...

Wasp
10
Years of Service
User Offline
Joined: 8th Jun 2014
Location: Your PC
Posted: 23rd Jun 2014 13:18
@TheComet: Thanx but it still doesn't show, even with sync twice. Also, i did have them in my project folder but i just copied it to c:\ and named it test for testing why it was doing this. I haven't been using "relative paths" though, it was "c:\thegamecreators\darkbasic\projects\mygame\" or something like that so i will take your advice anyway since it makes sense the exe will start in "projects" anyway and then there's less chance of typos.

@MrValentine: You might be right about .gif because I tried a few pictures on the weekend and none of the gif ones loaded. I don't understand because they are not animated, just a normal picture like a web graphic. So why can darkbasic not read it if it can read .png files? Anyway, i will just have to save it as png. I can't use "sprite" because when i do the screen goes blue and stuff doesn't display properly so i am going to just paste the images instead. i will learn my own collision and animation as i get to it.

Thank you everyone, sorry for the "noob" mistake.

World's worst signature - ever!
Derek Darkly
13
Years of Service
User Offline
Joined: 22nd Sep 2011
Location: Whats Our Vector, Victor?
Posted: 23rd Jun 2014 19:42 Edited at: 23rd Jun 2014 19:58
Hello Wasp,

I guess using SPRITE turns on the 3D backdrop for some reason, hence the blue screen. Just do COLOR BACKDROP 0 to turn it black, or use TEXTURE BACKDROP n to apply a non-scrolling background from a loaded image.

You don't necessarily have to give up on using SPRITE commands, you just have to further your knowledge.
In my game D-Zone I use sprites for everything except the scrolling background, in which case I used PASTE IMAGE.

I only had success with making sprites after figuring out a way to turn my images into .PNG files with transparent backgrounds.

My preferred method is to open the image in PIXLR.COM and use the magic wand tool to select the part of the image that isn't transparent and copy that into a new, transparent image from clipboard. Alternately, you can select just the background part you want to be transparent and use the inverse selection option in the edit menu.

After your final save you should have a sprite-friendly PNG ready to use.



666GO†O666

Attachments

Login to view attachments
Derek Darkly
13
Years of Service
User Offline
Joined: 22nd Sep 2011
Location: Whats Our Vector, Victor?
Posted: 23rd Jun 2014 19:54 Edited at: 24th Jun 2014 21:29
[double post]

666GO†O666
Wasp
10
Years of Service
User Offline
Joined: 8th Jun 2014
Location: Your PC
Posted: 24th Jun 2014 14:19
@Derek Darkly: Thank you, i read about that but i forgot about the blue background >_<. That's probably why. Our artist uses gimp i think and so the images are transparent already. I might take another look at the spriting commands now. Also you double posted but maybe that was the website because i get errors alot as well.

World's worst signature - ever!

Login to post a reply

Server time is: 2024-11-23 14:44:17
Your offset time is: 2024-11-23 14:44:17