assigning variables at compile time? [APPARENTLY IMPOSSIBLE BUT NOT CRITICAL?]

Started by EnterTheStory (aka tolworthy), Wed 26/03/2008 09:53:12

Previous topic - Next topic

EnterTheStory (aka tolworthy)

This is probably a very stupid question, so apologies in advance.

At the start of my game I need to create several thousand variables. I suppose I would need to run a function at assign these at startup. Would this cause a noticable pause in the first room starting up?

I plan to seamlessly switch between different games using runAGSGame, so even a tiny delay is bad. If there is a tiny delay, is there some way to have variables pre-assigned so there is no need to run through a function to add them one by one?

Radiant

Quote from: tolworthy on Wed 26/03/2008 09:53:12
At the start of my game I need to create several thousand variables. I suppose I would need to run a function at assign these at startup. Would this cause a noticable pause in the first room starting up?
No. I've been doing this a lot, myself, and it's not noticeable.

Quote
I plan to seamlessly switch between different games using runAGSGame,
I wonder why you're doing that? If it's seamless switching you need, it's generally better to simply combine both games into a single game.

EnterTheStory (aka tolworthy)

QuoteNo. I've been doing this a lot, myself, and it's not noticeable.

Thanks. That's reassuring.

Quote
QuoteI plan to seamlessly switch between different games using runAGSGame,
I wonder why you're doing that? If it's seamless switching you need, it's generally better to simply combine both games into a single game.
Several reasons.
(1) I'm using 2.72 for (hopefully) Linux compatibility. And that means I'm restricted to 300 characters, 600 views, etc. The first game has 200 characters and 400 views, and the second game (War and Peace) will be larger.
(2) The compile is over 100MB per game (without sound), and an even bigger game would make testing too slow.
(3) The game is open ended - as time goes by more and more stories will be added to the game world.
(4) I'm still learning. I will tidy up the core code for the second game (e.g. changing the numbering of characters so the code is easier to follow).
(5) I'm aiming for an older audience, and many of the still have dial up, so this allows them to download just the stories they want and no more.

Radiant

(1) Yes, it's compatible. However, you may be able to work around the limits by re-using characters, or making more use out of the fact that a view can have 16 loops. ATOTK uses way fewer views than it rightfully should.

(2) I've run into that, you know how I fix it? By making a "temp_room" directory and movnig all rooms into there that I'm not using at the moment (and likewise, sound files). Speeds up compile time by a lot.

(4) Characters can have names, and aren't easy to re-number.

(5) That's a good point, but I wonder how large a percentage of people actually use dialup these days, and note that this number will go down between now and the point where your game is released. Note, however, that the several games you suggest creating would have overlapping parts (i.e. any shared rooms and characters) which would then have to be downloaded twice (once for each game that includes them).

I'm just saying this because splitting up makes the development more complex for you, so if you can avoid it, that'd probably speed things up.

EnterTheStory (aka tolworthy)

Thanks for the suggestion regarding moving rooms when testing. I'll have to try that.


Quote from: Radiant on Wed 26/03/2008 11:38:55
you may be able to work around the limits by re-using characters, or making more use out of the fact that a view can have 16 loops.
That's how I got into the mess in the first place! :)
I anticipated the need for extra views, so hid views in unused loops, and often renamed generic characters. But it made the code very hard to maintain. I could never find the character or view I wanted, and would accidentally leave "generic character 1" with the wrong loop, scaling, etc. I guess I'm just not good at multi-tasking. I finally discovered that I code much more quickly if every character has its own name, and every change has its own view.  So when I want a character I just refer to that character and know it will look right.

The one cost is that I have added new characters throughout the project, and have to scroll up and down to find the exact character or view that I want. For the next sub-game I'm going to put all the strangers together, all the bystanders together, all the soldiers together, and so on.

Quote from: Radiant on Wed 26/03/2008 11:38:55I wonder how large a percentage of people actually use dialup these days
My story consultant (and principle beta tester) does. My game is aimed at people who like books more than they like computers. These people are the last to want (or care for) broadband. True, they are a minority, but I am aiming at minorities.

Also, I plan to release a new story every six months for at least ten years. And encourage other people to add their own modded versions. I just don't see this as feasible unless it's modular.

Quote from: Radiant on Wed 26/03/2008 11:38:55
the several games you suggest creating would have overlapping parts (i.e. any shared rooms and characters) which would then have to be downloaded twice
True, but the common parts are much less than one quarter of the whole. And there will be slight variations between each game. No rooms are shared, and the avatar is invisible. I'm always open to new ideas (I'm still learning!) but for a project this size, modular seems to be the only way to go.

SMF spam blocked by CleanTalk