Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411665 Posts in 69396 Topics- by 58451 Members - Latest Member: Monkey Nuts

May 16, 2024, 07:26:21 AM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperTechnical (Moderator: ThemsAllTook)Loading concerns
Pages: 1 [2]
Print
Author Topic: Loading concerns  (Read 3612 times)
Rob Lach
Level 10
*****



View Profile WWW
« Reply #20 on: February 05, 2010, 12:14:40 AM »

Ah, there's another wrinkle to the puzzle!
I plan to modify some of the maps geometry with scripts upon entering them, like say an event flag for FUCKING_ROCK_SLIDE is tripped.

It's loads easier to just load up a fresh copy of the room from file and play with that, rather than make a working copy in memory. WTF

I dunno what you're doing where it would be easier to modify the level by reloading it.
Don't you need it loaded into memory to change it?

Or are you going to modify the level file physically before loading and reloading that space? If that's the case you'd be just adding useless disk io steps to something you can easily do in memory.

Or are you going to have a pre/post rockslide version of the level saved?

Anyway, with 2KB levels you might as well load the whole game into memory, unless you're targeting a commodore 64 or something.
Logged

Martin 2BAM
Level 10
*****


@iam2bam


View Profile WWW
« Reply #21 on: February 05, 2010, 07:11:49 AM »

Sorry to repost but:
Do not optimize... just focus on the game.
As that rule (forgot the name) says... 80% of the processing time is going to happen in 20% of the code.
Just check for bottlenecks with a profiler AFTER the game is playable (or if something is not even letting you test it)

And for the disk issue, don't put too much mind into it. Torrents usually ass-rape the hard-drive anyway: Your regular player will have their hard-drive torn to pieces sooner or later.
Logged

Working on HeliBrawl
Alex May
...is probably drunk right now.
Level 10
*


hen hao wan


View Profile WWW
« Reply #22 on: February 05, 2010, 08:14:26 AM »

Load it all.
Logged

Ben_Hurr
Level 10
*****


nom nom nom


View Profile
« Reply #23 on: February 08, 2010, 05:47:38 PM »

I dunno what you're doing where it would be easier to modify the level by reloading it.
Don't you need it loaded into memory to change it?

Or are you going to modify the level file physically before loading and reloading that space? If that's the case you'd be just adding useless disk io steps to something you can easily do in memory.

Or are you going to have a pre/post rockslide version of the level saved?

Anyway, with 2KB levels you might as well load the whole game into memory, unless you're targeting a commodore 64 or something.
Oh no, I just have the pre/whatever version of the level, then modify it with scripts after it's loaded in but before the player can see it.
Logged
Garthy
Level 9
****


Quack, verily


View Profile WWW
« Reply #24 on: February 08, 2010, 07:58:51 PM »

Personally, I would recommend something very similar to what Hajo has said- basically implement an abstraction layer that you use to load a level. Your initial implementation should just load it from disk, no cleverness. I'd then do what nitram_cero suggested. Gloss over it, work on the game, optimise later. And when "later" arrives, if you decide you want to be clever, you can change the implementation of your abstracted layer to either preload the whole thing, or cache the last n levels, or selectively modify things, so forth. You might also want to improve the loading earlier if the load times end up annoying *you*.
Logged
Pages: 1 [2]
Print
Jump to:  

Theme orange-lt created by panic