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: Bow & Arrow  (Read 3437 times)

0 Members and 1 Guest are viewing this topic.
Bow & Arrow
« on: September 04, 2009, 07:47:32 am »
  • *
  • Reputation: +9/-0
  • Offline Offline
  • Gender: Male
  • Posts: 3725
I have been working some more on the engine and I have added the functionality of the Bow and Arrow. You might ask why I had chosen the bow & arrow to implement as the next functionality. The reasons are simple:

1) Thanks to Frozenfire there are some actual sprites of the item in use. At least ones I could find next to the Mole Mitts and Roc's Cape. Apparently TSR has some nice spritesheets with Link animations but they don't really contain any items.
2) The introduction of some new things, like the usage of item buttons, projectiles and a limited amount of ammo.
3) It is the simplest item that also has subactions:
   * Loading an arrow.
   * Walking with the bow and arrow (just the walk engine by 4Sword).
   * Shooting the arrow.

So down to the engine. I hope I did a nice job on it, I would really appreciate some comments on it.

For the projectile part I had two options for dealing with it. Option 1 is to let objLink keep track of all the arrows shot. Drawing them and dealing with the events entailing of the arrows hitting something. This one gave me major headaches and wasn't chosen. The second option is to make a new Arrow object and let it deal with its own problems and events. This has more overhead but is a whole lot easier to program. So I ran with this option. If anyone thinks this is a mistake and knows how to implement option one, please let me know or implement it yourself. Any input is greatly appreciated.

Well, like I said earlier there aren't really any spritesheets for items, so I had to do with what I got. But I noticed in the Minish Cap, that once the arrow hit something it would waggle a bit. I don't know if this is done through animation or that the arrow is simply rotated. I used the rotation option, purely because I couldn't find any animation. But this part could use some tweaking.

I really appreciate comments, so please leave some.

Update: 09/09/2009
Corrected the error in the assumption made towards ice movement.
« Last Edit: September 09, 2009, 08:38:52 pm by Niek »
Logged
Re: Bow & Arrow
« Reply #1 on: September 08, 2009, 10:21:39 am »
  • *
  • Reputation: +9/-0
  • Offline Offline
  • Gender: Male
  • Posts: 3725
Okay, a small update on the part of the Bow and Arrow. See first post for the gmk.

- Tweaked the creation of the arrows. It is now moved to the End Step event, because it takes place somewhat during the bow release state.
- Added the animation and projectile for the Light Arrow.
- Used my own ripped sprites for the regular bow & arrow and the light bow & arrow.
- Updated the Link sprites for the Bow, pitfall and rolling with my own ripped sprites found here: http://www.zfgc.com/forum/index.php?topic=34950.0.

I'm still working on the charge effect of the Light Arrow. I'm thinking about using a charge timer for the game logic and when the timer is above a certain threshold the Light Arrow is charged. The charge timer is later also useful for the sword and gust jar.

Animating the charge effect is something different. I just can't seem to find the pattern used for the light particle sprites.

Press 'M' to change from the normal arrow to the light arrow.
« Last Edit: September 08, 2009, 10:26:08 am by Niek »
Logged
Re: Bow & Arrow
« Reply #2 on: September 08, 2009, 09:03:25 pm »
  • *
  • Reputation: +2/-0
  • Offline Offline
  • Gender: Male
  • Posts: 1767
I found random pixel in the sprLBowAL and sprLBowAR animations in the second frame (see attachment). And something about the ice movement while having an arrow ready just doesn't seem right. It seems a bit too easy to control and prevent yourself from falling into pits. Thought that might be some useful information.
Logged
  • https://colbydude.com
Re: Bow & Arrow
« Reply #3 on: September 08, 2009, 10:38:52 pm »
  • *
  • Reputation: +9/-0
  • Offline Offline
  • Gender: Male
  • Posts: 3725
Thanks for noticing. I fixed it. It isn't a random pixel, it actually is a pixel from the next frame.
Logged
Re: Bow & Arrow
« Reply #4 on: September 08, 2009, 10:51:39 pm »
  • *
  • Reputation: +3/-0
  • Offline Offline
  • Gender: Male
  • Posts: 3374
I also don't think the animation for readying the bow is quick enough.
Logged
Quote from: Jason
Your community is a bunch of stuck up turds.

Mamoruanime

@Mamoruanime
Re: Bow & Arrow
« Reply #5 on: September 08, 2009, 11:58:33 pm »
  • ^Not actually me.
  • *
  • Reputation: +9/-0
  • Offline Offline
  • Gender: Male
  • Posts: 9786
I like it- Feels very true to MC so far. Only thing that bugs me is (as mentioned before) the hole dynamics. Other than that, grade A stuff.
Logged
Re: Bow & Arrow
« Reply #6 on: September 09, 2009, 08:36:38 pm »
  • *
  • Reputation: +9/-0
  • Offline Offline
  • Gender: Male
  • Posts: 3725
I also don't think the animation for readying the bow is quick enough.

Checked this in VBA and it takes 6 frames between Link's animation frames. I have the image_speed set to 0.25, which makes it 4 frames between animation frames. I made it 4 frames, because I thought 6 was to slow. If you have any pointers has how I can translate frames from VBA to this engine, I would appreciate them.

I like it- Feels very true to MC so far. Only thing that bugs me is (as mentioned before) the hole dynamics. Other than that, grade A stuff.

Dynamics? Could you elaborate a bit more on this?


Okay, another small update. It seems I made a small mistake. The maximum movement speed when holding the bow is about half the maximum speed of normal walking. On ice however this isn't so. Both maximum speeds are equal. I have corrected this.

Still busy on working out the particle pattern of the charge effect.



A bit beside the engine, but does anyone know how to define constants for just a single type of object. And not using the global constants of Game Maker.
« Last Edit: September 09, 2009, 08:58:03 pm by Niek »
Logged
Re: Bow & Arrow
« Reply #7 on: September 10, 2009, 05:55:02 am »
  • *
  • Reputation: +8/-0
  • Offline Offline
  • Gender: Male
  • Posts: 6604
About the light arrow stuff, as long as it doesn't get into using Game Maker Pro features. Some users don't have that, and having the engine as equally accessible to all users increases its benefits. That is not to say that Pro code has no use with this, it does in later optimization stuff for a final version.

About defining constants for one object. Essentially you can just have variables in the object defined in the creation code; this being like C++ except that you can't make those variables const, and that these variables can thus be changed. I'd think though that a game centered around what Link does is ultimately going to get to a point where some of his variables are global or can be created as global constants though.
Logged
Re: Bow & Arrow
« Reply #8 on: September 10, 2009, 07:23:42 am »
  • *
  • Reputation: +9/-0
  • Offline Offline
  • Gender: Male
  • Posts: 3725
About the light arrow stuff, as long as it doesn't get into using Game Maker Pro features. Some users don't have that, and having the engine as equally accessible to all users increases its benefits. That is not to say that Pro code has no use with this, it does in later optimization stuff for a final version.
Don't worry I'm not going to do that. Besides, my skills in GML aren't that good either, that I can pull of a nice looking effect. No I have a bunch of sprites of those said particles. And most of them look alike. And I was planning on just moving the x,y offset from Link's position and draw them there. The position is that they move along the arrow at a bit of a random pattern and the animation of the particles are also unknown as when to grow and shrink and turn and twist and....... I think you get the point. One thing I figured is that the blue particle briefly appears at the point of being charged, and the yellow turns into into the spherical particle (That would make this two things).

About defining constants for one object. Essentially you can just have variables in the object defined in the creation code; this being like C++ except that you can't make those variables const, and that these variables can thus be changed. I'd think though that a game centered around what Link does is ultimately going to get to a point where some of his variables are global or can be created as global constants though.
I thought an answer like that would come. Ah well, if one is carefull in programming it shouldn't be to bad. But it is not so efficient in memory management. But you're right about that some of the constants can be global. This requires some more thought.
Logged
Pages: [1]   Go Up

 


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



Page created in 0.234 seconds with 53 queries.

anything