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 / Executing from file

Author
Message
Destrugter 1
17
Years of Service
User Offline
Joined: 26th Oct 2006
Location:
Posted: 28th Mar 2008 18:28
Hello everyone, I have been making some progress with my game. Last time it was running too slow...it's perfect now because I reduced the 9k sprites to about 100...anyway, my question is if I can have this in a file
Quote: "
DATA "BS","W","G"
"

That is what I have in just a normal file outside of the comiler. Now what I want to know is, is there a way I can open the file (lets say its "Terrain1") read the string, then have DBP act on the statement...as in making it execute a data statement from the file?

If this is possible please, can someone show me, this will make my code much shorter and much more organized. Thanks for any Attempts to help.

do you love video games a lot ¿¿¿ then comeon down too game zone252 @ http://www.freewebs.com/gamezone252/
TDK
Retired Moderator
21
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 28th Mar 2008 18:34
Quote: "Now what I want to know is, is there a way I can open the file (lets say its "Terrain1") read the string, then have DBP act on the statement"


Tutorial 4 covers opening files and reading data here:

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

However, I wouldn't have Data statements in the file. Rather than

DATA "BS","W","G"

You would have:

BS
W
G


in the file and just read them in and do what is necessary.

TDK_Man

Destrugter 1
17
Years of Service
User Offline
Joined: 26th Oct 2006
Location:
Posted: 29th Mar 2008 02:01
Ok, thanks TDK, I put that tutorial on my desktop..it's a great tutorial. Thanks for the help, and nice tutorial...ill be sure to check out ur other ones.

do you love video games a lot ¿¿¿ then comeon down too game zone252 @ http://www.freewebs.com/gamezone252/

Login to post a reply

Server time is: 2024-09-27 12:22:18
Your offset time is: 2024-09-27 12:22:18