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: Link Dryland and Ice Rolling  (Read 4320 times)

0 Members and 1 Guest are viewing this topic.
Link Dryland and Ice Rolling
« on: September 12, 2009, 12:05:21 am »
  • *
  • Reputation: +8/-0
  • Offline Offline
  • Gender: Male
  • Posts: 6604
http://www.zfgc.com/index.php#?action=games&sa=view&id=128



To download it, navigate to the Downloads section of the site page and select the newest download. As mentioned there, I took some of Niek's code out so that I could more easily work with what I was implementing - some of what he has been implementing might also work better in the way my code is structured. Conversely, some of what I coded may work better in his, but gah I am at college and I get distracted so easily and have many difficult burdens.

Anyway, about the rolling, it's pretty straightforward. I removed the ice-check for if you weren't on ice previously because I just don't see it at normal speeds. Otherwise, there might be some issues down the road with Pegasus boots, but that shouldn't be too much of a hassle then. I think that I got the rolling as close as possible.

Thoughts?
Logged
Re: Link Dryland and Ice Rolling
« Reply #1 on: September 12, 2009, 03:11:55 pm »
  • *
  • Reputation: +9/-0
  • Offline Offline
  • Gender: Male
  • Posts: 3725
Well, it still lacks the sound effect of rolling and there are no dust clouds. For the rest it seems to look good, although I'm not to certain about the ice rolling.

The rest of my remarks I PM'ed you. Keep up the good work.
Logged

ZFG

Re: Link Dryland and Ice Rolling
« Reply #2 on: September 12, 2009, 06:50:54 pm »
  • ⌘⌥⌫↵⏏⌃
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Posts: 39
I must say, this is pretty close to Minish Cap. I hope to see more of this:


Yes, it works on Mac OS X without bugs. :D
Logged
Re: Link Dryland and Ice Rolling
« Reply #3 on: September 14, 2009, 07:33:03 am »
  • *
  • Reputation: +8/-0
  • Offline Offline
  • Gender: Male
  • Posts: 6604
I should also say that I'll be tweaking this over this week; i.e. just seeing if I can get the code better, more accurate, and adding features of Niek back into this. In addition, the updated file will contain commented code. But yeah, if there are any questions about what I was doing in my code feel free to ask.

I can't make any promises in regards to when this code will be complete, as I am a little busy this week with school though.
Logged
Re: Link Dryland and Ice Rolling
« Reply #4 on: September 14, 2009, 07:45:04 am »
  • *
  • Reputation: +4/-0
  • Offline Offline
  • Gender: Male
  • Posts: 207
I found a glitch. When you try to cut the corner of the ledge(the arrow thing), you get stuck(check image below) its only at these two places that it happens so it must have something to do with having the two ledges too close to each other.
oh and another thing, when you walk along a wall object and press into it as you are walking forward, it slows you down. i dont know about MC but in ALTTP you dont slow down. i dont know why but that really bothers me lol
other than those two things, its awesome!


« Last Edit: September 14, 2009, 09:06:57 am by Skeme KOS »
Logged
Re: Link Dryland and Ice Rolling
« Reply #5 on: September 14, 2009, 07:49:55 am »
  • *
  • Reputation: +4/-0
  • Offline Offline
  • Gender: Male
  • Posts: 207
I should also say that I'll be tweaking this over this week; i.e. just seeing if I can get the code better, more accurate, and adding features of Niek back into this. In addition, the updated file will contain commented code. But yeah, if there are any questions about what I was doing in my code feel free to ask.

I can't make any promises in regards to when this code will be complete, as I am a little busy this week with school though.

great, looking forward to checking it out. do you think you will be able to fix those glitches?(particularly the slowing down thing) if you need any help with sprites, just ask. ive never messed around with minish cap sprites before but that shouldnt be a problem. just let me know.
Logged
Re: Link Dryland and Ice Rolling
« Reply #6 on: September 14, 2009, 08:18:33 am »
  • *
  • Reputation: +8/-0
  • Offline Offline
  • Gender: Male
  • Posts: 6604
The issues with ledge jumping will likely get worked out when the state system is better implemented. In an earlier version of Niek's ledge jumping, the movement was done by altering the x and y variables directly. In more recent versions, this is replaced by how having the state of ledge jumping give the movement code loops in the step event a constant value; i.e. rather than having its movement code independent to its state, its state feeds the general movement code of the entire Link object.

In other words (this isn't the code in the engine, just an example):
Instead of:
Code: [Select]
if (state == "ledgejump"){
  switch (direction){
    case 180: x -= maxi_x; break
    ...
}
}

the movement code would have conditions for able_x and able_y which are for the ability to move in the x and y. There'd be a condition in the general movement code block which checks if you're able_x/able_y is true or not and if it's not:
Code: [Select]
if (!able_x){
      move_x = ((direction == 0) - (direction == 180)) * 4.5;
}
if (!able_y){
      move_y = ((direction == 270) - (direction == 90)) * 4.5;
}

the two code examples shown do similar things, but the latter is a part of the general movement code, you are less likely to get stuck in an object; because the corner-cutting is a direct part of the general movement code.

Edit: actually in the more recent of Niek's engines, the issue might be that some of the ledge stuff is done during the end step although I am not too sure. It is like 3:22 AM right now.
« Last Edit: September 14, 2009, 08:21:40 am by 4Sword »
Logged
Re: Link Dryland and Ice Rolling
« Reply #7 on: September 14, 2009, 09:03:10 am »
  • *
  • Reputation: +4/-0
  • Offline Offline
  • Gender: Male
  • Posts: 207
little update - the places i showed before arent the only places where the glitch occurs. the image below shows two more places where it happens.




it only occurs if Link touches the 16 x 16 pixel space between the two objects(either ledge or cliff) as he attempts to corner cut and jump the ledge. its kinda hard to explain but i hope you see what i mean and are able to fix it later on.
Logged
Re: Link Dryland and Ice Rolling
« Reply #8 on: September 14, 2009, 09:08:39 am »
  • *
  • Reputation: +8/-0
  • Offline Offline
  • Gender: Male
  • Posts: 6604
Well generally speaking a glitch that is based on the properties of colliding objects isn't going to be restricted to just one location, it can exist wherever there are instances of what is getting collided into. I understand completely what is causing the error, which was what I explained in my last post, and how it'd likely be fixed. Thanks for your help on pointing this out though.
Logged
Re: Link Dryland and Ice Rolling
« Reply #9 on: September 14, 2009, 10:21:22 am »
  • *
  • Reputation: +4/-0
  • Offline Offline
  • Gender: Male
  • Posts: 207
Well generally speaking a glitch that is based on the properties of colliding objects isn't going to be restricted to just one location, it can exist wherever there are instances of what is getting collided into. I understand completely what is causing the error, which was what I explained in my last post, and how it'd likely be fixed. Thanks for your help on pointing this out though.

ah i see. im sorry, i just dont have much knowledge when it comes to programming tight butthole so i wasnt sure if you were saying you knew what was causing the glitch or not in your last post.

Logged
Re: Link Dryland and Ice Rolling
« Reply #10 on: September 14, 2009, 04:12:01 pm »
  • *
  • Reputation: +9/-0
  • Offline Offline
  • Gender: Male
  • Posts: 3725
Well, there was a slight glitch that in the ledge jumping. The ledge jumping started in position of Link where he actually should have continued walking instead of jumping. This happened because I used place_meeting instead of position_meeting. Thus when Link gets stuck on the corner of the solid objects, the code saw a ledge object right in front of Link instead of diagonally beside Link. This issue has now been fixed. Look at http://www.zfgc.com/forum/index.php?topic=34791.0 to find the fixed version.

There still remains the issue of Link not continuing in the corner. First I thought it was the masks of the ledges, but that wasn't the case. So I did some looking around and noticed that the pushtimer did not increase when that happened and Link never went into the ledge jumping state. I did notice that it only happend when Link goes up and down a passage way that is 1 tilesize wide. To rule out either the walking part or the ledge jumping part I created the same situation in the rolling engine (see example.png). It seems that in this engine the same error occurred. And if I have to hazard a guess the fault lies in this piece of code:
Code: [Select]
if (place_meeting(x,y,parSolid)){
      if (!hold_l && !hold_r){
        x += !place_meeting(x + width_f,y,parSolid) - !place_meeting(x - width_f,y,parSolid);
      }
      if (place_meeting(x,y,parSolid)){
        y -= move_v;
      }
}
and more specifically: x += !place_meeting(x + width_f,y,parSolid) - !place_meeting(x - width_f,y,parSolid);
Logged
Re: Link Dryland and Ice Rolling
« Reply #11 on: September 14, 2009, 04:43:06 pm »
  • *
  • Reputation: +8/-0
  • Offline Offline
  • Gender: Male
  • Posts: 6604
Meh, I did what you did Niek and I got an odd result too. I know too why that is doing that; it lies in the value of width_f checking a place that is basically right into the left wall so movement doesn't occur. This can be easily fixed though too.
Logged
Re: Link Dryland and Ice Rolling
« Reply #12 on: September 14, 2009, 09:37:20 pm »
  • *
  • Reputation: +8/-0
  • Offline Offline
  • Gender: Male
  • Posts: 6604
Try replacing:

Code: [Select]
if (place_meeting(x,y,parSolid)){
      if (!hold_l && !hold_r){
        x += !place_meeting(x + width_f,y,parSolid) - !place_meeting(x - width_f,y,parSolid);
      }
      if (place_meeting(x,y,parSolid)){
        y -= move_v;
      }
}

with:
Code: [Select]
    if (place_meeting(x,y,parSolid)){
      if (!hold_l && !hold_r){
        for (cc = 1; cc < width_f; cc += width_f div 2){
          x += !place_meeting(x + cc,y,parSolid) - !place_meeting(x - cc,y,parSolid);
          if (x != xprevious){
            move_f = ROOT_ADD + 1;
            break;
          }
        }
      }
      if (place_meeting(x,y,parSolid)){
        y -= (move_y > 0) - (move_y < 0);
      }
    }
(assumes that in Link's create event you have width_f = sprite_get_width(mask_index) div 2, and that height_f = sprite_get_height(mask_index).)

Because it uses a for loop with function calls in the for loop, it is important not to loop too often. I think the values I used are appropriate enough for any situation. As for why the height_f in the Create Event is not integer divided by 2, I got better results when it wasn't - the height is a skinny thing as it is, half of the height doesn't do much for corner cutting. You can try tweaking the values if you want to.
Logged

Zhello

N.A.D.I.
Re: Link Dryland and Ice Rolling
« Reply #13 on: September 16, 2009, 01:09:48 am »
  • L'homme avec beaucoup de noms.
  • *
  • Reputation: +6/-1
  • Offline Offline
  • Gender: Male
  • Posts: 925
I would love to help but I dont know what you guys need. :-\
Logged
The IT Guy
Intermediate Coder
Linux is a wonderful thing
~Linkwolf48/Gumstone1080~

The Legend of Zelda - New Beginnings

http://zfgc.com/forum/index.php?topic=34986.0
1.6 Demo -
https://www.dropbox.com/s/56km0iadaras56g/LoZNB%20Game%20Folder.rar?dl=0


Side Projects:

Dragon Diary - Cybernetic Threat
Story: http://wiki.zfgc.com/Cybernetic_Threat

Quote
Aero88
ZFGC is like the Hotel California.  You can come in but you can never leave!

devianart: http://linkwolf48.deviantart.com/
Re: Link Dryland and Ice Rolling
« Reply #14 on: September 16, 2009, 04:02:06 am »
  • *
  • Reputation: +8/-0
  • Offline Offline
  • Gender: Male
  • Posts: 6604
Your help does not depend on what we need, but by what you could give. If you are offering help in the form of clusterfuck engine mergers or inaccurate sprites or anything that isn't a genuine and quality attempt made by you, then the help isn't welcome. That sort of assistance won't help you as a developer and it will not help us as we would rather try to work on something than sift out a mess.

Making a good Zelda game or engine is all about getting the little things right, not giving out a large amount of decent or sub-decent features. Many users on this forum and myself do not believe that your coding style reflects this so it would be difficult to work with you. If you want to improve as a developer and have people help you with your developing, you need to appreciate quality a lot more.
Logged
Pages: [1]   Go Up

 


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



Page created in 0.02 seconds with 63 queries.

anything