ome6a1717's Recent Forum Activity

  • I'm sure this has been asked before, but I have 2 obvious questions:

    1. When you look at every game, there is an options to change the resolution. What exactly is this doing to the images? Is it shrinking the actual rendered image size, or just changing the size of the sprites?

    2. Is it possible to implement something like this into construct 2? I feel if someone is playing a C2 game on a 11" screen, and the game was made at 1080p, it's rendering everything so much harder due to the fact that everything is being rendered at the same size.

    I would imagine you could do it by changing the canvas size, but that would obviously change the gameplay experience for every player (which should not be the case)

  • Cipriux - thanks for taking the time to look at it. Would using the timer behavior be easier and have the same result?

  • Just for this instance, try creating a global variable called "MusicPlaying" and set that to 0. Then on the start of layout, enter a subcondition "if MusicPlaying = 0", play music. Else "if MusicPlaying = 1" put nothing. This should prevent it from starting again.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Cipriux - it's happening every tick. Dash is being set to 0.35 (because it should only last 0.35 seconds)

    Here's a clean capx - click new game and then use right click to slide and jump right click to do the air dash to see what I'm talking about. Ideally I want to player to move this distance and then get pushed a bit in the direction he dashed.

    https://dl.dropboxusercontent.com/u/28104568/v2.01%20CLEAN.capx

    The code is in Movement > Air Dash (and Slide is doing something similar, but it would be easier to just look at air dash)

  • Cipriux - okay I think understand this. Then answer me this, if dt is frame independent as well, then why, using this code, is the player moving much further at a lower fps (still above 10)?

    <img src="https://dl.dropboxusercontent.com/u/28104568/DashP1.PNG" border="0" /><img src="https://dl.dropboxusercontent.com/u/28104568/DashP2.PNG" border="0" />

    <img src="https://dl.dropboxusercontent.com/u/28104568/DashP3.PNG" border="0" />

  • Maybe build an invisible sprite representing the vector and use that for collision check (like a linear tail)

    Cipriux - this is exactly what I'm doing, and it works brilliantly as long as the frame rate doesn't mess up my instance variables subtracting every 0.1 seconds.

    I think my main issue is more than just figuring that out or why the bullets don't collide at low fps - it's really learning the proper way to program in C2.

    Say I wanted to do this:

    Every 2 seconds, have an enemy choose whether or not he should attack or not (using the choose expression). How would you set the "every 2 seconds" so it's the same at every frame rate & every pc?

  • Cipriux - sorry for my ignorance, but I'm still a bit confused. The thing is, I enable the character to be able to dash through walls. To do this, I have an indicator sprite that basically states "if indicator is not overlapping wall or black space, disable collision and move towards X,Y at 1500*dt". So whats happening is I'm dashing into empty space, but because the distance isn't the same, it overshoots OVER a wall and into a solid.

    I see what you're saying about the instance variable, but I'm also trying to create a "push" at the end of the dash using a platform vector.

    Also, not to open up another issue, but you say that Bullet behavior uses dt for speed, but my bullets when at a low fps go right through solid objects and will only occasionally hit them.

    The way I understand dt is that you use it to make sure the same value of whatever action (rotating, moving, etc.) is always used based on actual time instead of ticks. Is this not the case?

    Again, sorry for the ignorance - I'm a complete noob when it comes to programming, and I'm trying to wrap my head around it.

  • - forgot to add this!

  • So I should just add every tick?

  • I've been working on a game for a while, and I'm starting to run into issues with slower performance machines.

    I've been trying to use DT everywhere I could, but I believe I may have been programming incorrectly, and I wanted to see what the best approach would be.

    Normally what I would do is set an instance variable (#) on an object. I would then set "if instance variable > 0, every 0.1 second, subtract 1 from instance variable". Then, whatever I wanted the sprite to do; attack, jump, etc. I would go "if instance variable = 0", do this and set instance variable to 10.

    Now, of course this works on probably all machines. But I'm using this for everything, and I'm afraid it's not a good way to do it. For instance, I have an air dash in my game that sets an instance variable to 4, and subtracts every 0.1 seconds moving 1500*dt pixels every tick. However, the end location doesn't match up when the fps is low (<25), and I can sometimes dash through walls, which is unintended.

    I've tried adding dt to the variable and setting when the variable > or equal to X (usually the number of seconds I want it to last), set back to 0, but it still doesn't have the same result everytime.

    I'm using this to change enemy attacks, as timers for reloading, damage timers, etc.

    So my questions is this: What am I doing wrong, and what should I be doing instead?

  • Is there a way to prevent collision from not working properly with bullets and other movable objects at low fps (~20-30)?

    When I shoot a bullet 60 fps, it always hits the target, but if the fps is low, it just passes right through.

  • - I'm already using something exactly like this on another layer in my game (and it works fine), and I've looked over this and the blend examples over and over. For some reason when I try to use Destination Out on this particular layer (2nd from the bottom; no blend effects), the destination out is always black.

    I might note that the background layer (bottom) is a 0,0 parallax 1920 x 1080 image - could this be why it's not working?

ome6a1717's avatar

ome6a1717

Member since 12 Feb, 2013

Twitter
ome6a1717 has 3 followers

Trophy Case

  • 11-Year Club
  • RTFM Read the fabulous manual
  • Email Verified

Progress

13/44
How to earn trophies