Gamestudio Links
Zorro Links
Newest Posts
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AbrahamR), 717 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Publish Game with Scriptfiles #366135
04/01/11 16:03
04/01/11 16:03
Joined: Mar 2010
Posts: 20
K
KingdaKa Offline OP
Newbie
KingdaKa  Offline OP
Newbie
K

Joined: Mar 2010
Posts: 20
Hi there!

Im currently working on a first person multiplayer shooter. Ive defined many variables and constants (#define) which have much influence on the game (like key defines, bulletspeed, number of bullets for each weapon, player speed and so on). At the moment iam working on the game-balance, so i have to adjust each of these defines and variables a lot to figure out which values are the best for a balanced game. Problem is that i always need to compile a new exe for every change i made (exe file for the other computer). So is there a way, to compile the game with alle the scripts so that i can adjust things after compiling? I dont wanna do everything in the console and of course the defines arent changeable ingame.

Maybe i could use some extern textfiles, and read them on game start, but hopefully there is an easier way.

For info: i use A8 commerical

I appreciate for you help!

kingda_ka

Re: Publish Game with Scriptfiles [Re: KingdaKa] #366136
04/01/11 16:14
04/01/11 16:14
Joined: Nov 2007
Posts: 2,568
Germany, BW, Stuttgart
MasterQ32 Offline
Expert
MasterQ32  Offline
Expert

Joined: Nov 2007
Posts: 2,568
Germany, BW, Stuttgart
this should be really easy...
use variables instead of defines!
you can save the variables in a file and load them, so the users can change those values
there is no easier way than this


Visit my site: www.masterq32.de
Re: Publish Game with Scriptfiles [Re: MasterQ32] #366139
04/01/11 16:38
04/01/11 16:38
Joined: Mar 2010
Posts: 20
K
KingdaKa Offline OP
Newbie
KingdaKa  Offline OP
Newbie
K

Joined: Mar 2010
Posts: 20
sry but i dont get it. do you mean an extern text file which i open with "file_open" or something like that? If i include a file in my script, it will be published in the .exe also, so that i cant make changes after publishing.

supposably its very easy but i have a mind blockage atm grin

Re: Publish Game with Scriptfiles [Re: MasterQ32] #366140
04/01/11 16:41
04/01/11 16:41
Joined: Feb 2009
Posts: 2,154
Damocles_ Offline
Expert
Damocles_  Offline
Expert

Joined: Feb 2009
Posts: 2,154
Quote:
compile the game with alle the scripts


grin

Try to set up a loader-function in the beginning of your main,
and (as mentioned) excange the defines
in alle your scripts with something like this:

#define HEALTH 100
#define SPEED 55

..

my.skill1=HEALTH;
my.skill2=SPEED;

----------------------
to a new approach:

var tuning[1000]; //containing the var for tuning
#define HEALTH 1
#define SPEED 2

...

my.skill1=tuning[HEALTH];

my.skill2=tuning[SPEED];


So you load it from an array filled in the loaderfunction.


The loaderfunction fills your array with the variables,
read from a file.


In the manual read about how to save/load variables from a textfile. It not very complicated.

You could even use EXCEL to define all this data, and export
it to a CSV file.

Re: Publish Game with Scriptfiles [Re: Damocles_] #366142
04/01/11 16:57
04/01/11 16:57
Joined: Mar 2010
Posts: 20
K
KingdaKa Offline OP
Newbie
KingdaKa  Offline OP
Newbie
K

Joined: Mar 2010
Posts: 20
ok, maybe its some more work as i thought

Re: Publish Game with Scriptfiles [Re: KingdaKa] #366143
04/01/11 17:07
04/01/11 17:07
Joined: Feb 2009
Posts: 2,154
Damocles_ Offline
Expert
Damocles_  Offline
Expert

Joined: Feb 2009
Posts: 2,154
Basically, if you dont want to recompile, you have to load such tuningdata from an external file.

Or just keep it like it is, and put all defines nicely into the same
script, so you have them all visible at the same place.

Since you cant just compile a specific file in Lite-C (at least I dont know of a practical way to do this)


Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1