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 / Map Editor for another game..need help!

Author
Message
Kanzure
23
Years of Service
User Offline
Joined: 19th Feb 2003
Location:
Posted: 15th Jul 2003 08:11
okay, I'm getting really freaking lazy here with my game developement...lol..

I got my game in C++, and I have a very nice map editor coded in DBP...Is there a way I can load/read my files from the C++ app? The C++ app simply writes bytes and bits....i think its possible, but I want a second opinion first.
Kanzure
23
Years of Service
User Offline
Joined: 19th Feb 2003
Location:
Posted: 15th Jul 2003 18:08
anybdoy? Raven? Kentaree?

~Morph/Kanzure
Attreid
23
Years of Service
User Offline
Joined: 27th Nov 2002
Location:
Posted: 15th Jul 2003 18:47
yes, I think that it is possible
an information is an information
a byte is a byte
a float is a float
a string is exciting
an integer is an integer
I'm sure that when you save something with write file (not with save array), you can read it from any programm you want
if you write a string (yeah, I really like the stings), you can read it with the wordpad

"He will come...the voice from the outer world,
bringing the holy war, the Jihad, which will cleanse the Universe and bring us out of darkness."
Kentaree
23
Years of Service
User Offline
Joined: 5th Oct 2002
Location: Clonmel, Ireland
Posted: 15th Jul 2003 19:28
I'm not sure about this, but C++ should be able to read from binary files created by DBPro. If you use stuff like write byte etc, what you need to do in C++ is to read them in as a char, ignore the letter they mean and just take note of the number and use this number to determine the tile which you want to use.

Try something like:



This code is not tested, so it might or mightnt work, but it should give you a general idea.

Whatever I did I didn't do it!
Kanzure
23
Years of Service
User Offline
Joined: 19th Feb 2003
Location:
Posted: 15th Jul 2003 19:44
Kentaree, what I actually need is how to *write* binary files in DBP lol.

~Morph/Kanzure
the_winch
23
Years of Service
User Offline
Joined: 1st Feb 2003
Location: Oxford, UK
Posted: 16th Jul 2003 00:37
Open the dbpro help files and look at the file commands.
It would have taken about 5 minutes to try a few of the write commands and see what they actually write to a file then work out which was best to use and how to load the file in the c++ program.

You proberly want write byte.
Kanzure
23
Years of Service
User Offline
Joined: 19th Feb 2003
Location:
Posted: 16th Jul 2003 00:42
Thnx. I'll try it

~Morph/Kanzure
CodeNation

Login to post a reply

Server time is: 2026-07-21 12:49:51
Your offset time is: 2026-07-21 12:49:51