Hello Guest, please login or register.
Did you miss your activation email?
Login with username, password and session length.

Pages: [1]   Go Down

Author Topic: Zelda Engine with MC graphics  (Read 8125 times)

0 Members and 1 Guest are viewing this topic.
Zelda Engine with MC graphics
« on: October 23, 2010, 09:25:09 pm »
  • *
  • Reputation: +3/-0
  • Offline Offline
  • Posts: 61
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.
« Last Edit: November 01, 2010, 09:29:34 pm by Sahittam »
Logged
Re: Zelda Engine with MC graphics
« Reply #1 on: October 23, 2010, 10:14:16 pm »
  • *
  • Reputation: +9/-0
  • Offline Offline
  • Gender: Male
  • Posts: 3725
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.
Logged
Re: Zelda Engine with MC graphics
« Reply #2 on: October 24, 2010, 06:57:49 am »
  • *
  • Reputation: +9/-0
  • Offline Offline
  • Posts: 728
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.
Logged
  • Pyxosoft
Re: Zelda Engine with MC graphics
« Reply #3 on: October 24, 2010, 09:08:33 am »
  • *
  • Reputation: +9/-0
  • Offline Offline
  • Gender: Male
  • Posts: 3725
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.
« Last Edit: October 24, 2010, 09:52:56 am by Niek »
Logged
Re: Zelda Engine with MC graphics
« Reply #4 on: October 24, 2010, 10:03:24 am »
  • *
  • Reputation: +9/-0
  • Offline Offline
  • Posts: 728
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.
Logged
  • Pyxosoft
Re: Zelda Engine with MC graphics
« Reply #5 on: October 24, 2010, 12:02:16 pm »
  • *
  • Reputation: +3/-0
  • Offline Offline
  • Posts: 61
Thanks for your comments and for liking parts of the engine!  XD

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 ...
Logged
Re: Zelda Engine with MC graphics
« Reply #6 on: October 24, 2010, 01:25:17 pm »
  • *
  • Reputation: +9/-0
  • Offline Offline
  • Gender: Male
  • Posts: 3725
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: [Select]
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.
Logged
Re: Zelda Engine with MC graphics
« Reply #7 on: October 24, 2010, 02:33:27 pm »
  • *
  • Reputation: +3/-0
  • Offline Offline
  • Posts: 61
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

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?

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.
Logged
Re: Zelda Engine with MC graphics
« Reply #8 on: October 24, 2010, 04:30:48 pm »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Posts: 160
wow it is seriously slow , you need to deactivate everything outside the view.
Logged
Nubcake now uses Purebasic!
Re: Zelda Engine with MC graphics
« Reply #9 on: October 24, 2010, 05:58:39 pm »
  • *
  • Reputation: +3/-0
  • Offline Offline
  • Posts: 61
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.
Logged

Brutus

Kirby Master
Re: Zelda Engine with MC graphics
« Reply #10 on: November 02, 2010, 01:35:07 am »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 134
error opening file for writing
 :-\
Logged
if place_free(x,y,z) {wrong number of arguments to function or script}

Antidote

>.>
Re: Zelda Engine with MC graphics
« Reply #11 on: November 02, 2010, 02:06:37 am »
  • In all seriousness who's serious?
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 1485
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.
Logged
  • Axiomatic Data Laboratories

Subterfuge

Hero of Effin' Time
Re: Zelda Engine with MC graphics
« Reply #12 on: November 02, 2010, 03:02:52 am »
  • Hero of Effin' Time
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Posts: 37
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.
« Last Edit: November 02, 2010, 03:12:07 am by Subterfuge »
Logged
That which binds us...

Sets us free...
Re: Zelda Engine with MC graphics
« Reply #13 on: November 02, 2010, 10:44:19 am »
  • *
  • Reputation: +3/-0
  • Offline Offline
  • Posts: 61
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.

error opening file for writing
 :-\

The Game Files folder has to be in the same directory as the executable. I think that's your problem.
« Last Edit: November 02, 2010, 10:55:09 am by Sahittam »
Logged
Re: Zelda Engine with MC graphics
« Reply #14 on: November 02, 2010, 10:58:45 am »
  • *
  • Reputation: +8/-0
  • Offline Offline
  • Gender: Male
  • Posts: 6604
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).
Logged
Re: Zelda Engine with MC graphics
« Reply #15 on: November 02, 2010, 11:31:48 am »
  • *
  • Reputation: +3/-0
  • Offline Offline
  • Posts: 61
(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).

Ah, ok, I didn't know that. Sorry.
« Last Edit: November 02, 2010, 11:34:24 am by Sahittam »
Logged
Pages: [1]   Go Up

 


Contact Us | Legal | Advertise Here
2013 © ZFGC, All Rights Reserved



Page created in 0.033 seconds with 69 queries.

anything