Zelda Engine with MC graphics
- Author:
- Sahittam
- Last Updated:
- May 09, 2013, 11:23:19 AM
- Tags:
-
- Rating:
- 5
- Votes:
- 30
- Views:
- 1527
- Downloads:
- 435
IMPORTANT NOTICE:
___________________________________________________________________
I would like to discourage everyone from using this engine.
It looks very nice, animations are smooth, it has some neat effects, and it is almost bug-free, but it is terribly programmed:
The code has no structure, and neither comments nor other forms of documentation exist. (almost ...)
Basically, the only one who knows their way around the engine is me, so you are going to have a hard time adding new features, and considering that this engine hasn't nearly enough features to make a complete game, this will be a problem.
___________________________________________________________________
Requirements: Game Maker 7 Pro
Scroll down for a transcript of the old topic.
---------------------------------------------------------------------------------------
Last Updated: 17th April 2011
---------------------------------------------------------------------------------------
Version: 0.1.8c
A Zelda Engine in Game Maker 7.
An explanation for how to use the textbox will follow soon ... Haha... 
If you have GM 8, please try this out anyway (it's only 1.3 MB), and tell me, if it works.
Should the source produce errors in GM 8, you can still download the executable (2.9 MB).
Press F2 to see the FPS in the top-left corner. You should have 30 FPS. If you don't, please tell me.
Changes or new features in version 0.1.8c (since 0.1.6b):
- swimming + other water related things
- spin attack + wall stabbing (this was sooo much work)
- bugfixes/improvements
Things I will (probably) work on next:
- (finish day/night circle)
- more items (Boomerang, Bottles, ...)
- more monsters
- pushing/pulling
- cutscene scripts
- locked doors, keys, switches
- ledge jumping
Current Features:
0.1.8c:
- walking with corner-cutting
- moving on ice
- falling into holes
- breaking floors that turn into holes
- light engine
- rolling (also diagonally)
- sword
- shield
- rollstab
- spin attack + wall stabbing
- cuttable bushes
- HUD
- 3 different swords
- 5 different shields
- lens of truth engine (activate with Q or the Item)
- Day/Night Engine (unfinished)
- Blur Effect when the Menu is opened
- Menu Engine with info boxes done, except for Map Menu, Sub-Menus
- Item System
- Bow and Arrow, also Fire Arrow and Bow/LightBow
- Fire, which burns bushes, etc.
- Monster/getting hurt/push back engine
- Octoroks
- File Select/Save
- Room transitions
- Pick up/throw/put down
- Bombs
- Textbox
- Rupees/Items drop
- lightable Torches
- chests, signposts
- Heart Pieces
- Swimming
Controls:
F1: Show Controls
X: Roll
C: Sword
S: Shield
D/F/V: Items
Y/Z + D/F/V: Change the mode of the item on the key
(change Normal Arrow/Fire Arrow)
K: Enter Code which is executed immediately
G: Change Bow/LightBow
1,2,3,4,5,6,7: Change Life and Magic
8: Change Sword
9: Change Shield
0: Change Room Type
T: set FPS to 1
U: set FPS to 5
I: set FPS to 30 (normal)
(Q: Lens of Truth on/off)
(E: Lantern of/off)
W: view must stay in room on/off
M: Sword Power +
N: Sword Power -
ALT: Example Textbox
CONTROL: Example Textbox with answer choice
SHIFT: Example Textbox with number input
If you find any bugs, or have any suggestions, what I should include in this engine, please post something here.
Credits:
Scooternew for the menu pause. Click.
and for the base of the textbox.
Miles07 for many Item Symbols. Click.
Faceless for Fire/Ice/Light Arrow sprites.
dalin024 for the HDR Effect
---------------------------------------------------------------------------------------
[spoiler=Transcript of the old topic]
Sahittam
Version: 0.1.5i
A Zelda Engine in made Game Maker 7.
Click here and go to [News] for more (detailed) info and explanations, or go to the [Gallery] for Screenshots.
Requirements:
Game Maker 7 Pro
An explanation for how to use the textbox will follow soon ...
If you have GM 8, please try this out anyway (it's only 1 Mb), and tell me, if it works.
Should the source produce errors in GM 8, you can still download the executable.
Press F2 to see the FPS in the top-left corner. You should have 60 FPS. If you don't, please tell me.
IMPORTANT: The special letters like ?,?,etc. might not work on your computer due to some weirdness with two different ascii codes which I don't really understand.
If it DOESN'T work, please post a comment.
To check if they work, go to a signpost and read it. The second part of the textbox should look like this:
Changes or new features in version 0.1.5i (since 0.1.3):
- Textbox
- Bow/LightBow
- Rupees/Items are now left behing by monsters
- lightable Torches
- chests, signposts
- info boxes
- Heart Pieces
- bugfixes/improvements
Things I will (probably) work on next:
- swimming
- (finish spin attack)
- (finish day/night circle)
- more items
- more monsters
Current Features:
0.1.5i:
- walking with corner-cutting
- moving on ice
- falling into holes
- breaking floors that turn into holes
- light engine
- rolling (also diagonally)
- sword
- shield
- rollstab
- charging for spin attack (but the spin attack itself not yet)
- cuttable bushes
- HUD
- 3 different swords
- 5 different shields
- lens of truth engine (activate with Q or the Item)
- Day/Night Engine (unfinished)
- Blur Effect when the Menu is opened
- Menu Engine with info boxes done, except for Map Menu, Sub-Menus
- Item System
- Bow and Arrow, also Fire Arrow and Bow/LightBow
- Fire, which burns bushes, etc.
- Monster/getting hurt/push back engine
- Octoroks
- File Select/Save
- Room transitions
- Pick up/throw/put down
- Bombs
- Textbox
- Rupees/Items drop
- lightable Torches
- chests, signposts
- Heart Pieces
Controls:
F1: Show Controls
X: Roll
C: Sword
S: Shield
D/F/V: Items
Y/Z + D/F/V: Change the mode of the item on the key
(change Normal Arrow/Fire Arrow)
K: Enter Code which is executed immediately
G: Change Bow/LightBow
1,2,3,4,5,6,7: Change Life and Magic
8: Change Sword
9: Change Shield
0: Change Room Type
T: set FPS to 1
U: set FPS to 10
I: set FPS to 60 (normal)
(Q: Lens of Truth on/off)
(E: Lantern of/off)
W: view must stay in room on/off
M: Sword Power +
N: Sword Power -
ALT: Example Textbox
CONTROL: Example Textbox with answer choice
SHIFT: Example Textbox with number input
If you find any bugs, or have any suggestions, what I should include in this engine, please post something here.
Credits:
Scooternew for the menu pause. Click.
and for the base of the textbox.
Miles07 for many Item Symbols. Click.
Faceless for Fire/Ice/Light Arrow sprites.
Niek
It doesn't work:
Quote
__________________________________________
FATAL ERROR in
action number 1
of Other Event: Room End
for object MasterObject:
COMPILATION ERROR in code action
Error in code at line 108:
over_screen = sprite_create_from_surface(surface_transition_over,0,0,320,240,0,1,0,1,0,0);
^
at position 90: Wrong number of arguments to function or script.
__________________________________________
Oh, yeah it would have been nice if your code had some comments in them. Oh yes and try to have a decent mapping structure. Now it is a bit scattered in it all.
Xfixium
Had the same problem, the reason being is that GM8 has different number of arguments for sprite_create_from_surface. No biggy. Had to change 2 lines in the master object room end event, and it was golden. I like the engine. I had messed with it before when you first uploaded it to wips. The unfortunate thing is that it runs very slowly for my computer. I'm getting only half the frame rate I should be getting. Overall a very nice job.
Niek
Yeah, but I can't open it in GM7. What did you change those lines in.
I have taken a look at his code, but I must say that the code is rather tardy and difficult to understand. There are no comments about what user_defined_events are. He also uses many if..if..if..if.. constructions instead of a switch or if..else if..else if.. A lot of objects which have no real function, besides just drawing a static image. This is very apparent in the menu. The organization of his sprites and objects are also scattered everything is basically thrown on one big pile. A clear inheritance heirarchy is also not present. For lite users it also impossible to know what constants are used. Especially when it comes to direction it switches between the use of 'up/down/right/left'; and '1/2/3/4'.
If he wants to have this engine used by people then it has to be cleaned up a lot.
EDIT: I just tried out the executable. I have to say that I like a lot of the animations. Especially the lighting effect of torches and the lantern. I also like how the lens of truth reveals objects, but I am seeing the lines of some square boundaries. At another point the AI of the octorocks constantly shoot at you when they see you. WIth the movement there is also a big flaw in that running diagonally lets you move a lot faster than horizontal and vertical.
Oh yeah the frame rate seems really low as the game runs very slow and uses up about all the CPU resources available, that the attachment shows. Additionally the screenshot shows a situation where a collision happens and I cannot pass.
Xfixium
Just changed the MasterObject, it's in the Engine Base folder. There are 2 lines in the room end event that uses the old version of sprite_create_from_surface. I messed with it a little, put the target frame rate and what I was actually getting in the caption. I was getting 30 or less of the 60 fps it was trying to achieve. I also got some weird invisible collisions.
Sahittam
Thanks for your comments and for liking parts of the engine!
When this engine is finished, it's supposed to be able to create Zelda games very easily (with a help file and a tutorial) and things will be more organized then, with for example a folder ENGINE and a folder GAME. For creating games you would only have to edit things in the GAME folder. But it would of course be nice if the code was understandable, so that you can change things about the engine that you don't like.
I know I should comment my code. I'll try to comment more in the future, but I never normally do it, so I can't promise anything.
And the maps need to be redone, I agree.
The square boundaries with the Lens of Truth is something I have seen before, on another computer (not mine). I already have an idea how to fix this.
About those useless objects: They are normally there to show something. For example the FlyingObjectWithoutAnyPurpose shows that the scrolling room transition creates no graphic bugs with a object that has a lower depth than Link. This is again an issue about not commenting my code. If I did, you would know those object's purposes. Objects like that will be removed later.
Yes, I know the game file is a huge mess, and the engine is coded rather badly, but at least it has almost no bugs, which is also a top priority. I won't change the coding (because it works)(except for adding comments ... I hope), but I should organize things more and make things more easy to understand.
The octorocks are supposed to do that, if you don't like it, you can remove it. (Of course, again, comments would be useful to know what code makes the octorocks do that)
And the invisible collisions: Those are most likely hidden blocks; reveal them with your Lens of Truth.
Now, the slowdown ... sigh. Games I make always are slow on other computers, even the simplest ones (I have 60 fps on my computer). I'm starting to consider to actually change the fps to 30 and doubling every speed/image speed. This would be a lot of work, but maybe it's the right thing to do. Another thing I could change is the fire effect. Maybe I should change it into something simpler.
And if those two lines are the only thing that needs to be changed in GM 8, them I might change to the new Game Maker ...
Niek
Quote from: Sahittam:
And if those two lines are the only thing that needs to be changed in GM 8, them I might change to the new Game Maker ...
I thought you already hadmade it in GM8, because when I open the file with GM7 I get an error due to being made by a newer version.
Your code would also be a lot faster if you used if..else if.. or switch statements. The following makes this very apparant:
Code:
if (instance_exists(StartGame) == false)
{
global.time_pass = false;
if (global.location_type == 0) global.time_pass = true;
if (transition == true) global.time_pass = false;
if (global.pause == true) global.time_pass = false;
if (global.time_pass == true)
{
global.seconds+=4;
if (global.seconds >= 60) {global.seconds -= 60; global.minutes+=1;}
if (global.minutes >= 60) {global.minutes = 0; global.hours+=1;}
if (global.hours >= 24) {global.minutes = 0; global.hours = 0;}
}
if (global.hours < 5 || global.hours >= 20) {global.mood = 0;}//night
if (global.hours < 7 && global.hours >= 5) {global.mood = 1;}//dawn
if (global.hours < 18 && global.hours >= 7) {global.mood = 2;}//day
if (global.hours < 19 && global.hours >= 18) {global.mood = 3;}//sunset 1
if (global.hours < 20 && global.hours >= 19) {global.mood = 4;}//sunset 2
if (global.mood == 0) {intensity = 1; intensity2 = 0;}
if (global.mood == 1)
{
intensity = (7200-((global.hours-5)*3600+(global.minutes)*60+global.seconds))/7200;
intensity2 = 0;
}
if (global.mood == 2) {intensity = 0; intensity2 = 0;}
if (global.mood == 3)
{
intensity = 0;
intensity2 = ((global.hours-18)*3600+(global.minutes)*60+global.seconds)/3600;
}
if (global.mood == 4)
{
intensity =((global.hours-19)*3600+(global.minutes)*60+global.seconds)/3600;
intensity2 = (3600-((global.hours-19)*3600+(global.minutes)*60+global.seconds))/3600;
}
}
Oh yeah one more thing. Your engine is only usable for people with a Pro version.
Sahittam
Quote from: Niek:
I thought you already hadmade it in GM8, because when I open the file with GM7 I get an error due to being made by a newer version.
Hm, weird. I definitely made it in GM7
Quote from: Niek:
Your code would also be a lot faster if you used if..else if.. or switch statements. The following makes this very apparant:
(code)
Ok, I'll change that code. I don't know about switch though..., is it faster than if ... else if or is there no difference?
Quote from: Niek:
Oh yeah one more thing. Your engine is only usable for people with a Pro version.
Yes, I'm aware of that. That's why GM7 Pro is listed in the requirements (on the Projects WIP Page; Now I've added the requirements to this thread, too).
And another thing which I forgot to answer:
I personally like the diagonal movement for Link, and won't change it.
Nubcake
wow it is seriously slow , you need to deactivate everything outside the view.
Sahittam
Quote from: Nubcake:
wow it is seriously slow , you need to deactivate everything outside the view.
Hm..., I don't like deactivating everything outside the view. It causes so many problems. I'll find other solutions for the speed issue.
Brutus
error opening file for writing
Undecided
Antidote
Sahittam, deactivating everything not seen is a standard technique used by ALL major game devs this is to reduce the resources needed. If it wasn't done then games like the ones we have today wouldn't be possible because they use to many resources.
Take any FPS with a noclip mode and 'fly' around a map normally FILLED with AI, and you'll notice that it's completely barren.
Subterfuge
Quote from: Antidote:
Take any FPS with a noclip mode and 'fly' around a map normally FILLED with AI, and you'll notice that it's completely barren.
Battlefront II blows the 'any FPS' theory to hell. Just saying. But BFII isn't exactly sparkling new or in danger of overtaxing systems.
Though I do say that you could deactivate off screen things.
Sahittam
Okay, I'll try to do that deactivating. I just have to make sure it doesn't cause problems.
Example problem: one collision object is deactivated, a monster is not so far outside the view and still activated, and then it walks to where the collision should be.
Another problem would be when a line of bushes is on fire and a part of the line is outside the view. What should happen? Should the fire stop outside the view? Or should all bushes be permanently activated?
And what if the solution of a puzzle requires you to shoot a switch outside your view with an arrow?
What I'm trying to say is, that there are so many (unexpected) problems, that it will take me some time to find a good solution.
Quote from: Brutus:
error opening file for writing
Undecided
The Game Files folder has to be in the same directory as the executable. I think that's your problem.
4Sword
Yeah Game Maker can be odd about the deactivation of instances. I once experimented with it a little bit when I had ice movement with corners and like the diagonal block you could run into would be 32 x 32 pixels but it would only draw half and the half not drawn you wouldn't collide with. I was probably just doing it wrong though; I thought I had set the boundaries to give it enough space to do the activation and deactivation.
Also your engine is alright; it is good that it has the features it does but it could be made more efficient in that some of the features in the code are hodgepodged together. (also though, this ma have been confusing in that the GM Minish Cap Engine is in Sponsored, but engines should be posted in the Engines board. Ideally the GM Minish Cap Engine will be moved there in some future form. I renamed Templates in case there was any confusion, will change the site accordingly later).
[/spoiler]
