Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - hankster112

Pages: 1 2
1
Ask a Question / Re: Region does not reliably trigger events
« on: January 21, 2022, 08:10:28 am »
Yes, they cover the whole area. It seems to be a problem with how they behave depending on the player's movement. If I walk right into them after the scene loads without jumping, it works fine. However, if I jump at all they it never detects. Since this region is over a drop-down area the player has to jump into it, so it never loads.

2
Ask a Question / Region does not reliably trigger events
« on: January 16, 2022, 10:13:22 am »
I have several regions that I use as level triggers. When the player enters them it transitions to whatever level that region is tied to. I have several dozen of these throughout my game and they all work fine except for one. More often than not the player will clip right through it and fall out of the level without anything else happening. Sometimes the player can trigger it, sometimes they can't. It seems to be an issue with how often the regions check for activity and another thread suggested using actors instead, however that seems like a hacky trick that I want to avoid. What are some possible reasons for why it would do this?
All the level transitions are made verbatim like the attached image, with the only differences being the scene loaded and where it spawns the next player.

If the player simply walks into a region it triggers, however if they're are jumping or otherwise not on the ground then it won't. What causes this?

3
Ask a Question / Re: Slope issues
« on: January 15, 2022, 06:59:15 am »
Figured out this issue, I was completely overthinking it. There's a block that lets you set the actor's velocity to a specific degree and speed. Put that in and set the degrees to the same angle as the slope, set the speed, and it glides along angles now without issue.

4
Ask a Question / Slope issues
« on: November 21, 2021, 04:43:47 pm »
Continuing from https://community.stencyl.com/index.php/topic,61751.msg317666.html since it got buried.
I've figured out movement a bit better, but I still have two major issues. When traveling down a slope, the player will constantly go on/off the slope, which I assume is due to the X movement carrying the player into the air by made 1-2 pixels only to have gravity bring them back down onto the slope, repeated ad infinitum.
The other issue is that when the player reaches the top of the slope, they do a small hop before returning to normal movement. What are some ways I could go about fixing this?

5
Ask a Question / Re: Video files as a background
« on: November 11, 2021, 08:28:14 am »
The issue is I'd want it to scale well on all resolutions (so having several sets of images at 1080p, 1440p, 4K, etc.) and at a good framerate (60 as a minimum, 144-240 if I really want to go insane) but that would have huge performance hits as separate images.
That link might go somewhere but the repo it refers to hasn't been updated in 7-8 years, but it's better than nothing I guess.

6
Ask a Question / Video files as a background
« on: November 09, 2021, 06:00:16 pm »
Basically what the title says, would it would be possible to import a video file (MP4, MKV, etc.) as a background, including maintaining a parallax effect and possibly changing its resolution? I'm still working out many ideas in my head and this one seemed interesting. The few threads I've seen on it recommend exporting the video as individual frames, however that seems like a waste of performance and I wanted to check if there was a better way of doing so.

7
Ask a Question / Re: Normalizing movement on slopes
« on: November 09, 2021, 05:50:19 pm »
I've simplified my ground check like you posted and worked out most of the kinks, however I'm still having some issues. The player still comes to a stop at a 45 degree slope and traveling down a 30 degree slope causes the ground check to rapidly switch between true/false.

Edit: Messed around with friction and speed a bit more and I'm figuring out how to use tile data to change movement speed. However now whenever the player goes up a slope and reaches the top, they do a small hop. How would I mitigate this?

8
Ask a Question / Re: Normalizing movement on slopes
« on: October 27, 2021, 03:33:26 pm »
The ground check system I have checks for:
  • Player's y-speed is 0
  • Player is not actively jumping
  • Player is not grabbing onto a ledge
If any of these conditions are not met, it sets PlayerOnGround to false. Should I be checking for anything else?

9
Ask a Question / Normalizing movement on slopes
« on: October 26, 2021, 06:47:48 pm »
I've developed a movement system for a 2D Metroidvania that up until now has worked fairly well. However I was only testing it on flat surfaces, and now that I have remembered that sloped tiles exist it's thrown everything out of whack. When trying to walk up a slope, the player's movement is reduced to a crawl and they will slide back down if the button is released. The movement system in this game was built from the ground up (no extensions/starter packs) and probably has a lot of inherent flaws that need to be worked out. Would anyone be able to give me some pointers in the right direction? I can post specific segments/explain other parts if needed.

10
The hitbox for that animation ended up being one pixel too tall and that was somehow throwing the engine completely off. Computers are weird. Thank you!

11
Normally, the hitbox around the player characters stays just that, around the player in a single box. However, when switching to certain animations (specifically when jumping and aiming to the left), the hitbox is placed at a fixed location away from the player (attached image). Any ideas what could be causing this?

12
Ask a Question / Re: Raycasting Help
« on: January 30, 2021, 09:32:54 am »
It has something to do with checking that item 1 in the list is a member of the tiles group. It runs fine without it, albeit still incorrectly (it's draws a small dot that's completely off on the player's position).

13
Ask a Question / Re: Raycasting Help
« on: January 28, 2021, 07:59:32 pm »
The major difference between your code and mine is that your raycast is based off a static entity, whereas mine is being done from a constantly moving one, the player. The static values you have set for x2 and y2 don't work in my case. Trying to run what I believe is the corrected variation of your code crashes instantly.
To elaborate what I am trying to do, I need the game to constantly be checking where the player is pointing and marking the x and y coordinates of the first object in the player's line of sight, be it tiles or actors. As another side note, I am having issues trying to figure out the coordinates that should be entered if the player is looking at a 45 degree angle, as the x and y location of the line would be different from a simple check of the scene's height/width. If that's too much of an issue for this thread I'll make a separate one for it.

14
Ask a Question / Re: Raycasting Help
« on: January 27, 2021, 04:19:33 pm »
I'll bump this thread one last time, I'm not finding any solutions and the answers provided by merrak did not solve the issue.

15
Ask a Question / Re: Raycasting Help
« on: January 18, 2021, 04:16:22 pm »
I could still use some help on this, I'm completely lost.

Pages: 1 2