Jump to content


Photo

Game Maker Suggestions


  • This topic is locked This topic is locked
1162 replies to this topic

#1151 Big J

Big J

    GMC Member

  • GMC Member
  • 2852 posts
  • Version:GM8.1

Posted 01 May 2012 - 01:13 AM

Some of the things i've found missing from Game Maker for a long time.
1 if variable = 1 else variable = 0
{
variable = 2
}

Did you mean:
if (variable == 1)
{
    variable = 2;
}
else
{
    variable = 0;
}

2 instance_has_variable(variable,instance,set)
Checks if any of the instances has a variable set to something and returns how many of those instances there are.
This would allow me to see how many enemies there are with health set to higher then 10 for example.

I think this is a silly suggestion.

It is already possible to count how many enemies satisfy a certain condition:
/*
    This code will count how many enemies have hp > 10
    and store them in an array.
*/
var count, array;
count = 0;
with (objEnemy)
{
    if (hp > 10)
    {
        array[count] = id; //store the ID
        count += 1; //increase count
    }
}

5 Possibility to put an if statement inside a script, so i can do.
scriptname()
{
variable = 1
}
I use similar if statements in many places.

Scripts can return values.

//Script: scriptname()
return choose(true, false); //this is just an example
if (scriptname())
{
    //do something
    variable = 1;
}

6 Possibility to combine numbers into text.
sprite_index = "sprite"+string(variable)

This is already possible with variable_*_get/set() or even the dreaded execute_string(), but if you find yourself needing to do this, you're probably designing your game incorrectly. Regardless, the best solution would be to use an array, or make scripts to retrieve the ID of the resources, such as sprite_get_index():
var i, name;
name = argument0;
for (i = 0; i < 1000; i += 1)
{
    if (sprite_get_name(i) == name)
    {
        return i;
    }
}
return -1;
Or perhaps take it a step further and map all the resources at the beginning of the game for faster retrieval.

7 Possibility to create variables like this.
"variable"+string(variable) = something

This is what arrays are for. variable[0], variable[1], variable[2], etc.

8. Add x1,y1,z,z1 constants. It would be easier to seperate them from other code.

These would be completely useless as constants. I think a built-in instance "z" variable would be nice, but how hard is that to create yourself? In a way, "depth" is similar to z, but it determines drawing order. x1, y1, and z1 would be variables I create myself if I need them, and sometimes they are script-local with "var" declaration, so they should NOT be built-in.

9. Add event functions. So i can do create event in step event or outside room event in step event for example. This can save time moving between events.

I'm not sure what you mean. If you mean to perform other events from the current event, this is already possible with event_perform() and event_perform_object(). If you want to merge all the code from all events into the Step Event, that implementation might be slower than using separate events.

10. Add mouse_collision_check_button(). This also checks if the mouse collides with an object.

This is easy to check yourself:
return (instance_position(mouse_x, mouse_y, all)) != noone);

The built-in events for the mouse buttons that are not global mouse already have a similar check.

EDIT: I never got an email notification of IMP's reply. :P

Edited by Big J, 01 May 2012 - 01:14 AM.

  • 0

Read this before contacting me with a mentor request. This text file is subject to amendments at any time, without notice.

 

Get your GM 8.1 Anti-Aliasing here!
2712265.png


#1152 TeamSteeve

TeamSteeve

    GMC Member

  • GMC Member
  • 1347 posts
  • Version:GM:Studio

Posted 04 May 2012 - 06:37 AM

A lot of posts in this topic so I hope I'm not posting aything that has already been talked about.

I would really like it if you could put names for the arguments in the name of the script.
So say I had a script named "scr_change_position" and it had two arguments which I used to determine the x and y coordinates of whatever instance was calling the script, I want to actually name the script "scr_change_position(x,y)".

Also, when the auto-complete box pops up when typing in code it could show "scr_change_position(x,y)" instead of just "scr_change_position(...)".
I'm very forgetful and have to keep re-opening my scripts to make sure I'm using them right and haven't put the arguments around the wrong way.
This would be very helpful to me.

Thoughts?
  • 3

rCf1TdL.gif


#1153 Dark Matter

Dark Matter

    RPG Expert

  • GMC Member
  • 3196 posts
  • Version:GM:Studio

Posted 07 May 2012 - 07:24 AM

A lot of posts in this topic so I hope I'm not posting aything that has already been talked about.

Unfortunately, as you say, so many topics have been covered it's nearly impossible to come up with something useful and yet unmentioned. This has already been discussed. It's a good idea though :P
  • 0
String Distortion (Now Staff Picked!)

The .gmx format disassembly

I'm always happy to help with a problem or question you have regarding Game Maker. Feel free to ask me anything you want!

#1154 Jobo

Jobo

    Roaming Q&A

  • Global Moderators
  • 2913 posts
  • Version:GM:Studio

Posted 09 May 2012 - 09:03 PM

I'm still waiting for them to add the simple approach of variable increase/decrease, as such;
variable++;
variable--;

It's astonishing they've never added this.
  • 1

#1155 Desert Dog

Desert Dog

    GMC Member

  • GMC Elder
  • 6409 posts
  • Version:Unknown

Posted 09 May 2012 - 09:27 PM

I'm still waiting for them to add the simple approach of variable increase/decrease, as such;

variable++;
variable--;

It's astonishing they've never added this.


It isn't the simple approach at all, it's the complex way of adding 1 to a variable.
  • 1
HTML5 games for mobile:
HexDogs Bugz Burn! Captain George Golfing Block Memory

Games for Androids
*NEW* Word Dog - Published by Dangerous_Dave


Code: General Array Functions - GM-S friendly. sorting, shuffling. Includes a quicksort.
Use the quicksort to sort ds_lists 10-18 times faster than ds_list_sort()!

#1156 Yal

Yal

    Not Tsuka

  • Global Moderators
  • 10151 posts
  • Version:GM:Studio

Posted 22 May 2012 - 01:20 PM

The only place where I ever used them was in for loops, because I thought it was hilarious to write "c++" for the counter variable. The habit still lingers, I always use "c" as the counter index in my for loops (except when nested).
  • 0

- The above is my personal opinion and in no way representative of Yoyogames or the GMC, except when explicitly stated -

 

Open this spoiler for my games:

Spoiler

Some useful game engines: (all completely free to use, even commercially, as long as you replace all included graphics / music first).
SisterEngine RPG Engine - - YaruFPS 3D Collision Engine -- YaruPlatEngine Platform Engine

New user? Can't draw but want to look unique? You can request a new avatar in this thread!


#1157 Big J

Big J

    GMC Member

  • GMC Member
  • 2852 posts
  • Version:GM8.1

Posted 22 May 2012 - 05:34 PM

I too find it amusing to use a variable named "c" or even "C" in a for loop. :D
  • 0

Read this before contacting me with a mentor request. This text file is subject to amendments at any time, without notice.

 

Get your GM 8.1 Anti-Aliasing here!
2712265.png


#1158 Dark Matter

Dark Matter

    RPG Expert

  • GMC Member
  • 3196 posts
  • Version:GM:Studio

Posted 22 May 2012 - 09:29 PM

The only place where I ever used them was in for loops, because I thought it was hilarious to write "c++" for the counter variable. The habit still lingers, I always use "c" as the counter index in my for loops (except when nested).

How dare you break the unwritten law that the increment variable in loops must be "i"!
  • 0
String Distortion (Now Staff Picked!)

The .gmx format disassembly

I'm always happy to help with a problem or question you have regarding Game Maker. Feel free to ask me anything you want!

#1159 Tsn

Tsn

    GMC Member

  • GMC Member
  • 282 posts
  • Version:Unknown

Posted 24 May 2012 - 04:47 AM

There should be a transparent color avaivable in the sprite editor.
  • 0

#1160 Zoltan Kriven

Zoltan Kriven

    GMC Member

  • GMC Member
  • 391 posts
  • Version:GM8.1

Posted 25 May 2012 - 05:56 AM

Here's one, for drawing games, make the sprite editor available for the player while playing the game.
  • 2
Posted Image
That little green + at the bottom right of my post will send you to another dimention where I have 1 more reputation point. Go ahead, click it. Then tell me I'm wrong. I clicked on the green + and got sent to another dimention where I have 1 more reputation point. And thats why there is no I in Kriven.

#1161 Samuel Venable

Samuel Venable

    GMC Member

  • Banned Users
  • 632 posts
  • Version:GM:Studio

Posted 25 May 2012 - 06:10 PM

^ +1 that's a good idea, that way we wouldn't need dlls for that.

An undo function for the resource tree couldn't hurt.
This is good for when you accidentally delete the wrong object or something else important.

Edited by time-killer-games, 25 May 2012 - 06:13 PM.

Spoiler

#1162 Dark Matter

Dark Matter

    RPG Expert

  • GMC Member
  • 3196 posts
  • Version:GM:Studio

Posted 27 May 2012 - 07:36 AM

There should be a transparent color avaivable in the sprite editor.

There is. You can change the opacity of your current drawing colour.

Here's one, for drawing games, make the sprite editor available for the player while playing the game.

This would be a bad idea. It's a niche thing, and it's far better to make your own, more customisable editor for your game.

An undo function for the resource tree couldn't hurt.
This is good for when you accidentally delete the wrong object or something else important.

Yeah, the undo features in GM are very lacking. You can delete a lot of things accidentally and have no way of retrieving them afterwards, which can be very, very frustrating.
  • 1
String Distortion (Now Staff Picked!)

The .gmx format disassembly

I'm always happy to help with a problem or question you have regarding Game Maker. Feel free to ask me anything you want!

#1163 paul23

paul23

    GMC Member

  • Global Moderators
  • 4004 posts
  • Version:GM:Studio

Posted 30 May 2012 - 09:39 PM

Closed this awaiting some moderation discussion.
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users