Powered by Invision Power Board

 
  Pages: (2) [1] 2  ( Go to first unread post ) Reply to this topicStart new topicStart Poll

> Game Maker 6.1's Order of Events, V1.5
United States
OniLink10
Posted: Nov 2 2008, 10:34 PM
Quote Post


C++ Programmer, Unofficial Physicist, and Unofficial Chemist
[*][*]

Group Icon
Group: Members
Posts: 3920
Member No.: 4907
Joined: 19-February 08

Status: (0d) [--]


Yes, it is here, the order of Events! Unfortunately, if you run it, you need to use Task manager to exit. Here is the Info I gathered in V1.5.
V1.4: NOW USES SAVING TO A FILE INSTEAD OF DISPLAYING A MESSAGE! THIS CAN ADD UP TO A BIG FILE REAL FAST, SO CLOSE THE GAME QUICK.

-->
|Object Create Code
|Create
|Game Start*
|Room Create Code
|Room Start
|Draw
|-->
||Begin Step
||Alarm
||Keyboard
||Key Press
||Key Release
||Mouse
||Mouse Press
||Mouse Release
||Step
||Collision
||End Step
||Draw
||--
|Room End
|--**
Game End

*If Game is Starting
**Loop ONLY if switching Rooms

This post has been edited by OniLink10 on Nov 3 2008, 07:31 PM

Attached File ( Number of downloads: 8 )
Attached File  Event_Test.gm6


--------------------
QUOTE (Xgoff @ Sep 10 2009 @ 06:11 PM)
did you try hello's engine

make sure to not ****ing change anything before using it!
PMEmail PosterUsers WebsiteYahoo
Top
United States
Project_MK
Posted: Nov 2 2008, 10:35 PM
Quote Post


Wayward Vagabond
[*][*][*][*]

Group Icon
Group: Members
Posts: 1763
Member No.: 3159
Joined: 7-January 07

Status: (0d) [--]


what is this and what does it do


--------------------

user posted image
Click banner for reference.
PMEmail PosterAOLYahooMSN
Top
Togo
Razz
Posted: Nov 2 2008, 10:36 PM
Quote Post



[*][*][*]

Group Icon
Group: Members
Posts: 6007
Member No.: 4259
Joined: 13-August 07

Status: (0d) [--]


ha, that's really cool

kinda simple way of finding it out actually XD


--------------------
Allusion - [||--------] 25% complete
GridLocked - [||||------] 45% complete
my blog
PMEmail PosterAOL
Top
Togo
Razz
Posted: Nov 2 2008, 10:40 PM
Quote Post



[*][*][*]

Group Icon
Group: Members
Posts: 6007
Member No.: 4259
Joined: 13-August 07

Status: (0d) [--]


QUOTE (Project_MK @ Nov 2 2008, 08:35 PM)
what is this and what does it do

shows the order of events

basically, the order that the events in GM are interpreted


--------------------
Allusion - [||--------] 25% complete
GridLocked - [||||------] 45% complete
my blog
PMEmail PosterAOL
Top
United States
OniLink10
Posted: Nov 2 2008, 10:44 PM
Quote Post


C++ Programmer, Unofficial Physicist, and Unofficial Chemist
[*][*]

Group Icon
Group: Members
Posts: 3920
Member No.: 4907
Joined: 19-February 08

Status: (0d) [--]


Ugh, Keyboard Events are difficult. I cant "Simulate" a press, that doesn't work. I tried making it activate the Event when Shift is Pressed and it goes through the Events again, but it hates me. sad.gif


--------------------
QUOTE (Xgoff @ Sep 10 2009 @ 06:11 PM)
did you try hello's engine

make sure to not ****ing change anything before using it!
PMEmail PosterUsers WebsiteYahoo
Top
Togo
Razz
Posted: Nov 2 2008, 10:55 PM
Quote Post



[*][*][*]

Group Icon
Group: Members
Posts: 6007
Member No.: 4259
Joined: 13-August 07

Status: (0d) [--]


Yeah the keyboard events are tough

Who uses those anyways :X


--------------------
Allusion - [||--------] 25% complete
GridLocked - [||||------] 45% complete
my blog
PMEmail PosterAOL
Top
United States
OniLink10
Posted: Nov 2 2008, 10:58 PM
Quote Post


C++ Programmer, Unofficial Physicist, and Unofficial Chemist
[*][*]

Group Icon
Group: Members
Posts: 3920
Member No.: 4907
Joined: 19-February 08

Status: (0d) [--]


QUOTE (Razz @ Nov 2 2008, 08:55 PM)
Yeah the keyboard events are tough

Who uses those anyways :X

Me when my Jumping breaks for absolutely no reason. :x


--------------------
QUOTE (Xgoff @ Sep 10 2009 @ 06:11 PM)
did you try hello's engine

make sure to not ****ing change anything before using it!
PMEmail PosterUsers WebsiteYahoo
Top
United States
OniLink10
Posted: Nov 2 2008, 11:04 PM
Quote Post


C++ Programmer, Unofficial Physicist, and Unofficial Chemist
[*][*]

Group Icon
Group: Members
Posts: 3920
Member No.: 4907
Joined: 19-February 08

Status: (0d) [--]


Update! Added the Room Create Code and Object Create Code, you know, the Codes in the Room Editor?


--------------------
QUOTE (Xgoff @ Sep 10 2009 @ 06:11 PM)
did you try hello's engine

make sure to not ****ing change anything before using it!
PMEmail PosterUsers WebsiteYahoo
Top
United States
Spritanium
Posted: Nov 2 2008, 11:09 PM
Quote Post


ايم مثلي ال
[*][*][*][*][*]


Group Icon
Group: Members
Posts: 4437
Member No.: 959
Joined: 8-April 05

Status: (0d) [--]


QUOTE (Razz @ Nov 2 2008, 08:55 PM)
Yeah the keyboard events are tough

Who uses those anyways :X

A lot of people, including me.

The point of GM is to make things simple by adding events, so by putting "if keyboard_check(vk_whatever)" in your step event, you're actually defeating the entire purpose.


--------------------
PMEmail PosterAOLYahooMSN
Top
Togo
Razz
Posted: Nov 2 2008, 11:13 PM
Quote Post



[*][*][*]

Group Icon
Group: Members
Posts: 6007
Member No.: 4259
Joined: 13-August 07

Status: (0d) [--]


QUOTE
The point of GM is to make things simple by adding events, so by putting "if keyboard_check(vk_whatever)" in your step event, you're actually defeating the entire purpose.

When it comes down to it, using keyboard_check is much more reliable than using the events, simply because everything's in the step event, and it's there easy for you to edit without having to switch between events constantly.

That, and using keyboard_check() is good practice if you ever want to get into something complicated, like c++ (Which I'm starting to learn btw :3)


--------------------
Allusion - [||--------] 25% complete
GridLocked - [||||------] 45% complete
my blog
PMEmail PosterAOL
Top
United States
Spritanium
Posted: Nov 2 2008, 11:15 PM
Quote Post


ايم مثلي ال
[*][*][*][*][*]


Group Icon
Group: Members
Posts: 4437
Member No.: 959
Joined: 8-April 05

Status: (0d) [--]


QUOTE (Razz @ Nov 2 2008, 09:13 PM)
When it comes down to it, using keyboard_check is much more reliable than using the events, simply because everything's in the step event, and it's there easy for you to edit without having to switch between events constantly.

That, and using keyboard_check() is good practice if you ever want to get into something complicated, like c++ (Which I'm starting to learn btw :3)

I see your point, but you're still wasting the convenience of a little thing called organization


--------------------
PMEmail PosterAOLYahooMSN
Top
Togo
Razz
Posted: Nov 2 2008, 11:22 PM
Quote Post



[*][*][*]

Group Icon
Group: Members
Posts: 6007
Member No.: 4259
Joined: 13-August 07

Status: (0d) [--]


QUOTE (Spritanium @ Nov 2 2008, 09:15 PM)
I see your point, but you're still wasting the convenience of a little thing called organization

hows it unorganized

EXAMPLE TIEM

code done with gml, all in the step event:
CODE

y+=hsp
x+=vsp
if keyboard_check(vk_up)
{
   vsp-=1
}
if keyboard_check(vk_down)
{
   vsp+=1
}
if keyboard_check(vk_left)
{
   hsp-=1
}
if keyboard_check(vk_right)
{
   hsp+=1
}


same code done with events:
CODE

[step event]
x+=hsp
y+=vsp
[keyboard up event]
vsp-=1
[keyboard down event]
vsp+=1
[keyboard left event]
hsp-=1
[keyboard right event]
hsp+=1


If you code correctly, gml can be just as organized as events. It's a lot harder, but much more forgiving in the long-run.


--------------------
Allusion - [||--------] 25% complete
GridLocked - [||||------] 45% complete
my blog
PMEmail PosterAOL
Top
Austria
Guinea
Posted: Nov 3 2008, 03:43 AM
Quote Post


6
[A][*][*][*][*]
[*][*][*][*][*]
[*]

Group Icon
Group: Admins
Posts: 8600
Member No.: 893
Joined: 15-March 05

Status: (0d) [--]


If I recall correctly, the order of events is displayed in the Help File of GM, so you wasted your time.
But it's nice that you have a program that provides proof. ^-^
PMEmail PosterAOLMSN
Top
United States
OniLink10
Posted: Nov 3 2008, 10:52 AM
Quote Post


C++ Programmer, Unofficial Physicist, and Unofficial Chemist
[*][*]

Group Icon
Group: Members
Posts: 3920
Member No.: 4907
Joined: 19-February 08

Status: (0d) [--]


QUOTE (Guinea @ Nov 3 2008, 01:43 AM)
If I recall correctly, the order of events is displayed in the Help File of GM, so you wasted your time.
But it's nice that you have a program that provides proof. ^-^

Yes but I can copy and paste what it has, which doesn't have all the events...

In some situation it is important to understand the order in which Game Maker processes the events. This is as follows:

Begin step events
Alarm events
Keyboard, Key press, and Key release events
Mouse events
Normal step events
(now all instances are set to their new positions)
Collision events
End step events
Drawing events
The creation, destroy, and other events are performed when the corresponding things happen.

How nice. They don't have everything.


--------------------
QUOTE (Xgoff @ Sep 10 2009 @ 06:11 PM)
did you try hello's engine

make sure to not ****ing change anything before using it!
PMEmail PosterUsers WebsiteYahoo
Top
United States
OniLink10
Posted: Nov 3 2008, 11:01 AM
Quote Post


C++ Programmer, Unofficial Physicist, and Unofficial Chemist
[*][*]

Group Icon
Group: Members
Posts: 3920
Member No.: 4907
Joined: 19-February 08

Status: (0d) [--]


UPDATE! NOW HAS IMPROVED ABILITY TO DETECT ALL EVENTS!


--------------------
QUOTE (Xgoff @ Sep 10 2009 @ 06:11 PM)
did you try hello's engine

make sure to not ****ing change anything before using it!
PMEmail PosterUsers WebsiteYahoo
Top
United States
OniLink10
Posted: Nov 3 2008, 07:13 PM
Quote Post


C++ Programmer, Unofficial Physicist, and Unofficial Chemist
[*][*]

Group Icon
Group: Members
Posts: 3920
Member No.: 4907
Joined: 19-February 08

Status: (0d) [--]


Update! The Keyboard, Key Press, Key Release, Mouse, Mouse Press, and Mouse Release Events are here! Keyboard Events are Automatic, Mouse Events aren't.


--------------------
QUOTE (Xgoff @ Sep 10 2009 @ 06:11 PM)
did you try hello's engine

make sure to not ****ing change anything before using it!
PMEmail PosterUsers WebsiteYahoo
Top
United States
BurninLeo
Posted: Nov 3 2008, 07:20 PM
Quote Post


Member's Standard
[*][*]

Group Icon
Group: Members
Posts: 1617
Member No.: 2273
Joined: 3-July 06

Status: (0d) [--]


Useful, but yeah it is in the help file. I usually try to restrict the amount of dependency I have on using step event for speed purposes.
PMEmail PosterMSN
Top
United States
OniLink10
Posted: Nov 3 2008, 07:25 PM
Quote Post


C++ Programmer, Unofficial Physicist, and Unofficial Chemist
[*][*]

Group Icon
Group: Members
Posts: 3920
Member No.: 4907
Joined: 19-February 08

Status: (0d) [--]


QUOTE (BurninLeo @ Nov 3 2008, 05:20 PM)
Useful, but yeah it is in the help file.  I usually try to restrict the amount of dependency I have on using step event for speed purposes.

Again, not all of it is in the Help File. The Help File doesn't say when, specifically, the Create, Room Start, and Game Start Events occur. Ironically, Create comes before Game Start and Room Start.

This post has been edited by OniLink10 on Nov 3 2008, 07:26 PM


--------------------
QUOTE (Xgoff @ Sep 10 2009 @ 06:11 PM)
did you try hello's engine

make sure to not ****ing change anything before using it!
PMEmail PosterUsers WebsiteYahoo
Top
United States
OniLink10
Posted: Nov 3 2008, 07:31 PM
Quote Post


C++ Programmer, Unofficial Physicist, and Unofficial Chemist
[*][*]

Group Icon
Group: Members
Posts: 3920
Member No.: 4907
Joined: 19-February 08

Status: (0d) [--]


Updated First Post with some more Info that I forgot.


--------------------
QUOTE (Xgoff @ Sep 10 2009 @ 06:11 PM)
did you try hello's engine

make sure to not ****ing change anything before using it!
PMEmail PosterUsers WebsiteYahoo
Top
United States
RetroXYZ
Posted: Nov 3 2008, 07:52 PM
Quote Post


Standard Member
[*][*]

Group Icon
Group: Members
Posts: 2714
Member No.: 4325
Joined: 27-August 07

Status: (0d) [--]


event_perform() is your best friend.
PMEmail PosterMSN
Top
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

  Topic Options Topic Options Pages: (2) [1] 2  Reply to this topicStart new topicStart Poll

 




[ Script Execution time: 0.0662 ]   [ 15 queries used ]   [ GZIP Enabled ]   [ Server Load: 0.32 ]