Page 1 of 1

Can I open 2 dat files at the same time? <answerd>

PostPosted: Sat Nov 12, 2011 4:01 pm
by Chai
Dear All,

I have some question that would be help to reduce the game file, if it can be.

The question is.
Can I open 2 dat files or merge files while I play the game?
I means, First dat file is like the game system such as characters and controller function and another file will contain the map of game level.
And use both of files in the same time. is it possible?

Because, If I export one by one Level or stage as Stage01.dat , Stage02.dat and Stage++.dat
All of the dat file will contain the same content, same code and same images.
So these files will make total game size is too big.

If the game editor can open or merge files together while playing the game that will help to reduce the game size.
and the dat file no need to contain the same data as images or code any more.

Thank you for your answer.
Regards,
CHAI

Edit:
I just test game on iPhone and this time I made all game stages in one .dat file.
It make the iPhone device so lack. [I use tile matching for game stage.]

Re: Can I open 2 dat files at the same time? <asking>

PostPosted: Sat Nov 12, 2011 8:36 pm
by SuperSonic
You could try making an engine in one ged that has a bunch of variables, arrays etc that define how your game will work. Then you could use loadvars(). It would be very time consuming and tedious programming but it might work :wink:

Re: Can I open 2 dat files at the same time? <asking>

PostPosted: Sun Nov 13, 2011 12:01 pm
by skydereign
Yeah, SuperSonic is right. Pretty much the thing to do is generate levels through code. What you'd want to do is have a single game engine, but have exterior files to load in variables for each game. That way, the single engine can generate the level as you need it. I wouldn't however suggest using loadVars, but rather write your own save load scripts.

Re: Can I open 2 dat files at the same time? <asking>

PostPosted: Sun Nov 13, 2011 12:53 pm
by Chai
Thank you Supersonic and Skydereign,

Generate levels through code? That means use code the arrange all tile and enemy on the stage, isn't it.
At this point, it is really interesting.

Do you have any example file for arrange stage by code?
Because I really no idea about this. Usually I arrange stage and enemy in GE directly.

Thanks.

p.s. Can I use the tile mapping editor software for this? Tile map editor

Re: Can I open 2 dat files at the same time? <asking>

PostPosted: Sun Nov 13, 2011 1:22 pm
by lcl
You may want to look at this: viewtopic.php?f=6&t=6011
:)

- lcl -

Re: Can I open 2 dat files at the same time? <asking>

PostPosted: Sun Nov 13, 2011 2:47 pm
by SuperSonic
Chai wrote:Thank you Supersonic

No problem :)

Re: Can I open 2 dat files at the same time? <asking>

PostPosted: Sun Nov 13, 2011 4:33 pm
by Chai
Dear lcl,
Thank you for your help. I will looking though your code and try to play around with it.

Re: Can I open 2 dat files at the same time? <asking>

PostPosted: Sun Nov 13, 2011 9:02 pm
by lcl
Chai wrote:Dear lcl,
Thank you for your help. I will looking though your code and try to play around with it.

Glad you find it useful. But it's not mine, it's made by Eliminator.

I can help you understand it if needed. :D

- lcl -

Re: Can I open 2 dat files at the same time? <asking>

PostPosted: Mon Nov 14, 2011 5:06 am
by Chai
I found this game for tile map with code. Gameover land by pyrometal....link
but the code quite complicate than tile mapping by Eliminator.