Pages: 1
  Print  
Author Topic: Object grouping  (Read 1444 times)
Offline (Male) Josh @ Dreamland
Posted on: April 12, 2011, 11:18:13 AM

Prince of all Goldfish
Developer
Location: Pittsburgh, PA, USA
Joined: Feb 2008
Posts: 2949

View Profile Email
With documentation of a new format started, however incoherently, here, it's time I put to writing my plan for large games made with ENIGMA.

One of Game Maker's biggest downfalls is the sheer length of time it takes to save and load games, both in GMK format and in the EXE format. People with large projects suffer incredible wait times between pressing "Run" and seeing their game working, until they finally just keep all resources external. How can we fix this?

Most people with large projects, if not every single one of them (where "large" implies having lots of resources, not a stolen tutorial and 6 massive WAV-format music files) keep their resources well-organized within the tree. I was looking over the sources (acquired in multiple ways) of successful GM-made Metroid clones. Sprites were divided by player and by land, then by enemy... it was, as a trend, very well organized.

Cutting to the chase, my proposal is sprite_load_group("Crateria");.

Basically, when our new format is implemented, "compiling" large games will be as simple as unpacking resources from the zip. Or, as we're likely to add, compiling the standalone, duplicating the game zip, stripping the script directory, object directory, and manifest files (anything that would no longer be of use in a compiled game), and adding the EXE to that.

ENIGMA games would then, when the user calls sprite_load_group(group), just recursively add all sprites found in ./Sprites/group/.
Likewise, it would recursively unload them when the user calls sprite_unload_group().

This will require minimal modification to the original system, and will save many users an assload of hassle, which when you think about it, is the point of the ENIGMA project, anyway. Built-in support for massive amounts of resources, and keeping them external, is fundamental if ENIGMA is to offer something that Game Maker just fucking doesn't.

I mean, until one of those sodding idiots stumbles upon this thread and puts their programmers to work implementing it.
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) TGMG
Reply #1 Posted on: April 12, 2011, 11:46:00 AM

Developer
Joined: Jun 2008
Posts: 107

View Profile WWW Email
Yes this is a great idea, especially for mobile game development where if the user sorts their resources by the room/level it will make sure only used sprites in that room are loaded when required. Then a loading screen to unload and load content for the next room.

It would also get users thinking about what sprites are required in which room, theoretically making it easier to automatically generate a texture atlas to minimize rendering state changes.

Also an idea for the future, the ability to use a folder instead of a zip easily in the debug version, which checks for any changes to the loaded resources and reloads if required. So when editing game sprites in photoshop you could press save and it will be updated while playing the game. It would add a little overhead to the debug version (if the option was enabled) to check if the files have been changed, but I think it would save alot of time tweaking game assets.
Logged
me
GMbed 2.0 :: Embed you gm games in websites.
Offline (Male) RetroX
Reply #2 Posted on: May 02, 2011, 03:23:03 PM

Master of all things Linux
Contributor
Location: US
Joined: Apr 2008
Posts: 1055
MSN Messenger - classixretrox@gmail.com
View Profile Email
Question: why are you using INI instead of EY? :/
Logged
My Box: Phenom II 3.4GHz X4 | ASUS ATI RadeonHD 5770, 1GB GDDR5 RAM | 1x4GB DDR3 SRAM | Arch Linux, x86_64 (Cube) / Windows 7 x64 (Blob)
Quote from: Fede-lasse
Why do all the pro-Microsoft people have troll avatars? :(
Offline (Male) Josh @ Dreamland
Reply #3 Posted on: May 02, 2011, 08:45:04 PM

Prince of all Goldfish
Developer
Location: Pittsburgh, PA, USA
Joined: Feb 2008
Posts: 2949

View Profile Email
RetroX: We will be using ey. The spec mentions INI because we want it relatable.
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
Pages: 1
  Print