Jump to content


Photo

List Performance/Resource Use


  • Please log in to reply
2 replies to this topic

#1 heyufool1

heyufool1

    Fail

  • GMC Member
  • 1651 posts
  • Version:GM8

Posted 31 December 2011 - 11:11 PM

Hello!  I'm implementing saving and what I want to do is save on a per-room basis.  I have the system all set up and it works like this:

At the Room End every object that has something to save saves it's data into a list, which is added to a list for the room, which is finally added to a list of all the rooms

Basically, Object Information List -> Room Object List -> Room List (-> meaning added to)
Then when the player revisits a room the data can be loaded using the correct list, and at the game's end the Room List can be cycled through to save all the data.  

My question is, will this hurt performance too much and will it take up too many resources?

As an extra performance precaution I will NOT load all the data at game start but instead load the data as I need it.  This way I don't have 20 room's data loaded when the player only enters 2 rooms.



MODERATOR EDIT : This topic has been moved to the Novice Q&A section due to it not following the Advanced Section Rules and Guidlines. Please read the section rules of the forum before posting....

Edited by Nocturne, 04 January 2012 - 02:46 PM.

  • 0

#2 Gamer3D

Gamer3D

    Human* me = this;

  • GMC Member
  • 1590 posts
  • Version:GM8.1

Posted 01 January 2012 - 12:13 AM

At the Room End every object that has something to save saves it's data into a list, which is added to a list for the room, which is finally added to a list of all the rooms

Basically, Object Information List -> Room Object List -> Room List (-> meaning added to)
Then when the player revisits a room the data can be loaded using the correct list, and at the game's end the Room List can be cycled through to save all the data.

My question is, will this hurt performance too much and will it take up too many resources?


Compared to the memory GM uses, a list of lists of every item in every room is usually going to be tiny.

I wouldn't worry about performance. You're only doing this once when entering/exiting rooms. If there's a pause while you load the room, that's usually acceptable.
  • 0

#3 heyufool1

heyufool1

    Fail

  • GMC Member
  • 1651 posts
  • Version:GM8

Posted 01 January 2012 - 12:20 AM


At the Room End every object that has something to save saves it's data into a list, which is added to a list for the room, which is finally added to a list of all the rooms

Basically, Object Information List -> Room Object List -> Room List (-> meaning added to)
Then when the player revisits a room the data can be loaded using the correct list, and at the game's end the Room List can be cycled through to save all the data.

My question is, will this hurt performance too much and will it take up too many resources?


Compared to the memory GM uses, a list of lists of every item in every room is usually going to be tiny.

I wouldn't worry about performance. You're only doing this once when entering/exiting rooms. If there's a pause while you load the room, that's usually acceptable.


Thanks for the info! I will only be saving dynamic objects so there will be like 15-50 max objects per room. I guess I'm good to go! Thanks again :smile:
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users