GithubHelp home page GithubHelp logo

yal-gamemaker / buffer_zlib Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 227 KB

Plain simple compression/decompression for GameMaker (GMS1, optionally GMS2) games.

Home Page: https://yellowafterlife.itch.io/gamemaker-zlib

Java 26.09% Game Maker Language 19.56% Batchfile 1.18% Makefile 3.56% C++ 49.60%
gamemaker zlib

buffer_zlib's Introduction

buffer_zlib

This small extension wraps zlib to add several functions for data compression/decompression to GameMaker: Studio (1, 2).

Since the extension is freeware and I'm not particularly familiar with zlib, this repository is intended as a "do it yourself" kind of thing for anyone desiring additional features/platforms. Feel free to send back a pull request if you do something nice.

Setting up

  • Clone/download the repository.
  • Download zlib. I've been using v1.2.11 as of writing this.

Windows

  • Copy all .h / .c files (zlib.h, inflate.c, etc) from zlib directory into buffer_zlib directory of the repository.
  • Open buffer_zlib.sln in Visual Studio. I've been using Community Edition 2015 as of writing this.
  • If all was done correctly, the project should now produce a valid DLL when in x86 release mode.
  • If you want the extension function list to be automatically updated post-compile, download gmxgen and tuck it's executable files at some PATH environment variable location.

Android

  • Copy all .h / .c files (zlib.h, inflate.c, etc) from zlib directory into buffer_zlib.java\jni directory of the repository.
  • Run _javaclass BAT to compile java class from BufferZlib.java. BufferZlib.class shall appear in the buffer_zlib.java\bin\com\gamemaker\bufferzlib directory.
  • Run _jniheader BAT. It should produce com_gamemaker_bufferzlib_BufferZlib.h header based on the java class. You need to place this file into buffer_zlib.java\jni.
  • Header is the link between .java and .cpp sources. Methods in buffer_zlib.cpp should match the methods from com_gamemaker_bufferzlib_BufferZlib.h which are generated based on the methods from BufferZlib.java.
  • Run _libs.bat to build NDK Shared Library. If all was done correctly, you will see two newly created directories, obj and libs. Copy libs folder and name it lib.
  • Go to lib directory and delete all architectures not supported by GameMaker. Currently supported architecures are: armeabi, armeabi-v7a, mips and x86, which should stay. If you build your games without supporting some of architecures (see Android Settings of your project) you can delete it too.
  • Add lib directory to a zip file. Path of directory should be saved, so it shall be lib.zip\lib\*.
  • Rename lib.zip into lib.jar and copy it into AndroidSource\libs directory of GameMaker extension.
  • Copy BufferZlib.java and BufferZlibExt.java into AndroidSource\Java directory of GameMaker extension. BufferZlibExt.java is the main file, so Class Name in Android extension settings should be BufferZlibExt.
  • Tested SDKs: jdk/jre 1.8.0, Target SDK 25, Min SDK 9, Compile SDK 25, Build Tools 26, Support Lib 25.3.1, NDK r14b.

License

See zlib license.

buffer_zlib's People

Contributors

keeveegames avatar yellowafterlife avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.