I Wanna Be The Forums!

Please login or register.

Login with username, password and session length
Advanced search  

News:

Chat button has been eaten. Click here to join in the idling fun!

Pages: [1] 2 3 ... 6

Author Topic: I Wanna Be The Better Engine *DELETED*  (Read 26004 times)

YoSniper

  • Hero Member
  • *****
  • Posts: 706
  • Code blooded. Check it and see.
    • View Profile
    • My YouTube channel
I Wanna Be The Better Engine *DELETED*
« on: February 03, 2011, 10:15:56 pm »

FOR THOSE CONCERNED, YES I DID DELETE THE ENGINE. FOR THOSE WHO STILL HAVE IT, I AM HOPEFUL THAT YOU EITHER HAVE THE SKILL TO TURN IT INTO SOMETHING GOOD OR REMOVE IT. I AM DONE WITH THE WHOLE HELPDESK SCENE.

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

I WILL ATTEMPT TO LIST AS MUCH DOCUMENTATION AS I CAN RIGHT HERE TO SERVE AS A MANUAL

***WORLD OBJECT***
The world object is responsible for saving and loading the game, transitions between rooms at borders, and keeping track of any items that have been collected and bosses defeated. It even stores the user's controls for the game.

This object must be made persistent and never destroyed. It is created ONCE and only ONCE, and this happens in the very first room of the game, which is startRoom. If you rearrange the order of the rooms in the game, you will severely screw up the game.

In the Create Event, one of the first variables set is called gameCaption. The whole purpose of this is to distinguish the save files and globaldata files that your game creates from those of any other game in the same directory. Two games that produce a file that is merely called "save0" or "IWBTBE_save0" are going to screw each other up. To prevent this, change gameCaption to something related to your game IMMEDIATELY. If your game is called "I Wanna Be Bullshit" then a fitting gameCaption would be "IWBBS_".

The code in this object is set up by a convention that I recommend you use, especially when it comes to travelling between rooms. If the player touches a border and you have not accounted for the room transition in the world object, then he will walk or fall off the edge of the room and fall into an infinite abyss. If writing code for room transitions as described in the Step Event of this object is too complicated for you, then an easy alternative is to use warp objects at the borders. However, this looks choppy and amateurish.

The Draw Event of the world object may seem silly at the start because the world object has no sprite. However, it definitely serves a purpose and you must keep the world object visible in order for this to work. The world object is responsible for things like text on the environment. You can use it to create a HUD if you wish (and assuming you have the skill to pull that off.) The text/graphics that the world object draws can only overlap objects deeper than it, though. So if you create an object with a depth of -10, anything the world draws in the same place will be hidden behind that object.

In the Room Start Event, you will notice a script called musicFunctions is called. This script is responsible for the music in your game, and is designed so that the music will only restart if a room transition takes place between two areas that have different tunes. To account for rooms that you add to your game, make sure to list them USING THE GIVEN CONVENTION in the musicFunctions script.


***PLAYER OBJECT***
Quite a lot of stuff goes on in this object, so I will do my best to break it down.

In the Create Event, all variables that belong to the player are initialized. Each variable is preceded by a comment (except for the enable variable, which at the start is only used for the purpose of control configuration) that describes what the variable is used for.

In the Begin Step Event, the user input controls the player. The reason why this is the Begin Step event is because I wanted to make sure that interactions with objects took place AFTER the user had input his/her commands. This helps maintain order in the program.

In the End Step Event, the player's gravity and sprites are selected based on interaction with the environment. The regular Step Event for all objects has already occurred, so all that is left is to take a snapshot of the player's immediate environment, and set variables for the Draw Event and the beginning of the next step. The player's gravity is set just as a safeguard. This may be redundant code, but I don't want to take chances. After that, the player's sprite is chosen depending on whether he is sliding down a vine, standing on the ground, or in the air. If the game is on Medium difficulty, the player's bow is set accordingly so that it doesn't look like it's lagging behind him.


***ITEM OBJECT***
If you want to add secret/collectible items to your game, this is the object to use. However, it takes quite a bit of work to achieve the variety you want.

In the Create Event, you set the sprite of the item based on what room it's in. If for whatever reason you have two or more items in the same room, then you must also distinguish between them by way of their x and y coordinates. Placing two items directly on top of each other is horrible practice and should never be done.

In the Collision Event with the player object, the item will tell the world object that it should set one of its item slots to the value "true". After that, it plays the item sound. The world object saves the collection of the item so it never has to be collected again, even if you press R or load another save slot. Finally, the object destroys itself.

IN ORDER TO INSTANTIATE AN ITEM OBJECT IN A PARTICULAR ROOM, YOU MUST OPEN UP THE ROOM'S CREATION CODE UNDER ITS SETTINGS TAB. The code you write in this panel should look something like this:
General Format of Instantiating an Item in a Room
Code: [Select]
if !world.items[#] {instance_create(x, y, item);}where you must substitute actual numbers for #, x, and y. Make sure that the value for # matches the index of the world.items array associated with that particular item so that your game is consistent. If for example you had this situation:

Creation Code of Room room1
Code: [Select]
if !world.items[0] {instance_create(400, 304, item);}
item Collision Event with player
Code: [Select]
switch(room) {
    case room1: world.items[1] = true;
                     break;
}
//Rest of code below

Then the item would respawn when it shouldn't, and whatever item was linked to world.items[1] might never appear in another room.

Items can also be made to only be saved in a particular save file. This would mean that items collected in one save slot would not be read as collected in another save slot. This would also mean that in order to save that you have collected the item, you would have to shoot a save point after having gotten it. If this is what you wish to do, then you must take the world.items part out of the writeDeaths script, and instead put it in the savegame script.
« Last Edit: August 16, 2011, 11:37:51 pm by Derpface Pony (YoSniper) »
Logged
I don't traverse the forums as much anymore. Follow me on Twitter if you want to keep tabs on me!

Twitter: @YoSniperGames
Twitch: yosniper

Streams happen whenever I feel like it.

Squishy69

  • Full Member
  • ***
  • Posts: 215
  • Amicitia est magicae
    • View Profile
Re: I Wanna Be The Better Engine version 3 *with video tutorials*
« Reply #1 on: February 04, 2011, 12:07:38 am »

*Gasp!* My dreams of a fangame might come true because of you! (or maybe not cuz I'm pretty lazy XP)
Logged


Party Hard

RevoluTion

  • Newbie
  • *
  • Posts: 38
    • View Profile
Re: I Wanna Be The Better Engine version 3 *with video tutorials*
« Reply #2 on: February 04, 2011, 05:17:36 am »

*AHEM*
The Infamous Blue Screen...
Fix?
Logged

YoSniper

  • Hero Member
  • *****
  • Posts: 706
  • Code blooded. Check it and see.
    • View Profile
    • My YouTube channel
Re: I Wanna Be The Better Engine version 3 *with video tutorials*
« Reply #3 on: February 04, 2011, 11:22:55 am »

*AHEM*
The Infamous Blue Screen...
Fix?

If Game Maker is causing your computer to give you the blue screen of death, it is a problem beyond my knowledge. Sorry. Maybe ask somebody on the Game Maker Community forum?
Logged
I don't traverse the forums as much anymore. Follow me on Twitter if you want to keep tabs on me!

Twitter: @YoSniperGames
Twitch: yosniper

Streams happen whenever I feel like it.

Nickshrike

  • Jr. Member
  • **
  • Posts: 82
  • .
    • View Profile
Re: I Wanna Be The Better Engine version 3 *with video tutorials*
« Reply #4 on: February 04, 2011, 01:09:42 pm »

I will download this now :D

I will tell you what i think of it
Logged

Fred-eye-inc

  • Guest
Re: I Wanna Be The Better Engine version 3 *with video tutorials*
« Reply #5 on: February 04, 2011, 01:23:40 pm »

Yosniper. When I made my fangame I never used your engine, but I always admired it for having extra stuff and ended up porting a lot of your codes over to tijits. I'll have a look at this and tell you my opinion (I don't make fangames now anyway but it's worth an opinion).

EDIT: Just used it. I think that the players physics are good and feel very close to the originals, I do however think the sliding on the walljumps is a bit to fast and needs to be slowed down a bit.
The triggers are smooth and very easy to use, which is good for newcomers. The camera works great form what I've seen, and the implemention of three saves files is great and agian easy for people who are new to making fangames. Good show!

EDIT 2: When the player falls and lands he goes in the platform for a split second before being where he should be.
« Last Edit: February 04, 2011, 01:39:23 pm by DERF . »
Logged

YoSniper

  • Hero Member
  • *****
  • Posts: 706
  • Code blooded. Check it and see.
    • View Profile
    • My YouTube channel
Re: I Wanna Be The Better Engine version 3 *with video tutorials*
« Reply #6 on: February 04, 2011, 01:49:16 pm »

EDIT 2: When the player falls and lands he goes in the platform for a split second before being where he should be.

Yeah, and I think I know why. It might have been that in the block and platform objects, I set the player's y and gravity correctly, but I forgot to put

Code: [Select]
player.vspeed = 0;
in there with it. I will patch that later today and give a new download link.
Logged
I don't traverse the forums as much anymore. Follow me on Twitter if you want to keep tabs on me!

Twitter: @YoSniperGames
Twitch: yosniper

Streams happen whenever I feel like it.

Float

  • Newbie
  • *
  • Posts: 35
  • Lightning isn't floating
    • View Profile
Re: I Wanna Be The Better Engine version 3 *UPDATE 2/4/2011*
« Reply #7 on: February 05, 2011, 11:30:19 pm »

Nice. I'll go ahead and give a try then.
Logged

pserafi

  • Hero Member
  • *****
  • Posts: 541
    • View Profile
Re: I Wanna Be The Better Engine version 3 *UPDATE 2/4/2011*
« Reply #8 on: February 06, 2011, 09:09:22 pm »

So your the only person left letting people make shitty fangames...
ITS ON *punches screen* FUCK
Logged

YoSniper

  • Hero Member
  • *****
  • Posts: 706
  • Code blooded. Check it and see.
    • View Profile
    • My YouTube channel
Re: I Wanna Be The Better Engine version 3 *UPDATE 2/4/2011*
« Reply #9 on: February 07, 2011, 11:23:50 am »

So your the only person left letting people make shitty fangames...
ITS ON *punches screen* FUCK

LOL. If the time comes when I feel all hope is lost, I will remove my engine and leave everyone to fend for themselves. I figure I should at least see the next few products before I pull the plug completely.
Logged
I don't traverse the forums as much anymore. Follow me on Twitter if you want to keep tabs on me!

Twitter: @YoSniperGames
Twitch: yosniper

Streams happen whenever I feel like it.

Wolsk

  • Hero Member
  • *****
  • Posts: 579
  • Wolsky McKitty :3
    • View Profile
    • My Youtube
Re: I Wanna Be The Better Engine version 3 *UPDATE 2/4/2011*
« Reply #10 on: February 07, 2011, 11:28:17 am »

WHEN WILL KAYIN RELEASE IWBTG 2?
IF WE HAVE THAT WE WON'T NEED FANGAMES.
AND NO I DON'T MEAN THAT "GAME" BY CANTAVANDA AS GOOD AS IT WAS.
Logged
yeah
ebola is super funny lol
EBOLA (i still lmfao)

Fred-eye-inc

  • Guest
Re: I Wanna Be The Better Engine version 3 *UPDATE 2/4/2011*
« Reply #11 on: February 07, 2011, 11:30:21 am »

He's working on it. He released a one room demo with a triple jump a while back although only a few people have it. Other than that I believe he's been quite quiet about it.
Logged

pserafi

  • Hero Member
  • *****
  • Posts: 541
    • View Profile
Re: I Wanna Be The Better Engine version 3 *UPDATE 2/4/2011*
« Reply #12 on: February 07, 2011, 04:18:49 pm »

He's working on it. He released a one room demo with a triple jump a while back although only a few people have it. Other than that I believe he's been quite quiet about it.
If Kayin is reading this, I will suck your dick to be a beta tester.
Logged

Wolsk

  • Hero Member
  • *****
  • Posts: 579
  • Wolsky McKitty :3
    • View Profile
    • My Youtube
Re: I Wanna Be The Better Engine version 3 *UPDATE 2/4/2011*
« Reply #13 on: February 08, 2011, 01:31:43 am »

If Kayin is reading this, I'll politely ask you to be a beta tester.
Honestly, if anyone should be a tester, it's tijit.
Being one of two or three masters and all..
Logged
yeah
ebola is super funny lol
EBOLA (i still lmfao)

YoSniper

  • Hero Member
  • *****
  • Posts: 706
  • Code blooded. Check it and see.
    • View Profile
    • My YouTube channel
Re: I Wanna Be The Better Engine 3.1 *UPDATE 2/14/2011*
« Reply #14 on: February 14, 2011, 04:45:39 pm »

Bump for 3.1. NO MORE VERSIONS ARE COMING OUT, SO THIS HAD BETTER WORK!
Logged
I don't traverse the forums as much anymore. Follow me on Twitter if you want to keep tabs on me!

Twitter: @YoSniperGames
Twitch: yosniper

Streams happen whenever I feel like it.
Pages: [1] 2 3 ... 6