Powered by Invision Power Board

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

> Fangame Mini-Tutorials Topic
United States
Zero Kirby
Posted: Sep 1 2007, 05:36 PM
Quote Post


Well, your local psychic is off to visit your mother!
[*][*][*][*]

Group Icon
Group: Members
Posts: 6252
Member No.: 2501
Joined: 15-August 06

Status: (0d) [--]


Short and Simple Map System

Target: GM6/7

Creating a map system is not as insanely complicated as you might think it is. With a few global variables, you too can create a SMB3 clone...

First off, on the Map Screen, we have our Mario. Here's how he works. When we push a key, he jumps 16 pixels in that direction; it helps if his collision mask is only 16x16 as well.

Now, for the room, make sure it's persistent! If it isn't, you may have a few problems. So in the room settings, make sure Persistent is checked.

CODE
Press Left Key Event

Jump to a position relative to x(-16) and y(0)


But how do we stop him from going in that direction if there's a block? Well, here's the same event, but with the code that prevents this;

CODE
Press Left Key Event

If a position is collision free relative to x(-16), y(0), and solids only
Jump to a position relative to x(-16) and y(0)


There. Now just place a solid object in the way and he won't move.

Now, to create a level, just make an object, and when the player hits a certain key, we use the level object's key event. Here's an example with the Shift Key...

CODE
Press Shift Event

If there is an object at a position (obj_mario) relative to x(0) and y(0)
Go to room (Level One)


This sends Mario to the level.

Now, when Mario clears the level, make sure that in the event, you set this variable.

CODE
Collision Event (obj_finish)

Set variable (global.cleared) to 1
...


Then, when you return to the map, this will be in the Map Mario's step event.

CODE
Step Event

If variable (global.cleared) is equal to 1
{
Set variable (global.cleared) to 0
Create object (obj_map_clearer) at position x(0) and y(0)
}


In obj_map_clearer, we make the collision event with the blocks that impede progress DELETE these blocks.

Also, make sure obj_map_clearer deletes itself after a little while. That you can figure out easily, can't you?

And voila; a short, simple, dirty map system. Enjoy.


--------------------
Falcon Punch is the result of the Sun heating fists. It drives the Blue Falcon. Heating causes destruction of water into the pain, where it then hurts, creating rain. Rain creates flowing water in tears, which can then be converted into other forms through more pain.

My Ref - Full Body Ref (minus the badass hat)

Visit Just Another Just Another Day - The Webcomic!

Super Mario Zero: Game Status (RAZZ Y U STEALING MAH FORMAT BRO)
Mario Object: Pretty much finished!
Enemy Objects: [||||||||--] Just gonna add Spinies, Bullet Bills and Cheep Cheeps!
Boss Fights: None in progress.
General Engine: [|||||||||-] Ranking System Complete! Gonna add pipes!
Levels Complete: [|---------] Haven't even finished the tutorial!
PMUsers WebsiteAOLMSN
Top
United States
Xgoff
Posted: Sep 9 2007, 07:57 PM
Quote Post


<):|
[*][*][*][*][*]
[*][*]

Group Icon
Group: Members
Posts: 52341
Member No.: 24
Joined: 13-October 03

Status: (0d) [--]


Custom Keys With ControlX - basically a way to make custom key settings without using the built-in menu
Target Applications: user posted imageuser posted image
Source and exe


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

This post may contain original research or unverified claims.
Please disregard the above information and contact an administrator.

DISCLAIMER: by sending me (xgoff) a private message, you agree to the directives and their terms specified henceforth:
DIRECTIVE 1 (APPLE): i may or may not reply promptly or at all; and there are no guarantees to the usefulness of the reply. i may not acknowledge whether i have even received your private message
DIRECTIVE 2 (CHILE CON CARNE): as per my view, "private" applies only to the initial transaction, and the material of your message may or may not be made public at my discretion; as this will more than likely be a post in the CCC or IRC, you may not be able to view it
DIRECTIVE 3 (FEATHER DUSTER): you must address me (xgoff) as "Sir Master Xgofficus his Highest and Most Awesome the Third"; failure to comply with this term may invoke one or both of the above directives, and i will leave a burning bag of **** on your doorstep
DIRECTIVE 4 (BOOTSTRAP): if you have read this disclaimer, please private message me promptly, in compliance with the above terms, so i can ensure you are capable of following directions you idiot
this concludes the test of the emergency disclaimer system, your scheduled programming will now continue. satisfaction guaranteed, and 100% cash back available under certain circumstances; restrictions may or may not apply within your place of residence
NOTICE: these directives and their terms may change at any time, without notice; as a private message transaction to myself assumes an understanding and full compliance of the above, you should ensure you are fully aware of the above terms at any point before sending a private message; any message received is assumed to have been sent in compliance with the above

QUOTE
(5:25:58 PM) Mikau: xgoff
(5:26:00 PM) Mikau: guess what
(5:26:04 PM) Xgoff: chicken butt
(5:26:09 PM) Mikau: **** you
PMEmail PosterUsers WebsiteAOLMSN
Top
Finland
Ultramario
Posted: Oct 20 2007, 04:42 AM
Quote Post


Dan Dan Dan!
[*][*][*][*][*]


Group Icon
Group: Members
Posts: 11240
Member No.: 2164
Joined: 9-June 06

Status: (0d) [--]


Making object to move away from another in GM6/7.

Object_A Step Event:
CODE
Move in the direction of a point (Object_B.x, Object_B.y, 1)
Jump to a given position (-hspeed*2, -vspeed*2)

NOTE: If you DIE not put "*2"s, Object_A won't move.



Variable jump in Game Maker.

*jump button* Event:
CODE
If vspeed is smaller than -2
Set vspeed relative to -gravity*0.8


This post has been edited by Ultramario on Oct 22 2007, 03:01 AM


--------------------
PMEmail PosterUsers WebsiteAOL
Top
United States
Elyk
Posted: Oct 31 2007, 05:21 PM
Quote Post


Standard Member
[*][*][*][*]

Group Icon
Group: Members
Posts: 6604
Member No.: 3808
Joined: 22-May 07

Status: (0d) [--]


I happened to come across this, and felt that it belonged here.

Game Maker D&D to Code

This post has been edited by Elyk19 on Nov 8 2007, 07:19 PM


--------------------
user posted image
PMEmail PosterUsers WebsiteAOLMSN
Top
Unspecified
jhsoft
Posted: Nov 4 2007, 01:59 PM
Quote Post


This grimmace is not the McDonalds kind.


Group Icon
Group: Members
Posts: 78
Member No.: 2850
Joined: 24-October 06

Status: (0d) [--]


QUOTE (Ultramario @ May 7 2007, 02:46 AM)
Simplest oneway platform code:

Target Applications: Game Maker 6/7 (maybe 5)

To character's collision event with oneway platform:
CODE
If y is smaller than other.y-character.sprite_height-1+character.vspeed
If vertical speed is not smaller than 0
<Set vertical speed to 0
jump to position (self.x, other.y-character.sprite_height)>

replace "character" with the name of the main character object (Mario, Yoshi etc...).

IMPORTANT: ONEWAY PLATFORM OBJECT MUST NOT BE SOLID

To character's Step event:
CODE
If there is a collision with oneway platform (0,1)
If there is not a collision with oneway platform (0,0)
Set gravity to 0
else
Set gravity to 1 (or anything you like (no higher than 1 is my recommendation))

I havent been able to make this work sad.gif(


--------------------
Current Projects:
Bony Beetle Strikes Back: Working Title
Coding:|||||||||
Level Design:|||||||||
Sprites and Graphics:|||||||||
Sounds:||||||||||
In Total:||||||||||



Which Neglected Mario Character Are You?

CODE
Thwomp Master says (5:59 AM):
I'm not crying
Thwomp Master says (6:00 AM):
And I never complained
Thwomp Master says (6:00 AM):
I just said I have 56 complaints
PMEmail PosterUsers WebsiteMSN
Top
Unspecified
Treeki
Posted: Nov 10 2007, 06:57 AM
Quote Post


He's adorable, you can't deny it. :<
[*][*]

Group Icon
Group: Members
Posts: 3307
Member No.: 2001
Joined: 5-April 06

Status: (0d) [--]


Elite Charizard requested this, I decided to make it. This code lets you teleport a player somewhere without having the background position change.
To use, make a script named "teleport_with_bg".
Then add this code:
CODE
{
if argument0 < x { background_x[argument1] -= x - argument0; }
if argument0 > x { background_x[argument1] += argument0 - x; }
x = argument0;
}

Run it as in: teleport_with_bg(new_x_position, background_index);


--------------------
untitled fangame
http://archive.mfgg.net/index.php?showtopic=242243
expected completion: ∞
PMEmail PosterMSN
Top
Uruguay
EDGE
Posted: Nov 21 2007, 06:10 PM
Quote Post


I'll be back...
[*][*]

Group Icon
Group: Members
Posts: 2775
Member No.: 2518
Joined: 18-August 06

Status: (0d) [--]


Sorry for The Bump.
Here Are Some Tutorials I made a time ago.(GM6 ALL)
All Links take to file directly, no need to go to any page and click more...except the huge mario source, didn't want to upload that on my site >.<
Goomba Tutorial:
Here:Download
Info:A Simple A.I Tutorial of How to Make a Goomba.Walks by Itself, Bounce(Change Direction) on Walls.
HUD Tutorial:
Here:Download
Info:Shows How To Make a HUD with Animated Helath-Bar Has a Score System, Life Counter and Bomb Counter.
The Bomb Counter Was a Copy of the Life Counter, to Show How To Create New Counters.
It Has a Limitation, For Example You Can't Get Passed 99 Lives or 99 Bombs, When The Score Gets to 100000 You Get An Extra Life and it Sets The SCore Back to 0.
Anything Can Be Fixed, Press Space To Test(It Adds One To The Lives/Bombs One Less To The Health and Score +100)
Mario Source:
Here:Download
Info:A Unfinished Engine I was Working On.
Warning:Slopes Are Pretty Buggy Because I Stopped Working On This After I Added The Slopes.
It Contains SMB3 Features such as Mario with Most of his Power-ups:Raccoon,Hammer,Fire,Small,Normal and I'm sure there is one More.
Lot's of Enemies A.I:Goomba,Koopa,Lakitu and More.
Map system with Many Features from the SMW Map System such as climbing swimming and Menu with Resume/Save/Load/Exit Options.
Remember Slopes where the last thing I added and never Finished therefor if I remember correctly only Mario and the Goombas can walk on slopes, Mario can butt-slide on Slopes.
Partner A.I Tutorial:
Here:Download
Info:A Simple A.I Tutorial of How to Make a Partner(could be used for enemy too) follow you and jump when player is on top of a block.

This post has been edited by EDGE on Feb 21 2008, 09:31 AM


--------------------
"You've been playing Super Mario Sunshine. haven't you?"
~The Yoshi Army~Team 1-Up~MFGG Submissions~Ref~
PMEmail PosterMSN
Top
United States
Xgoff
Posted: Nov 25 2007, 12:55 PM
Quote Post


<):|
[*][*][*][*][*]
[*][*]

Group Icon
Group: Members
Posts: 52341
Member No.: 24
Joined: 13-October 03

Status: (0d) [--]


Sound channels for fun and profit, "dumb" method - mmf2 can handle up to 32 sounds playing at once, however it can only automatically do this with internal sound files; use this if you need to use external sound files
Target Applications: user posted imageuser posted image

To start off, we need to assume two things:
1. You have a global/alterable string named "NextSound"
2. You have all of your sounds in one folder, in this case i'll use ".\Sounds", with sound files "Sound1.ogg", "Sound2.ogg", "Sound3.ogg" (use .wav files instead of .ogg if you have TGF2)

CODE

(event that causes Sound1 to play)
--> Set NextSound to: "Sound1.ogg"
--> Start loop: "SCcheck"; 32

(event that causes Sound2 to play)
--> Set NextSound to: "Sound2.ogg"
--> Start loop: "SCcheck"; 32

(event that causes Sound3 to play)
--> Set NextSound to: "Sound3.ogg"
--> Start loop: "SCcheck"; 32

On loop "SCcheck"
+ Channel: loopindex("SCcheck")+1 is not playing
--> Play: Apppath$ + "Sounds\" + NextSound; loopindex("SCcheck") + 1
--> Stop loop: "SCcheck"
--> Set loop index: "SCcheck"; -1


alternatively, you could use fast function and pass the sounds' names as an argument/parameter

i call this the "dumb" method because if, by chance, all of the channels are occupied, it'll just ignore the new sound's "request" to be played. one way to remedy this is to add an extra loop (so if you wanted to have 32 sounds, you'd run 33 loops), and if it manages to make it to that loop (only possible if all channels are taken), have it pick a random number from 1 to 32 and play the new sound over an old one:

Sound channels for fun and profit, "smarter" method

CODE

(event that causes Sound1 to play)
--> Set NextSound to: "Sound1.ogg"
--> Start loop: "SCcheck"; 33

(event that causes Sound2 to play)
--> Set NextSound to: "Sound2.ogg"
--> Start loop: "SCcheck"; 33

(event that causes Sound3 to play)
--> Set NextSound to: "Sound3.ogg"
--> Start loop: "SCcheck"; 33

On loop "SCcheck"
+ Loopindex("SCcheck") <= 32
+ Channel: loopindex("SCcheck")+1 is not playing
--> Play: Apppath$ + "Sounds\" + NextSound; loopindex("SCcheck") + 1
--> Stop loop: "SCcheck"
--> Set loop index: "SCcheck"; -1

On loop "SCcheck"
+ Loopindex("SCcheck") = 33
--> Play: Apppath$ + "Sounds\" + NextSound; random(32) + 1
--> Set loop index: "SCcheck"; -1


This post has been edited by Xgoff on Nov 25 2007, 03:23 PM


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

This post may contain original research or unverified claims.
Please disregard the above information and contact an administrator.

DISCLAIMER: by sending me (xgoff) a private message, you agree to the directives and their terms specified henceforth:
DIRECTIVE 1 (APPLE): i may or may not reply promptly or at all; and there are no guarantees to the usefulness of the reply. i may not acknowledge whether i have even received your private message
DIRECTIVE 2 (CHILE CON CARNE): as per my view, "private" applies only to the initial transaction, and the material of your message may or may not be made public at my discretion; as this will more than likely be a post in the CCC or IRC, you may not be able to view it
DIRECTIVE 3 (FEATHER DUSTER): you must address me (xgoff) as "Sir Master Xgofficus his Highest and Most Awesome the Third"; failure to comply with this term may invoke one or both of the above directives, and i will leave a burning bag of **** on your doorstep
DIRECTIVE 4 (BOOTSTRAP): if you have read this disclaimer, please private message me promptly, in compliance with the above terms, so i can ensure you are capable of following directions you idiot
this concludes the test of the emergency disclaimer system, your scheduled programming will now continue. satisfaction guaranteed, and 100% cash back available under certain circumstances; restrictions may or may not apply within your place of residence
NOTICE: these directives and their terms may change at any time, without notice; as a private message transaction to myself assumes an understanding and full compliance of the above, you should ensure you are fully aware of the above terms at any point before sending a private message; any message received is assumed to have been sent in compliance with the above

QUOTE
(5:25:58 PM) Mikau: xgoff
(5:26:00 PM) Mikau: guess what
(5:26:04 PM) Xgoff: chicken butt
(5:26:09 PM) Mikau: **** you
PMEmail PosterUsers WebsiteAOLMSN
Top
Uruguay
EDGE
Posted: Dec 21 2007, 02:55 PM
Quote Post


I'll be back...
[*][*]

Group Icon
Group: Members
Posts: 2775
Member No.: 2518
Joined: 18-August 06

Status: (0d) [--]


Two GM6 Examples.
Double HUD Bars:
Here:Download
Info:An Example of How to Have to Bars, Made with Sprites so you don't need to have the crappy rectangles.(even know the sprites are rectangle, just change it for a face or some other sprite)
ButterFly Example:
Here:Download
Info:How To Make a Very Simple ButterFly Move Around(Perfect for RPG Games)


--------------------
"You've been playing Super Mario Sunshine. haven't you?"
~The Yoshi Army~Team 1-Up~MFGG Submissions~Ref~
PMEmail PosterMSN
Top
Finland
Ultramario
Posted: Mar 8 2008, 07:28 AM
Quote Post


Dan Dan Dan!
[*][*][*][*][*]


Group Icon
Group: Members
Posts: 11240
Member No.: 2164
Joined: 9-June 06

Status: (0d) [--]


Game Maker 6 Thwomp

Alarm Event for alarm 0:
CODE
set variable strike to 3
set the vertical speed to -2


Step Event:
CODE
if strike is equal to 0
     if x is larger than mario.x-40
           if x is smaller than mario.x+40
           set variable strike to 1
if strike is equal to 1
     set the vertical speed relative to 0.1


Collision Event with object block:
CODE
if y is smaller than other.y
     move to position (self.x,other.y-29)
     set the vertical speed to 0
     play sound thwomp; looping: false
     set variable strike to 2
     set Alarm 0 to 90
else
     move to position (self.x,other.y+16)
     set the vertical speed to 0
     set variable strike to 0

This pretty much the minimal amount of programming needed to do a perfectly working Thwomp.

Also, keep in mind that these speed and alarm values are pended to fit 60 fps games.

This post has been edited by Ultramario on Mar 8 2008, 07:30 AM


--------------------
PMEmail PosterUsers WebsiteAOL
Top
United States
Torkirby
Posted: Jun 11 2008, 12:08 PM
Quote Post


Standard Member


Group Icon
Group: Members
Posts: 33
Member No.: 4732
Joined: 17-November 07

Status: (0d) [--]


QUOTE (Ultramario @ May 7 2007, 02:46 AM)
Simplest oneway platform code:

Target Applications: Game Maker 6/7 (maybe 5)

To character's collision event with oneway platform:
CODE
If y is smaller than other.y-character.sprite_height-1+character.vspeed
If vertical speed is not smaller than 0
<Set vertical speed to 0
jump to position (self.x, other.y-character.sprite_height)>

replace "character" with the name of the main character object (Mario, Yoshi etc...).

IMPORTANT: ONEWAY PLATFORM OBJECT MUST NOT BE SOLID

To character's Step event:
CODE
If there is a collision with oneway platform (0,1)
If there is not a collision with oneway platform (0,0)
Set gravity to 0
else
Set gravity to 1 (or anything you like (no higher than 1 is my recommendation))

___________________________________________
FATAL ERROR in
action number 1
of Step Event
for object obj_mario:

COMPILATION ERROR in code action
Error in code at line 103:
If there is a collision with obj_onewayplatform (0,1)

at position 31: Unknown function or script: obj_onewayplatform

Ultramario, I can't get the oneway platform to work, what should I do?


--------------------
Pokemon Diamond friend code: Lukas: 4639-5474-5171

deviantART account: [http://torkirby.deviantart.com/]
PMEmail PosterUsers Website
Top
United States
phazonluigi
Posted: Jun 11 2008, 01:36 PM
Quote Post


^^The Metroid M&L Project has Re-Initiated Launch.^^


Group Icon
Group: Members
Posts: 784
Member No.: 4889
Joined: 1-January 08

Status: (0d) [--]


QUOTE (Torkirby @ Jun 11 2008, 12:08 PM)
___________________________________________
FATAL ERROR in
action number 1
of Step Event
for object obj_mario:

COMPILATION ERROR in code action
Error in code at line 103:
If there is a collision with obj_onewayplatform (0,1)

at position 31: Unknown function or script: obj_onewayplatform

Ultramario, I can't get the oneway platform to work, what should I do?

headslap.gif
This isn't written in GML you have to translate it.


--------------------
CODE
THE CCC IS ****

These Projects Are the **** be sure to check em out:
user posted image
user posted image
user posted image
user posted image
Thanks to luigis #1 < Cuz he is.
PMEmail PosterMSN
Top
United States
OniLink10
Posted: Sep 6 2008, 07:28 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) [--]


Delagging HyperCam2 Videos:
Here a few few things you can do to reduce Lag in HyperCam2 Videos:
1: Go to Display Properties, Settings, Advanced, Trouble Shoot, and Drag the Slider to 3/5. It should say "Disable all cursor and advanced drawing accelerations. Use this setting to correct drawing problems."

2: Go to Display Properties, Settings, and set Color Quality to Medium/16-Bit.

3: Make HyperCam2 Film a Smaller Portion of the Window.

4: Make HyperCam2 Film at 30FPS, and have the Keyframe at 30FPS.

5: Make Cursor/Full Frame Capture Ratio higher, although this will Lag the Video, but Delag the Game.

6: Don't record Sound.

7: Set the Video Compressor to Full Frames (Uncompressed).

I use Options 1, 3, 4, and 6, and it runs for the most part Lag Free! And I use some of the most Ancient RAM available! DDR PC3200 RAM! O_O

EDIT: Oops, wrong thread, I'll move it soon.

This post has been edited by OniLink10 on Sep 7 2008, 01:01 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
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.1066 ]   [ 14 queries used ]   [ GZIP Enabled ]   [ Server Load: 0.83 ]