| |
Fangame Mini-Tutorials Topic
Xgoff |
|

<):|
![Super Happy Heart Badge [*]](https://archive.mfgg.net/html/badges/shappyheart.gif) ![Sprite Comp Winner Badge (1) [*]](https://archive.mfgg.net/html/badges/scg1.gif) ![Drawing Comp Winner Badge (1) [*]](https://archive.mfgg.net/html/badges/dcg1.gif) ![Drawing Comp Runner Up Badge (1) [*]](https://archive.mfgg.net/html/badges/dcr1.gif) ![MFGG Awards 2006 Winner [*]](https://archive.mfgg.net/html/badges/award06.gif)
![MFGG Awards 2007 Winner [*]](https://archive.mfgg.net/html/badges/award07.gif) ![Forum Event Badge [*]](https://archive.mfgg.net/html/badges/event.gif)

Group: Members
Posts: 52341
Member No.: 24
Joined: 13-October 03
Status: (0d)
![[--]](style_images/mfgg2_skin/warn_nosuspend.gif)

|
Basically this is a topic where you can post tutorials open-source, written, graphical, or whatever format you feel like. It's intended for things that are more complex (or less obvious in execution) than something like basic scrolling or lives or whatever, yet are too simple or short to be uploaded the main site. Your tutorials do not have to require a certain program; general tutorials that can help with any program or language are fine. If you want to make a tutorial, but have no idea what to make, try the Overlooked Fangame Concepts topic Hopefully this will cut down on some of the help topics, as long as people READ the FAQ, that is. [dohtml]<hr /> So anyway, here are a couple of mine (which show the different explanation options): <hr />[/dohtml] SMB-style scrolling (one-way) For some reason, I have the feeling something like this is already on the main site, but whateverTarget applications:     | CODE | Alterable Value A of "Mario" < X( "Mario" ) --> Mario - Set Alterable Value A to: X( "Mario" )
Always --> Center display at X: Alterable Value A( "Mario" ) |
--------------------
 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 |
|
|
|
Char |
|

fad was bad
![Moderator Badge [M]](https://archive.mfgg.net/html/badges/mod.gif) ![Super Happy Heart Badge [*]](https://archive.mfgg.net/html/badges/shappyheart.gif) ![Secret Santa Badge [*]](https://archive.mfgg.net/html/badges/present.gif)

Group: Admins
Posts: 2123
Member No.: 2856
Joined: 25-October 06
Status: (0d)
![[--]](style_images/mfgg2_skin/warn_nosuspend.gif)

|
I have one here SMB/Seconds Timer Most of you must be knowing this, but just in case. Speed of timer is not exactly like SMBTarget Applications:  If it doesn't work on 5, please tell me.Make a new object and call it objTimer (or whatever, your preference) objTimer's Create Event: Execute a piece of code| QUOTE | global.timer = 300 alarm[0] = room_speed/2.5 Red: The initial value of the timer. Change it, or you can even use a creation code (advanced users only). Blue: Remove this if you want only seconds, or change if you want a faster/slower timer (decimal points work, so you can change it to something like /1.5 or multiplication like *2). |
objTimer's Alarm 0 Event: Execute a piece of code
| QUOTE | global.timer -= 1 alarm[0] = room_speed/2.5 Red: Number of seconds to subtract. If you want a normal timer, stick with 1. Blue: Remove this if you want only seconds, or change if you want a faster/slower timer (decimal points work, so you can change it to something like /1.5 or multiplication like *2).
|
objTimer's Draw Event: Execute a piece of code
| QUOTE | draw_text(10,10,global.timer) Red: x and y position. Put it like x,y. Eg: 100,203
|
And finally, the reason I made this global. Player who you want to kill when time runs out Player's Step Event: Either: Execute a piece of code
| QUOTE | if global.timer < 0 { *stuff_for_killage* } |
or If a variable has a value
| QUOTE | Variable: global.timer Value: 0 Operation: smaller than |
Start of a block *drag_and_drop_killage* End of a block
This topic will come in handy.
--------------------
|
|
|
Xgoff |
|

<):|
![Super Happy Heart Badge [*]](https://archive.mfgg.net/html/badges/shappyheart.gif) ![Sprite Comp Winner Badge (1) [*]](https://archive.mfgg.net/html/badges/scg1.gif) ![Drawing Comp Winner Badge (1) [*]](https://archive.mfgg.net/html/badges/dcg1.gif) ![Drawing Comp Runner Up Badge (1) [*]](https://archive.mfgg.net/html/badges/dcr1.gif) ![MFGG Awards 2006 Winner [*]](https://archive.mfgg.net/html/badges/award06.gif)
![MFGG Awards 2007 Winner [*]](https://archive.mfgg.net/html/badges/award07.gif) ![Forum Event Badge [*]](https://archive.mfgg.net/html/badges/event.gif)

Group: Members
Posts: 52341
Member No.: 24
Joined: 13-October 03
Status: (0d)
![[--]](style_images/mfgg2_skin/warn_nosuspend.gif)

|
so anyway
--------------------
 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 |
|
|
|
Xgoff |
|

<):|
![Super Happy Heart Badge [*]](https://archive.mfgg.net/html/badges/shappyheart.gif) ![Sprite Comp Winner Badge (1) [*]](https://archive.mfgg.net/html/badges/scg1.gif) ![Drawing Comp Winner Badge (1) [*]](https://archive.mfgg.net/html/badges/dcg1.gif) ![Drawing Comp Runner Up Badge (1) [*]](https://archive.mfgg.net/html/badges/dcr1.gif) ![MFGG Awards 2006 Winner [*]](https://archive.mfgg.net/html/badges/award06.gif)
![MFGG Awards 2007 Winner [*]](https://archive.mfgg.net/html/badges/award07.gif) ![Forum Event Badge [*]](https://archive.mfgg.net/html/badges/event.gif)

Group: Members
Posts: 52341
Member No.: 24
Joined: 13-October 03
Status: (0d)
![[--]](style_images/mfgg2_skin/warn_nosuspend.gif)

|
Fastloops for fun and PROFIT!!! (ie ways to use them)Target applications:    (this can be done in TGF1 but it requires the Fastloop object) REQUIRED: Overlay (preferably Redux but whatever) | QUOTE (Drawing a grid with lines (independent loops)) | Always --> Overlay Redux - Clear with color: GetRGB(0,0,0) --> Start Loop: "X"; 10 --> Start Loop: "Y"; 10
On loop "X" --> Overlay Redux - Draw Line: loopindex("X") * 16; 0; loopindex("X") * 16; 0; 1; GetRGB(255,128,64)
On loop "Y" --> Overlay Redux - Draw Line: 0; loopindex("Y") * 16; 0; loopindex("Y") * 16; 1; GetRGB(64,128,255) |
| QUOTE (Drawing a grid with boxes (nested loops)) | Always --> Overlay Redux - Clear with color: GetRGB(0,0,0) --> Start Loop: "Y"; 10
On loop "Y" --> Start Loop: "X"; 10
On loop "X" --> Overlay Redux - Draw Rectangle: loopindex("X") * 16; loopindex("Y") * 16; 15; 15; GetRGB(128,64,32); 0; 0 |
--------------------
 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 |
|
|
|
Xgoff |
|

<):|
![Super Happy Heart Badge [*]](https://archive.mfgg.net/html/badges/shappyheart.gif) ![Sprite Comp Winner Badge (1) [*]](https://archive.mfgg.net/html/badges/scg1.gif) ![Drawing Comp Winner Badge (1) [*]](https://archive.mfgg.net/html/badges/dcg1.gif) ![Drawing Comp Runner Up Badge (1) [*]](https://archive.mfgg.net/html/badges/dcr1.gif) ![MFGG Awards 2006 Winner [*]](https://archive.mfgg.net/html/badges/award06.gif)
![MFGG Awards 2007 Winner [*]](https://archive.mfgg.net/html/badges/award07.gif) ![Forum Event Badge [*]](https://archive.mfgg.net/html/badges/event.gif)

Group: Members
Posts: 52341
Member No.: 24
Joined: 13-October 03
Status: (0d)
![[--]](style_images/mfgg2_skin/warn_nosuspend.gif)

|
Hey this topic is useful >:(
oh and i'm working on another one right now so
--------------------
 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 |
|
|
|
Grant |
|

John Freeman said
![Super Happy Heart Badge [*]](https://archive.mfgg.net/html/badges/shappyheart.gif) ![Sprite Comp Winner Badge (2) [*]](https://archive.mfgg.net/html/badges/scg2.gif) ![Sprite Comp Top 5 Badge (2) [*]](https://archive.mfgg.net/html/badges/sct2.gif) ![Drawing Comp Winner Badge (2) [*]](https://archive.mfgg.net/html/badges/dcg2.gif) ![Drawing Comp Top 5 Badge (1) [*]](https://archive.mfgg.net/html/badges/dct1.gif)
![Minigame Comp Winner Badge (1) [*]](https://archive.mfgg.net/html/badges/mcg1.gif) ![Minigame Comp Runner Up Badge (1) [*]](https://archive.mfgg.net/html/badges/mcr1.gif) ![Secret Santa Badge [*]](https://archive.mfgg.net/html/badges/present.gif)

Group: Members
Posts: 8260
Member No.: 2900
Joined: 31-October 06
Status: (0d)
![[--]](style_images/mfgg2_skin/warn_nosuspend.gif)

|
Making animated tiles in GM
Create several new layers of tiles in the room editor for a room, one for each frame in the tile animations. Don't use any layers for this that are the same as ones you're using for NON-animated tiles, or else things will get messed up. For example, let's say you're not already using Layer 2000000 for other tiles or backgrounds; in that case you could make Layers 2000000, 2000001, 2000002, and 2000003 for animated tiles with 4 frames, if you wanted the tiles to be at that depth compared to tiles in other layers. (If you wanted them to appear in front of other tiles, you could use some smaller depths than other layers have, like 5000, 5001, 5002, and 5003, for example.) Anyway, in each layer put in all the tile "frames" that you want to put in, making sure to put a different frame in each layer. If you put a tile in one place on one of these layers, but don't put a different animation of that tile in the same place on another layer, then things will get messed up, just like if there were a blank frame of a sprite.
Now, in whatever controller object you're using to put the code for the tiles in, add several alarm events (the same number as the number of frames for the tiles). Add code similar to this to the Create event of the object:
| CODE | tile_layer_show(2000000); tile_layer_hide(2000001); tile_layer_hide(2000002); tile_layer_hide(2000003); alarm[0] = 5; |
Replace the depth values with your own depth values, of course, and replace the 5 with whatever number of steps you want between each frame change.
In the Alarm 0 event, put code similar to this:
| CODE | tile_layer_hide(2000000); tile_layer_show(2000001); tile_layer_hide(2000002); tile_layer_hide(2000003); alarm[1] = 5; |
In Alarm 1, put something like this:
| CODE | tile_layer_hide(2000000); tile_layer_hide(2000001); tile_layer_show(2000002); tile_layer_hide(2000003); alarm[2] = 5; |
In Alarm 2, something like this:
| CODE | tile_layer_hide(2000000); tile_layer_hide(2000001); tile_layer_hide(2000002); tile_layer_show(2000003); alarm[3] = 5; |
For a 4-frame tile animation, you would cycle back to the beginning at this point, in Alarm 3. So just put the same code you put in the Create event.
| CODE | tile_layer_show(2000000); tile_layer_hide(2000001); tile_layer_hide(2000002); tile_layer_hide(2000003); alarm[0] = 5; |
Naturally, for different numbers of frames you would do things differently; the above example only applies to 4-frame animations. If you wanted only 2 animations, only Alarm 0 and Alarm 1 events would be necessary, as you would cycle back to the beginning after that. And obviously, you would change the number of lines of code for showing/hiding layers depending on the number of layers/frames.
Also, you can extend this to make sets of tiles in the same room that have different numbers of frames and loop at different times. Simply add completely different layers for each frame of each set of animating tiles (so that codes for the separate sets don't interfere), make more than one controller object to control the different sets (or use the same one with a lot of alarm events), and use different alterations of the code samples posted above in the different objects.
--------------------
| QUOTE (oh youtube trolls) | | u guys r retarded hippocrates |
| QUOTE (Piemanthe3rd) | | Pie is not random. I wish people would realize this. |
|
|
|
Xgoff |
|

<):|
![Super Happy Heart Badge [*]](https://archive.mfgg.net/html/badges/shappyheart.gif) ![Sprite Comp Winner Badge (1) [*]](https://archive.mfgg.net/html/badges/scg1.gif) ![Drawing Comp Winner Badge (1) [*]](https://archive.mfgg.net/html/badges/dcg1.gif) ![Drawing Comp Runner Up Badge (1) [*]](https://archive.mfgg.net/html/badges/dcr1.gif) ![MFGG Awards 2006 Winner [*]](https://archive.mfgg.net/html/badges/award06.gif)
![MFGG Awards 2007 Winner [*]](https://archive.mfgg.net/html/badges/award07.gif) ![Forum Event Badge [*]](https://archive.mfgg.net/html/badges/event.gif)

Group: Members
Posts: 52341
Member No.: 24
Joined: 13-October 03
Status: (0d)
![[--]](style_images/mfgg2_skin/warn_nosuspend.gif)

|
Basic Level Editor: Probably too simple to be really useful, but it at least gives you an idea of how to make oneTarget Applications:  http://star.walagata.com/w/supermetalmario/leveditor.rar
--------------------
 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 |
|
|
|
Xgoff |
|

<):|
![Super Happy Heart Badge [*]](https://archive.mfgg.net/html/badges/shappyheart.gif) ![Sprite Comp Winner Badge (1) [*]](https://archive.mfgg.net/html/badges/scg1.gif) ![Drawing Comp Winner Badge (1) [*]](https://archive.mfgg.net/html/badges/dcg1.gif) ![Drawing Comp Runner Up Badge (1) [*]](https://archive.mfgg.net/html/badges/dcr1.gif) ![MFGG Awards 2006 Winner [*]](https://archive.mfgg.net/html/badges/award06.gif)
![MFGG Awards 2007 Winner [*]](https://archive.mfgg.net/html/badges/award07.gif) ![Forum Event Badge [*]](https://archive.mfgg.net/html/badges/event.gif)

Group: Members
Posts: 52341
Member No.: 24
Joined: 13-October 03
Status: (0d)
![[--]](style_images/mfgg2_skin/warn_nosuspend.gif)

|
SMW-style fadeoutTarget applications:   Objects needed: Active Overlay ("Fade"), Overlay Redux ("Overlay") 1. Move Overlay outside the frame, and resize Fade to the window's size and position it at 0,0 2. In Overlay's Setup menu, make sure the Transparent Mode radio button is selected | CODE | Start of Frame --> Fade - Set Redux address: ovlAddress( "Overlay" )
((Event that would normally end the frame, but it this case it doesn't)) --> Set Global Value A to: 500 ((may vary depending on your window size))
Global Value A > 0 --> Subtract from Global Value A: 2 --> Overlay - Clear with getRGB: 1 --> Overlay - Draw Ellipse: [X] ((half of the window's width)); [Y] ((half of the window's height)); [Width] Global Value A; [Height] Global Value A; [Fill Color] 0; [Outline Thickness] 0; [Outline Color] 0
Global Value A <= 0 --> ((End of frame actions))
|
This post has been edited by Xgoff on Sep 1 2007, 05:24 PM
--------------------
 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 |
|
|
|
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:
Track this topic
Receive email notification when a reply has been made to this topic and you are not active on the board.
Subscribe to this forum
Receive email notification when a new topic is posted in this forum and you are not active on the board.
Download / Print this Topic
Download this topic in different formats or view a printer friendly version.
[ Script Execution time: 0.1232 ] [ 14 queries used ] [ GZIP Enabled ] [ Server Load: 1.06 ]
| |