Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

 
Advanced search

1380220 Posts in 65799 Topics- by 58188 Members - Latest Member: gdeavid

August 05, 2020, 08:49:21 AM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsCommunityDevLogsRise of Lazarus
Pages: 1 ... 3 4 [5]
Print
Author Topic: Rise of Lazarus  (Read 10631 times)
Ramos
Level 2
**



View Profile WWW
« Reply #80 on: May 19, 2020, 05:02:49 PM »

watch out, hp loss may make game to hard yes but stunning player can make is frustrating, make sure you give game to beta testers for feedback
Logged

andyfromiowa
Level 1
*



View Profile
« Reply #81 on: May 19, 2020, 05:31:59 PM »

watch out, hp loss may make game to hard yes but stunning player can make is frustrating, make sure you give game to beta testers for feedback

That's a good point. I definitely want to keep it an uncommon occurrence, and I may keep it out of boss fights for that reason. That's a good idea to test and get feedback. How I decide is "enough" might not line up with others' ideas.
Logged

andyfromiowa
Level 1
*



View Profile
« Reply #82 on: May 30, 2020, 06:36:11 PM »

Today, I managed to fix an audio issue that I haven't been able to wrap my head around. Sorry – this sort of post doesn't really offer much eye candy for a devlog...

I wanted to trigger the dragon's wing sound just on certain frames. So, there's an audible gush of air when the wings “flap.” I was able to do this fine when the dragon's image_speed was 1. But in Game Maker, with room speeds of 60, that ends up being a crazy fast animation.

So, if I wanted to set the image_speed to 0.1, which visually looks appropriate at that room speed, it ends up creating odd decimal values throughout the image_index. So, triggering an animation at a precise subimage becomes mathematically complicated. If you're more savvy than I was, you might already know the solution. But it took me a while to arrive at it. At one point, I had the precise decimal image_index flying across the screen where the dragon used to be. I was thinking I needed to hit these exact values in the code, but it never worked - and it was the wrong solution.

In case someone else has this problem in the future and stumbles across this, here's what I was trying to do initially:

Code: (Initial Version)
if (image_index) = 4
{
audio_play_sound(wing_sound,1,false);
}

That code works great with an image_speed or 1, but it's not reliable for any other value. The simple fix is to use Game Maker's floor or round functions to get rid of the decimal values introduced at other speeds. Here's the easy solution:

Code: (Working Version)
if floor(image_index) = 4
{
audio_play_sound(wing_sound,1,false);
}


You can't hear it in this screen (or my celebration when it finally worked) but it feels good to finally solve this pesky problem. For whatever reason, this issue was particularly hard for me to wrap my head around - probably because I couldn't visualize it. It feels good to finally put it to rest.
Logged

Pages: 1 ... 3 4 [5]
Print
Jump to:  

Theme orange-lt created by panic