Solomon's Recent Forum Activity

  • Ok I got it working.

    For anyone that is interested, I created a variable:

    Keyboard_input_toggle = 1

    Nested all the keyboard controls in an IF Keyboard_input_toggle=1.

    Then when I wanted to disable keyboard for certain controls, just created and IF event (something happens) ---> Keyboard_input_toggle = 0

  • R0J0hound

    If that is the case how do I go comparing a value that has *dt to a value that doesn't have *dt?

    For example:

    If Speed>100*dt

    If the variable Speed does not have *dt this comparison will not work properly.

    I think Ill stick to the leaving the dt everywhere, at least for now. We shall see how it goes.

    Do you think this might have a big impact on memory, FPS and performance?

  • I know what you mean about being lost and sidetracked.

    I have been there so many times earlier, starting with game mechanics and then after a while focusing too much on game graphics, ending up mixed up and ditching a project all together.

    What I suggest is to take notes, on the progress regarding code. You can make bullet points and divide bigger objectives in smaller ones.

    Also I would focus on the core mechanics of the game first, put box place holders instead of proper sprites.

    As for the graphics, do some sketches beforehand, nothing really fancy, collect any inspiration that would suit your direction into a folder, and just look at it during quick breaks from coding.

    Once the core mechanics are down, then start to dabble with the graphics.

    As for sound, I would really focus on that at the very end, unless your game mechanic is a unique and different one.

    I find choosing sounds and music comes more naturally when I load up my game, play a sound in the background and just test play.

    Working on everything without a plan, can overwhelm a person. Perhaps you could make yourself a timetable, when to work on code and when to work on graphics or even sound.

    That being said and taking into consideration that different people have different workflows, this is just some info I gathered from my experience and I hope that answers your question at least somewhat.

  • Hi is it possible to disable keyboard input in an "IF" or an "OR" statement/event?

    I can't seem to figure this one out.

    I'm not using behaviors, so I would want to do this straight in the event sheet.

    Also is it possible to lock one key once the other key is pressed? For example if arrow down is being held, pressing arrow up simultaneously won't do anything.

    At the moment pressing 2 keys together messes up my values.

    Thanks a bunch as always!

    EDIT: Im starting to think its not possible to entirely disable someones input in order not to leave the user "hanging" and unable to do anything on their computer, including closing the game.

    I'm assuming that this game was created in Construct 2?

    If so, nice!

    Do you have a dev blog by any chance?

    Ps. Link didn't show up because of needed missing rep in your profile.

  • My RPG have 50 000 x 50 000 and i have 1600 sprites, PC can handle that

    Whew, nice to know!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • One more question. Is it possible that Im getting a laggy movement because of all the "*dt" in the equations?

    I have an equation: speed1+speed2+(12*60)*dt

    Variable values: speed1 = 20*60*dt

    speed2 = 10*60*dt

    So in the end it turns out to be: (20*60*[dt])+(10*60*[dt])+(12*60)*[dt]

    (I put the dt in brackets for a clearer read).

    Now as you see I have a hell lot of "*dt", and I'm getting somewhat laggy movement, but I not sure if its my browser (as I was getting lags before, as I did post some earlier threads, but I don't mean to derail this thread).

    I'm going to have to test it on another computer I suppose to make sure.

    Whats your take on it? Am I using the dt correctly in this situation? Or should there be only 1 "dt" in the final equation?

    Thanks once again for the help.

  • R0J0hound

    Phew, it finally worked. Been messing with all sorts of values for the last 3.5 hours with breaks, but finally got some values that did it. At first I wasn't sure what was wrong, the problem being as it turned out I was entering values that were too small considering the*dt factor.

    Cant get used to it so far but I surely will with time. My values are all over the place unfortunately. Need to rework some events.

    So basically I am using the *dt values everywhere now, but isn't there a simpler way just to enter that once at the beginning, the dt conversion and then use it once?

    If its not simpler then no worries, this is good anyhow, just glad that the code is running so far!

    Thanks again!

  • I created a sprite sensor and have pinned it to an object, lets call it "Object A".

    While the sensor is overlapping with another sprite, I want the "Object A" to decelerate from its current motion into a full stop.

    At the moment it is abruptly stopping, and I cant seem to make good use of lerp.

    Is there anyway that I can decelerate to a full stop, or smoothly ease into a full stop, from its current speed? Any ideas?

    Is it possible to check the speed of a sprite without behaviors, only in event sheet?

    Thanks.

  • R0J0hound - thanks for the pointers, yep that works.

    For anyone who is interested more in this subject I am linking to the appropriate tutorial:

    https://www.scirra.com/tutorials/67/del ... dependence

  • Hi I was wondering if its alright to use the: Every tick| Set X to Self.X + 1, to mimic movement? Will it play smoothly when running (it seems smooth just wondering)? If not is there another way to use events to code manually the custom movement or bullet behaviors so that they play smoothly?

    I find the movement behavior quite limiting in what I am trying to achieve.

    Another question, how is it possible for me to speed up a movement without making it look stepped? I.E. I would like an item to move at a pace of 5 pixels per tick, so I used: Set X to Self.X + 5

    But now the movement is quite jittery. Is this where delta time comes in? I did some reading and will do some more, just making sure, thanks.

  • Ok great it worked without the custom movement behavior thanks!

Solomon's avatar

Solomon

Member since 22 Aug, 2015

None one is following Solomon yet!

Trophy Case

  • 9-Year Club
  • Email Verified

Progress

10/44
How to earn trophies