Jump to content


Lightang3l

Member Since 28 Oct 2010
Offline Last Active Today, 09:19 AM

Topics I've Started

CREDITS

08 February 2013 - 01:14 PM

LONG STORY:
I have been working with GM for 3 year now and when I started I was a complete noob. I learned and learned, from tutorials, from trial & error, but most of all from you guys here at the GMC!

My game has come quite a long way since I started, and as I kept adding stuff to it, I decided... I'll try to make the best game I can and try to make it a commercial release.

Ambitious goal, I know, but I poured countless hours, blood, sweat, tears... sleepless nights and constant battles against my inexperience and incompatible code but I always found people here to get me through the rough spots.

So, I started looking back for people that helped me and people who posted tutorials and examples I studied and studied... and studied.

I will like to credit them in my game as I feel the helped me grow over time, and even though I created my game in complete solitude and isolation... I learned a lot from the GMC and that knowledge helped me in the long run!

SHORT STORY:
Here are the people I remember helping me or have posted valuable examples that made me understand GML.

Nocturne
YellowAfterlife
Phantom107
IMP
Shadow Link
famous
tsg1zzn
FoxInABox

There are more of you, but this is what I can remember at the moment.
I want to credit you guys in the credits section of my game!
The thing is I would like to use your real names in the credits... so if you want your names to be there you have to tell me what they are.

Respond here or just PM me if you don't want your real name posted in this topic.

If you don't respond or chose not to give your name, I will use the Username instead, though it will look a little unprofessional for a game aspiring for a commercial release.

Thank you! Cheers!

Reseting to Title Screen

14 January 2013 - 12:43 PM

I gave an object an alarm event that, when triggered, will take you to the title screen if you are inactive for a period of time.
Not while playing mind you... I'm talking about idling in the menu.

Question and point of topic:
What period of time would you consider optimal... not too long as to almost never take you to the title screen...but not too short as to be annoying. I don't want it to irritate the player by taking him to the title screen for not being active for just a little bit.

The pitfalls of implementing Gamepad Controls

11 January 2013 - 10:30 AM

Hello,
As most of you may know GM supports the use of a gamepad to control your game with, but there are some mistakes you can make when using one.

Here are some things I learned (the hard way) and I think you should avoid:

1. Using joystick functions before checking if a joystick exists.
This is a huge deal, because doing so and unplugging a gamepad will result in a horrendous FPS drop next time the game starts without it... 80% FPS drop in some cases. The paradox is that checking if a joystick exists, every time you want to use a function, will also cripple your game.
Solution: Create a variable in a persistent object, that checks if a gamepad is connected on startup, and every few seconds or so in an alarm event... and always check this object's variable (if it's true or false) when using joystick functions.

2. Using an uncommon gamepad and coding specifically for it.
OK, here is the deal... you will not be able to support all types of gamepads, so don't even bother, BUT don't set the controls to be specific for your obscure gamepad.
Example: The 4 face buttons on your gamepad are actually the start button and bumpers on a 360 gamepad. People with 360 pads will hate you if they have to press start to shoot or the left trigger to go right.

3. Triggers are not buttons.
If you have a gamepad with 4 buttons on the top instead of 2 buttons and 2 triggers, don't assume that if you use the 2 bottom buttons for something someone else will be able to use the triggers on their gamepad for the same thing. Triggers work on an axis (z-axis), not on press.

4. Set error margins for the x and y axis.
Don't check if the x or y axes are 0 or if they are not 0, because they most likely never will be.
Example: Let's say you want to code movement on the left analog stick, so to move you check if an axis is larger than 0 and to stop moving you check if the axis is 0. THIS IS WRONG! Most gamepads (especially used ones) will not be that precise no matter how much you calibrate them.
Solution: Instead of checking if the gamepad axis is 0, check if it's larger or smaller than 0.X (X = error margin, the grater X is the higher you allow for calibration error). Now don't go too far, because people with quality gamepads will sense this as being lag.

5. Mouse vs Gamepad.
If you are reading this it's safe to assume that you have a gamepad and you want to use it for your game, so you have a game... and by extension you have a menu for your game. Well, in that case you will need to be able to navigate the menu with the gamepad itself... it's really annoying to have to put the gamepad down and reach for the mouse every time you are in a menu (options menu, main menu, pause menu, etc).
Solution: Obviously... you will need to code your menu to support full gamepad navigation. This includes all buttons, sliders or any sub-menu elements for that matter. You should be able to use the menu, play the game, and exit the game ALL without ever touching the mouse or keyboard if you are playing with a gamepad.

6. Never take control away from the keyboard/mouse (Thanks Lune)
players might want to control the game with the mouse or keyboard even if they have a gamepad plugged in. There is no reason to force gamepad control, so you should make it an option so that the player has a choice or, even better, leave both gamepad and keyboard active at the same time.

I hope this small guide saved you some pain in making your game support gamepads, and I know it will save your players a lot of pain if you will implement gamepad support right!
If I missed anything fell free to add, I will edit to include all other suggestions. (also point out if I was wrong on some of my points, I'm still learning, as most of you are too).

- Lightang3l

Debug mode - surface number?

26 December 2012 - 10:10 AM

What does the number shown at the right of a surface's name mean?

I have a surface draft_3 and in debug mode there is a number like this:

draft_3:        8

What does the 8 stand for?

Simple math? Help... 2

31 October 2012 - 01:26 PM

Here is the problem:

the first number is 10 times the second number.
if you subtract the second from the first you get 36.

What are the numbers?

Now... here is what i have:

x = 10y
x - y = 36
10y - y = 36 => 9y = 36 => y = 36/9 => y = 4

x = 10y => x = 40

x = 40
y = 4

Now the REAL problem... I have to figure it out without using division "/"   :confused:  (y = 36/9 can't be used)
is it even possible? I'm trying to figure it out for someone's kid... and the kid claims he did not learn divisions yet... so... yeah. is it possible? With segments or something?