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 Discussion / images just WILL NOT load

Author
Message
DaktaV2
19
Years of Service
User Offline
Joined: 5th Nov 2005
Location:
Posted: 20th Nov 2005 18:32
hey guys im no newbie *(well i am really but i used db for about 18 months now on an on and off basis)

im just trying to simply load an image and fill a matrix with it, thats all yet db just will not load any image whatsoever. Ive used both load image and get image (via load bitmap) and ive also tried loading different files, but the end result is always the same. Cannot load specified image.bitmap. any ideas? can post code if you like.

Have you ever put gloves in the glovce compartment? Didn't think so.
ThinkDigital
19
Years of Service
User Offline
Joined: 18th Aug 2005
Location: A galaxy far, far away...
Posted: 20th Nov 2005 18:53
Source code, por favor.

AdamGameSource.com
3d Model Competition
Halo Man
19
Years of Service
User Offline
Joined: 5th Nov 2005
Location:
Posted: 20th Nov 2005 21:10 Edited at: 19th Dec 2005 14:26
The same has been happening to me! But I think i figured out the solution...

Instead of:

load image "filename.filetype",1

Try:

load bitmap "filename.bmp",1

Make great games with C++ and OpenGL!
C++ Tutorial: http://www.cplusplus.com/doc/tutorial
OpenGL Tutorial: http://nehe.gamedev.net/lesson.asp?index=01
Me!
19
Years of Service
User Offline
Joined: 26th Jul 2005
Location:
Posted: 20th Nov 2005 21:52
code?



if there is one thing I can NOT tolerate, it`s intolerant people.
Sven B
20
Years of Service
User Offline
Joined: 5th Jan 2005
Location: Belgium
Posted: 20th Nov 2005 21:59 Edited at: 20th Nov 2005 22:00
Common mistakes by new programmers:
- Make sure all the files are in the same directory as the DarkBasic project. If not, make sure you notice the complete URL (usually starting with "C:\program files\...").
- Check for the filename. It's case sensitive!
- Check if you wrote the extension (.bmp, .jpg, ...). This is not case sensitive.
- Try opening the image in paint to see if the syntax of the file is correct.
- Make sure the file name is between "" (a string).

When none of the above works, you have a problem.

Immunity and Annihalation makes Immunihalation...
DaktaV2
19
Years of Service
User Offline
Joined: 5th Nov 2005
Location:
Posted: 20th Nov 2005 22:55
sven I know you mean well but under no circumstances will i spend 3 hours trying to load an image and not check the filename, thanks for the advice though.

In the end i got it working. It was an older version of darkbasic, which obviously had some kind of bug in it that wasnt capable of loading images in the way I was trying.


However i can fire a new question at you, (I shall include the entire code at this point so far) is that I would like to add snow to my world.

The way I wish to do it would be to make around 200 small spherical objects (quite resource intensive but easiest way) which will be placed randomly throught the matrix and at random height, decrementing each frame and once the height reaches zero they will be placed back to their original ehight (just above the camera), I have done this thousands of times before but am experiencing problems. To create this many objects I usually use a loop such as:

for i = 5 to 50
make object sphere,i,200
position object i,rnd(2000),rnd(100),rnd(2000) : rem to fill matrix
next i

the problem is, even though this usually it works it doesnt here. Ive started with object number 5 as to prevent conflicting with the tfirst three objects (1-3 respectively). I get a series of two error messages, if i run it with the above code in it says the object does not exist and highlights the main loop, if I remove the code that positions the snow it says the object number must be in range of 1-65***, and also highlights the main loop. Any ideas? I*m sure there is nothing conflicting there, so if you can see any blatant logical errors please feel free to point them out.

Have you ever put gloves in the glovce compartment? Didn't think so.
UFO
19
Years of Service
User Offline
Joined: 11th Oct 2005
Location:
Posted: 20th Nov 2005 23:23
Quote: "- Check for the filename. It's case sensitive!"

uh...no its not...

blanky
20
Years of Service
User Offline
Joined: 3rd Aug 2004
Location: ./
Posted: 21st Nov 2005 18:14
Indeed, the filename is *NOT* case-sensitive.

Even if you're running it on the WINE emulation layer in Linux, it's not case sensitive (wine makes sure it isn't). The NTFS filesystem is case sensitive in the specification, but Windows doesn't make use of this feature.

16-colour PNGs pwn.
ThinkDigital
19
Years of Service
User Offline
Joined: 18th Aug 2005
Location: A galaxy far, far away...
Posted: 24th Nov 2005 02:18
DaktaV2, we'd sort of like to see your source code? (That code box doesn't work, put it in the post)



AdamGameSource.com 3d Model Competition

Don't support the ANJL: You were a noob once too.
Grog Grueslayer
Valued Member
19
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 16th Dec 2005 20:47
Quote: "again, don't listen to blanky. he is part of the antiantianti-n00b-justice-league. "


Blanky knows what he's talking about... and what's wrong with the Anti-Anti-Anti-Noob Justice League?

Quote: "what's rong with n00bs?"


One reason could be when they tell people not to listen to the non-noobs even though the non-noobs are totally right.


Sven B
20
Years of Service
User Offline
Joined: 5th Jan 2005
Location: Belgium
Posted: 16th Dec 2005 21:08
Quote: "- Check for the filename. It's case sensitive"


Sorry, I was assuming. And again my brain left me

Ah, and let those anti-ppl do. If they flame at us, we flame back. It's that simple.

Immunity and Annihalation makes Immunihalation...
TDK
Retired Moderator
22
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 16th Dec 2005 22:50
Quote: "The way I wish to do it would be to make around 200 small spherical objects"


There's a much better way than that - use ghosted plains. Just check the codebase, or do a search for 'particles'. Using spheres uses far, far too many polygons and you'll be able to have hunderds if not thousands more snowflakes with plains.

TDK_Man

SimSmall
20
Years of Service
User Offline
Joined: 7th Aug 2004
Location: United Kingdom
Posted: 16th Dec 2005 23:04
Quote: "use ghosted plains"


Indeed so... snowflakes will appear flat if you do this, but you should favour performance over quality...

...maybe one day I'll finish a project
Pincho Paxton
22
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 17th Dec 2005 00:51
Snowflakes are flat in real life anyway.

Sven B
20
Years of Service
User Offline
Joined: 5th Jan 2005
Location: Belgium
Posted: 17th Dec 2005 13:15
Quote: "Snowflakes and snow crystals are made of ice, nothing more. A snow crystal, as the name implies, is a single crystal of ice. A snowflake is a more general term, which can mean an individual snow crystal, a few snow crystals stuck together, all the way up to the large "puff-balls" of agglomerated snow crystals that often fall in warmer weather."


source: http://www.its.caltech.edu/~atomic/snowcrystals/primer/primer.htm
dab
20
Years of Service
User Offline
Joined: 22nd Sep 2004
Location: Your Temp Folder!
Posted: 19th Dec 2005 09:27
Hope this helps. I made a quick snippet.



Login to post a reply

Server time is: 2025-05-22 19:28:47
Your offset time is: 2025-05-22 19:28:47