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 / DarkGDK - Visual Basic 2008 Engine

Author
Message
Comp Guru 910
16
Years of Service
User Offline
Joined: 23rd Dec 2007
Location:
Posted: 29th Dec 2007 21:17
Im still new to this DarkGDK thing, but im starting to get used to it. My question is. Is there a way to read ini files through db? What I have done is a few years ago I built a small engine (very small) in Visual Basic. It had everything you needed to create items, weapons, monsters and so on, and stored all their information inside of an ini file (texture, model, damage, stats and all that fun stuff) what im trying to do is continue to use my editor in visual basic, to load up all my stuff in dark gdk. Is this possible? If so, how do I go about doing it. Heres an example of what the ini would look like

[item1]
name="Potion"
effect="Add HP"
value="Plus50"
model="potion.x"
texture="potion.png"
[item2]
name="Bomb"
effect="DamageHP"
value="Minus50"
model="bomb.x"
texture="bomb.png"

etc.

Then, to position the objects on a level, the level is stored as.

[general]
name="Level 1"
model="level1.dbo"
[playerpositioning]
playerstartx="30"
playerstarty="getgroundheight"
playerstartz="30"
etc

Is anyone following my drift?

typos...
Pixel Perfect
17
Years of Service
User Offline
Joined: 21st Feb 2007
Location: UK
Posted: 29th Dec 2007 22:13
Take a look at the File Handling commands in the help file.
I'm sure there is no direct support for ini files but it should be fairly easy to load the file and write a parsing routine to extract and store all of the Key information. Then just write custom loaders to get your media into the engine and build your objects.

No matter how good your code is, someone will improve on it
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 31st Dec 2007 04:10
You there might still be a win32 native dll that loads INI files for ya.

CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 31st Dec 2007 12:31
Get/Write PrivateProfileString
Get/Write PrivateProfileSection

are the 4 win32api commands you can use from vb.net, to read/write win ini files, using Declare Function calls in your code

My DBP plugins page is now hosted [href]here[/href]

Login to post a reply

Server time is: 2024-11-19 20:38:31
Your offset time is: 2024-11-19 20:38:31