Jump to content


Monolisk

Member Since 21 Sep 2011
Offline Last Active May 31 2013 12:22 AM

Topics I've Started

Ini files not working correctly

07 December 2012 - 06:06 PM

Hello, Game maker community!! I have been having loads of issues with ini files!! I am just saving some global variables and in game everything is working well, upon init the game loads the blank ini file that i have in the included files in GM:Studio. When I compile to android and test the game, everything works correctly, and I have it set up so that when I exit the game through the main menu it saves everything and then closes after a few steps in an alarm..

The issue I am having is upon re-opening the App, the globals that are supposed to be saved are not being saved at all (when I check the ini file) and the progress isnt being stored due to that.

code for loading is as follows:
done after 5 steps in alarm event on game load (in persistent object)
ini_open("savegame.ini"); //open the ini file / create the ini file
global.tut = ini_read_real( 'Levels', 'number', true );
global.bio2 = ini_read_real( 'Levels', 'number', true );
global.bio3 = ini_read_real( 'Levels', 'number', true );
global.bio4 = ini_read_real( 'Levels', 'number', true );
global.bio5 = ini_read_real( 'Levels', 'number', true );
global.bio6 = ini_read_real( 'Levels', 'number', true );
global.bio7 = ini_read_real( 'Levels', 'number', true );
global.bio8 = ini_read_real( 'Levels', 'number', true );
global.bio9 = ini_read_real( 'Levels', 'number', true );
global.bio10_ = ini_read_real( 'Levels', 'number', true );
global.bio11_ = ini_read_real( 'Levels', 'number', true );
global.bio12_ = ini_read_real( 'Levels', 'number', true );
ini_close()


and the code for saving.. done both on room_end events as well as in a left click event in the main menu via exit button
ini_open("savegame.ini");
ini_write_real("Levels","number",global.tut)
ini_write_real("Levels","number",global.bio2);
ini_write_real("Levels","number",global.bio3);
ini_write_real("Levels","number",global.bio4);
ini_write_real("Levels","number",global.bio5);
ini_write_real("Levels","number",global.bio6);
ini_write_real("Levels","number",global.bio7);
ini_write_real("Levels","number",global.bio8);
ini_write_real("Levels","number",global.bio9);
ini_write_real("Levels","number",global.bio10_);
ini_write_real("Levels","number",global.bio11_);
ini_write_real("Levels","number",global.bio12_);
ini_close()


Any insight would be greatly appreciated! Thanks

issues with ini on android

05 December 2012 - 06:12 PM

Hello Game Maker community!


I have scanned the forum looking at a bunch of threads about ini files, trying to find answers to my reoccurring issue I have been having with saving global variables into the ini files and then having it re-load at game init.

I am using it for a number of things, but mainly for keeping track of which levels have been completed so that when the user exits the app on their phone and returns to it, the completed levels will be re-accessible for replay.

So for instance I have an init room that contains an object called "obj_global" (this object is persistent btw!) and it basically on its game start event it loads my ini like so: ( i will simplify to one variable for reading sake)

Game Start Event

ini_open("savegame.ini");
global.tut = ini_write_real("Levels","number",0);
//other level variables here

ini_close()


"global.tut" is the variable-name for my tutorial level which when completed, via object creation changes the global.tut value from 0 to 1 and saves the game like so:

Create Event: (for obj_tutorial_complete)
global.tut+=1;

ini_open("savegame.ini");
global.tut = ini_write_real("Levels","number",global.tut);
ini_close()


Now, I thought that in itself was all I needed... besides a simple button(s) to check the value of "global.tut"  or other level variable-names and determine whether or not to remain unlocked or to lock the button in the level select menu.

This is just about the only thing in my way, besides some more testing and optimizing and I will be able to publish to the Android Market Posted Image PLEASE HELP!!  I have basically copied and pasted from other threads that I read about on how to do this, I have read the documentation also... I think there is probably something I am missing perhaps about the way I am doing things with ini files? Any insight would be greatly appreciated!


Some info and Screens of the game I am developing can be found at www.artifact-game.com

My Best,

Joshua  - www.monolisk.com

Problem after update

09 October 2012 - 11:10 PM

Hi i just updated to todays update of v1.1.522 and now my runner isnt working and will not update either, in the runner on my phone it says "Error - io error, retrying..." and never gets thru. i t just happened as the update occurred, i haven't changed anything in the game.. any suggestions will be greatly appreciated!

Art.I.Fact

19 June 2012 - 03:48 AM

Hey guys, this is a WIP of the game I've been working on. It is a top down collection/adventure game.

The concept of the game is simple. Survive and Collect.

EDIT ADDED SANDBOX LINK: Sandbox Download

Media-Fire Download



In Art.i.fact, you are immersed into a strange ever changing colorful universe in which you guide "Artifact" an alien-symmetry: through a cosmic micro-space with the intentions to collect star orbs, while avoiding and deactivating enemy entities, solving puzzles, interacting with strange entities and finding unlock-able content including power-ups, music and player-avatar "skins."

The game is set to release on Android (hopefully) within the next quarter.


The controls are simple. Click (or click and hold) on the screen to move toward that point.

Clicking or dragging your finger over yourself charges your "communicator." (release to communicate) - Note: takes a full revolution to charge.

Communicate with different entities and objects to interact with them. (activating, deactivating, destroying or stunning, shooting etc.)

Use the edges of each level to tele-port to avoid enemies and move around some un-passable areas.

AVOID MINES!!

Communicate often!

FOR TESTING: ® Key - Restarts room, Space - Skips level, Backspace - Restart Game

Posted Image

Posted Image

Posted Image

Posted Image

Posted Image



Note: This is just a small demo, there will be many more objects/interact-ables/enemies/traps and LOTS OF LEVELS in the Final Version.

COMMENTS/SUGGESTIONS/BUG REPORTS are WELCOMED!!!

Particles following a path..

14 June 2012 - 03:30 AM

yeah I was just wondering how you can make a particle system follow along a looping path?

Im using GM:Studio

Thanks for any help!