|
|
IsmAvatar
|
|
Reply #17 Posted on: September 04, 2010, 05:53:34 pm |
|
|
LateralGM Developer
Location: Pennsylvania/USA Joined: Apr 2008
Posts: 877
|
Wait, then making a lot of instances and then destroying them could ultimately lead to a crash?
I create and destroy thousands of lists in a minute. Am I fucked up? Instances aren't a concern until you create at least 10m-100k=9.9million of them, at which point they start overlapping tile ids. It's unknown whether this would really be problematic, though, as I've never heard of anyone doing it before. Realize that if you create 10 thousand instances a minute, it will take 990 minutes, or 16.5 hours, before you reach the 9.9m point. If you create 10 thousand lists a minute without destroying them, it will take 10 minutes before you reach the 100k point. If you destroy every list you create, you will never exceed the 10 thousand mark for IDs, because the IDs get recycled.
|
|
« Last Edit: September 04, 2010, 05:56:07 pm by IsmAvatar »
|
Logged
|
|
|
|
The 11th plague of Egypt
|
|
Reply #18 Posted on: September 04, 2010, 05:54:49 pm |
|
|
Joined: Dec 2009
Posts: 274
|
Yeah, probably it won't be a big deal, but I'm already deal with a lot.
If I make a save system for the map, and one for the units using that map, I'd better dump the GM's save completely.
Thanks God I'm safe with the lists, but I may crash the game since I'll have hundreds of units shooting thousands of bullets. My collision system has been designed to do exactly that since the beginning, and if I can't use it to its full potential, that's a pity.
Couldn't Enigma fix this mess? To Hell with compatibility, I want to make a serious game!
@Ism Ok, that makes me feel better, but it's still a stupid limitation. I'd better not make the bullets instances at all. Ray tracing YAY!
EDIT: yeah, I destroy almost every list, and there shouldn't be memory leaks. Plus I already have ray-tracing bullets.
|
|
« Last Edit: September 04, 2010, 06:00:09 pm by The 11th plague of Egypt »
|
Logged
|
|
|
|
Josh @ Dreamland
|
|
Reply #19 Posted on: September 05, 2010, 09:48:43 am |
|
|
Prince of all Goldfish
Location: Pittsburgh, PA, USA Joined: Feb 2008
Posts: 2950
|
Those two functions, game_save and game_load, have been giving me a headache. There doesn't seem to be a good way to implement them in an established C++ environment. I have no idea why Mark doesn't save ds_*'s. That was the -ONLY- reason I thought an ID based data structure system would have any place in ENIGMA. Knowing that he doesn't save them, though... Erg.
Anyway, my plan for game_save and game_load was basically to require that all variables that are to be saved be given a type with one of the following properties: 1) An overload for operator<<(ofstream::operator&, class&) and likewise for operator>>() 2) A member called _game_save(FILE*) and _game_load(FILE*) 3) An overload for enigma::game_save_putter(class&) and enigma::game_save_setter(class&) 4) A structure containing only types meeting the above 5) An overload for a pointer to a type meeting any of the above and a size_t length(void) 6) A standard iterator system (begin(), end(), operator++(int)) returning any of the above as a scalar or an std::pair.
If all types meet those specifications, the entire game can be saved. Is that great, or what?
|
|
|
Logged
|
"That is the single most cryptic piece of code I have ever seen." -Master PobbleWobble "I disapprove of what you say, but I will defend to the death your right to say it." -Evelyn Beatrice Hall, Friends of Voltaire
|
|
|
Post made September 05, 2010, 03:00:27 pm was deleted at the author's request.
|
|
Josh @ Dreamland
|
|
Reply #22 Posted on: September 05, 2010, 08:28:59 pm |
|
|
Prince of all Goldfish
Location: Pittsburgh, PA, USA Joined: Feb 2008
Posts: 2950
|
ENIGMA supports all of that, Luis.
|
|
|
Logged
|
"That is the single most cryptic piece of code I have ever seen." -Master PobbleWobble "I disapprove of what you say, but I will defend to the death your right to say it." -Evelyn Beatrice Hall, Friends of Voltaire
|
|
|
|
|
|
TheExDeus
|
|
Reply #26 Posted on: September 07, 2010, 10:56:15 am |
|
|
Joined: Apr 2008
Posts: 1860
|
Non-existent programs can support anything you like, be bug-free and completely awesome. Reread my post. I think you don't understand the meaning of past, present and future tenses. The real Enigma doesn't even work enough to make Click the Clown work yet. I think it did. It was made some time ago, and it worked quite well (at one point it worked too fast thou, because there weren't any fps limit).
|
|
|
Logged
|
|
|
|
|
Josh @ Dreamland
|
|
Reply #28 Posted on: September 07, 2010, 01:58:58 pm |
|
|
Prince of all Goldfish
Location: Pittsburgh, PA, USA Joined: Feb 2008
Posts: 2950
|
*shrug* I wish I could have finished that C parser a bit faster. Anyway, watch what happens next, Game_boy. Don't blink.
|
|
|
Logged
|
"That is the single most cryptic piece of code I have ever seen." -Master PobbleWobble "I disapprove of what you say, but I will defend to the death your right to say it." -Evelyn Beatrice Hall, Friends of Voltaire
|
|
|
|
|