• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Learning Lights off game in game maker....

A

Artwark

Guest
So I'm about to learn the tutorial of how to make a lights off game by gamedevdan.

So far I'm not able to understand the tutorial as he doesn't mention which object should have which and for
Creating & Populating The Game Board section, I'm not sure if he's telling to use a good object, bad one or a completely different object.

I'd like a bit of an assistance in this tutorial please.
 
J

Jaqueta

Guest
You can create a new object for that, in this single object, you are going to have the whole game basically, since it's controls and graphics are very simple and can be easily done with loops.

This tutorial is a bit more advanced than usual, so I recommend you to take a look at Data Structures, how they work, and then specially get some info on how GRID Data Structures work, because that's the one used in the tutorial.

Another thing to mention, is that if you want to follow this tutorial step by step, you'll need to create another 2 instances after, a "bad tile object" and a "good tile object", these objects are purely "cosmetic" and won't have much important code, this means that it can be discarded in order to save performance by not creating objects, but that's up to you really.

Here's a video that may help you:

Also, this loops tutorial may help you too if you're not sure how the controls work and etc...
 
Last edited by a moderator:
S

Stu

Guest
I am also having trouble learning this game. I have tried following the tutorial in the videos.
I put this lot of code in a create event of my Object obj_grid.

// SET UP SOME VARIABLES
var gridX = 0;
var gridY = 0;
var gridCols = 7;
var gridSquares = 49;
var gridRows = ceil(gridSquares/gridCols);
var cellWidth = 48;
var cellHeight = 48;
var goodObject = obj_good_tile;
var badObject = obj_bad_tile;
var badClicks = 6;

// START GRID CREATION
var myGrid = ds_grid_create(gridCols,gridRows);

for (i=0;i<gridSquares;i++) {

ds_grid_add(myGrid,i mod gridCols,i div gridCols,0);

}

ds_grid_clear(myGrid,0);

I tried running it without a draw event. I have the object in the room. And nothing is displayed in the room

So I then add a draw event with this code.

var myGrid = ds_grid_create(gridCols,gridRows);

for (i=0;i<gridSquares;i++) {

And it fails to execute with the draw event giving an error at line 1.

What am I doing wrong? Why isn't everything properly explained in the tutorial on the blog? I am having the same problems the op is. Please help
 
J

jenjer

Guest
Guys, hey I just bit the bullet and bought the source for the $4.99. There is MUCH more code to Lights Off/Turn Em Off than is in that tutorial. He doesn't explain anything very good, even to someone who knows GML. If you really want to get it working, I suggest you just buy it to learn. It sucks, I know.
 
Top