June 04, 2023, 05:09:02 am

The Gang Garrison 2 Forum

Please login or register.

Login with username, password and session length
Advanced search  


NOTICE: Due to a rise in bot activity, new posters need to be approved before posting.

Join the community Discord server!

Pages: [1]

Author Topic: The Mechanics Behind the Garrison Builder  (Read 2488 times)


  • Guest
The Mechanics Behind the Garrison Builder
« on: January 21, 2009, 11:42:20 pm »

I'm trying to see how the Garrison Builder works, in order to understand how maps and collision detection works.
Can someone please explain to me the process behind the Garrison Builder? Basically, does it take the two .png files and compress them together, and then the entities are placed in the description of the picture, as I've heard before somewhere around these forums?

After that, does collision detection in Game Maker work through constant checks using loops or is it a one-time basis thing?

That's all for now, thanks


  • Guest
Re: The Mechanics Behind the Garrison Builder
« Reply #1 on: January 22, 2009, 12:19:15 am »

Double post.

The reason why I need this information is because I want to see if something can be done about the atrocious compiling times by porting the Garrison Builder to C++, using zlib. Then, by knowing the way the maps are compressed and utilized, I might be able to improve the actual game itself.

By the way, cspotcode, you mentioned that you used GM instead of C++. Were you using C++ before? If so, which png library were you using?

Thanks, and good night


  • Coder
  • Administrator
  • *****
  • Karma: 134
  • Offline Offline
  • Posts: 411
Re: The Mechanics Behind the Garrison Builder
« Reply #2 on: January 22, 2009, 03:27:42 pm »

Everything is described here:
In the LevelFormat.txt file.

Launchpad is where I keep the source code for the Garrison Builder.  It is similar to Sourceforge or Google Code.  Instead of using Subversion or CVS, I am using the Bazaar version control system.

I created a DLL for Gang Garrison that can embed and extract the appropriate text chunk in png files.  However, GML is used to generate the text data.  The "compiling" that takes so long is really GameMaker reading the walkmask pixel by pixel and packing all those bits into a string.  Once that string has been generated, the DLL uses zlib and libpng to put that string into a compressed text chunk within the background png file.  It's all explained in LevelFormat.txt.

If you have any more questions, feel free to ask.
"The knack of flying is learning how to throw yourself at the ground and miss."
- Douglas Adams
Pages: [1]

Page created in 0.034 seconds with 35 queries.