Pages: 1 [2] 3
  Print  
Author Topic: GML  (Read 4606 times)
Offline (Male) retep998
Reply #15 Posted on: September 04, 2010, 05:12:44 PM

Member
Location: Where else?
Joined: Jan 2010
Posts: 248
MSN Messenger - retep998@charter.net AOL Instant Messenger - retep998 Yahoo Instant Messenger - retep998
View Profile Email
Also, when you create a new resource, it doesn't matter what the highest existing id for that resource is, but rather what it was.
If i create 100 sprites and delete them all except the first one so the highest id is 0, the next sprite i create will not be 1 but rather 100 since the highest ever was 99.
Just clarifying.
Logged
Offline (Unknown gender) The 11th plague of Egypt
Reply #16 Posted on: September 04, 2010, 05:15:18 PM
Member
Joined: Dec 2009
Posts: 286

View Profile
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?
Logged
Offline (Female) IsmAvatar
Reply #17 Posted on: September 04, 2010, 05:53:34 PM

LateralGM Developer
LGM Developer
Location: Pennsylvania/USA
Joined: Apr 2008
Posts: 891

View Profile Email
Quote
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
Offline (Unknown gender) The 11th plague of Egypt
Reply #18 Posted on: September 04, 2010, 05:54:49 PM
Member
Joined: Dec 2009
Posts: 286

View Profile
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
Offline (Male) Josh @ Dreamland
Reply #19 Posted on: September 05, 2010, 09:48:43 AM

Prince of all Goldfish
Developer
Location: Ohio, United States
Joined: Feb 2008
Posts: 2950

View Profile Email
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.
Offline (Unknown gender) luiscubal
Reply #21 Posted on: September 05, 2010, 04:07:47 PM
Member
Joined: Jun 2009
Posts: 452

View Profile Email
It makes sense to have objects, instances and tiles have different IDs since all of them can have the "x" property applied to them.
Not sure if ENIGMA should care about that, though.

One last thing: is my_object.x = 2 and etc. going to work on ENIGMA? I also use lots of object_index and sprite_index. Are these functions ENIGMA-safe?
Logged
Offline (Male) Josh @ Dreamland
Reply #22 Posted on: September 05, 2010, 08:28:59 PM

Prince of all Goldfish
Developer
Location: Ohio, United States
Joined: Feb 2008
Posts: 2950

View Profile Email
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
Offline (Unknown gender) The 11th plague of Egypt
Reply #23 Posted on: September 07, 2010, 05:26:29 AM
Member
Joined: Dec 2009
Posts: 286

View Profile
Does it support the instance_find() function? I'm using it a lot.
Logged
Offline (Unknown gender) TheExDeus
Reply #24 Posted on: September 07, 2010, 09:40:57 AM

Developer
Joined: Apr 2008
Posts: 1919

View Profile
Quote
Does it support the instance_find() function? I'm using it a lot.
Enigma will support everything GM does. The main idea (if it hasn't changed much) of Enigma is to replace GM. After that, it could grow to be much much more (as with C only sky is the limit.. or something else).
Logged
Offline (Unknown gender) Game_boy
Reply #25 Posted on: September 07, 2010, 10:27:10 AM
Member
Joined: Apr 2008
Posts: 228

View Profile
@HaRRiKiRi

Non-existent programs can support anything you like, be bug-free and completely awesome.

The real Enigma doesn't even work enough to make Click the Clown work yet.
Logged
Offline (Unknown gender) TheExDeus
Reply #26 Posted on: September 07, 2010, 10:56:15 AM

Developer
Joined: Apr 2008
Posts: 1919

View Profile
Quote
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.

Quote
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
Offline (Unknown gender) Game_boy
Reply #27 Posted on: September 07, 2010, 01:55:30 PM
Member
Joined: Apr 2008
Posts: 228

View Profile
@HaRRiKiRi

I understand you meant future Enigma, but we're so many years later after the initial claims and it is nowhere close to usable. Josh is doing a good job, but as a largely one-man army it's not going to catch up very fast. I'm certain var has been recoded about 10 times now as he thinks of better ways to do it.

And I believe "Catch the Clown" was made because Enigma couldn't "Click" at the time (can it now? If I pull it from SVN will it compile and run CtC on Windows as is?) . That's why I said that specific game. Even the GM example games are so far away at this pace.
Logged
Offline (Male) Josh @ Dreamland
Reply #28 Posted on: September 07, 2010, 01:58:58 PM

Prince of all Goldfish
Developer
Location: Ohio, United States
Joined: Feb 2008
Posts: 2950

View Profile Email
*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
Offline (Unknown gender) The 11th plague of Egypt
Reply #29 Posted on: September 07, 2010, 02:39:59 PM
Member
Joined: Dec 2009
Posts: 286

View Profile
It's hard to manage big projects, expecially the first ones.

Chances are I'll post my project tonight, almost a year after the schedules release date.
« Last Edit: September 07, 2010, 02:42:32 PM by The 11th plague of Egypt » Logged
Pages: 1 [2] 3
  Print