Tylermon's Forum Posts

  • Poking around, it looks like construct 2 uses

    requestAnimationFrame

    and

    setTimeout

    Like Dalal said, this causes problems. Browsers can do only one thing at a time, and with javascript this eventually leads to this stuttering.

    The solution? As far as I can tell is to use CSS for animations.

    found this example online.

    http://www.html5rocks.com/en/tutorials/ ... e-raf.html (The way it looks like Construct 2 animates using requestAnimationFrame)

    http://www.html5rocks.com/en/tutorials/ ... imple.html (The same animation using css)

    Edit:

    Also reading about GSAP

    http://greensock.com/gsap

    Looks fairly promising.

    As for if this necessarily will help with smooth animations I cant say. I feel a square box is rather different than an animated character/object changing frames.

    Part of the issue also falls to device vertical sync and fps. I took the example from page 1, changed speed to always match fps. And obviously there was 0 jittering.

    The problem is it moved slower than I like.

    There could be an internal issue within construct and how it draws frames, because it does not match the refresh rate. (Everything takes place logically as if 60fps I believe?)

    Digging around, it looked like this is due to that setTimeout code I was talking about. It looks like it is set to 16ms (60fps) which obviously is bad. Static frame rate/refresh/logic has these issues. A dynamic system would always look smooth. Able to adjust with fps drops and rises.

    I could be wrong about how construct is animating things. But It would probably be better if it animated based on dt rather than using the timeout.

    The people with high refresh devices don't see nearly as much jitter because they refresh so fast it compensates for any fps variance.

    Ahhhhh screw it. Everything I know and keep reading about game/film/web animation and why it looks "jerky/jittery" all comes back to interpolation. If you interpolate between delta time and desired speed things should look smooth(er). I think the issue comes from while speed might be interpolated etc, the animation frames themselves are not. The draw calls themselves should interpolate what we see, I don't think it does.

  • Actually, lerping the positions graphically would not help that much, as the lerping would jitter as well, and would be an insane amount of work just to work around bugs that will be fixed eventually (#reallife, you cannot rely on hack tricks, bugs must be fixed, as doing hacks tricks is the worst you could do actually for anyone involved).

    Same for the loader, it will make the player wait an empirical amount of time, when this jitter will be fixed, it will be there, making people wait for no reason (well, I guess the jit compilation would benefit from that even later so it is not that problematic if done well.)

    How would keeping not help? Wouldn't it smooth the movement so to speak?

    As for loading, I was under the impression many people see the most littering at a layout change or project start. A load/pause would allow all resources to fully load hopefully reducing jitter.

    But I agree completely. Movement and animations should looks smooth without having to find ways to "fix" it.

    But I wonder what might be broken. I know personally I don't have any perceivable jitter. I also have a rather powerful computer CPU and gpu wise....which doesn't help with trying to find performance or visual stuttering haha.

  • Sorry for the double post. Editing is not very reasonable on my phone right now.

    But I forgot to mention for start up jerkiness people should have a loading screen/pause a layout momentarily on start up/ layout change.

  • So you're suggesting I record the positions of my objects during a sample bit of gameplay, then re-animate them using that database? That's a really clever idea. The problem in my use case is the sheer number of objects (around 1000-2000 onscreen) I'd need to track...logging all that data would be bound to induce some slowdown.

    BTW, I tested your link, and I saw much what I expected: after a breif 'settling down' period, IE produced the smoothest result...virtually no jank. Chrome had a much lower cpu usage than IE, but it's jank did not 'settle down' after awhile. Firefox, needless to say, janked the worst.

    ....third time writing this. My power, Internet, and cable are out. And my phone is being special....

    Because my power is out, the server went down. Meaning you probably were hosting the game for yourself and would need a second browser tab to see the movement I was trying to describe.

    I do have an idea. I noticed people on 120hz+ seem to have little to no issues.

    60hz should still look smooth though.

    So I thought, maybe the game logic is running faster than the rendered frames! For instance, the game is changing an objects position logically like 90 times a second....but visually a solid 60. This would have what should be smooth movement look jittery.

    Same if the internal side of things runs slower,

    Maybe a way d time or something works?

    I could be way off. But hopefully that makes sense and maybe inspires new ideas.

    I think that would explain why the high refresh monitors also look much smoother. Aside from the benifits of higher refresh of course.

  • Personally working on a multiplayer project. I had about 70 events. Now I am in the 50's

    Really trying to focus on optimizing and streamlining what I have. Keeping server and client code clean. And minimal.

    It has been challenging keeping track of what the server should do, and what the players should do. Especially as I begin adding more complex features.

    Still looks messy and I want to get things more concise before I move forward. If not for performance, then for my own sanity haha.

  • You could always lerp the image locations with the actual logical locations.

    Visuals only need to be close enough to actual locations to be believing.

    This also gives you fine control over the logic, while maintaining fine control over visuals as well.

    Personally I am working on a multiplayer project, I get a constant 120fps even with many connections. And things looks smooth for every player.

    I guess my heads been in keep visuals and logic separate and out of player control for security and best gameplay reasons. And this way of thinking to keep everything separate has been working nicely.

    If people want to give things a try, the project reports cpu load as well as frame rate.

    Would help seeing which people still get choppy visuals...and I can test my project at the same time haha.

    https://dl.dropboxusercontent.com/u/583 ... index.html

    Not sure how dropbox will handle a multiplayer server....but here is a try <img src="{SMILIES_PATH}/icon_razz.gif" alt=":P" title="Razz">

    As a reference. On dropbox I am getting 120fps and 0.04 cpu usage. Looks smooth.

    Also, people testing games...keep the game on your primary monitor. I found that multiple monitors...with browsers for some reason perform rather crappy if not on monitor 1.

  • title isnt a lie. there is a free gtx 970.

    Im not forcing any1 to have a go at winning.

    Sorry if a few people were confused.

    I did say :

    "Great card. And if you win, free is a really great price haha."

    I think by now we all should know everything has a price in some way shape or form.

  • Title says it all.

    Probably one of the best cards on the market right now. Currently zotac is giving away their newest overclocked edition for free.

    All you do is like a facebook page/follow their twitter.

    http://splur.gy/r/vd8n3/r/2Qx5DCR48dV

    Great card. And if you win, free is a really great price haha.

  • you could possibly lerp it also. This would help start and end camera motion in a smoother manner.

  • I'm a musician (Cubase user)... among other things. ^_^

    It is correct that most sound cards doesn't handle several sources well; especially integrated solutions, but that shouldn't be an issue here, as the browser should be considered 1 source.

    What I don't get is; your game is hosted on a server, but I'd think the game is executed client-side, while the server just delivers the play-files? I mean - your sound card on the server (and the graphics card) should be under 0% load each, while your hard drive and probably also the CPU, will be utilized some, to keep everyone in sync etc...

    I don't know any game where the server plays the sound, then sends the wave audio to the player's PC... o_O

    Each client can and do play their own sound.

    Originally, the server/client was going to be one and the same. So that friends can host and play together easily. After a few limitations I ran into, as well as design changes, I expanded on the idea to allow a dedicated server to run in a shard-like manner.

    All being the same client/server.

    It looks like im going to scratch that and simply keep things under my control, hosting multiple servers if needed. The shard method looks like the best way to divide resources and keep server performance at a maximum. At least for the larger servers.

    My game is a small-scale mmo In a way because my world is planned to scale nicely for small groups, and large groups of players. So far things are open world with portals between world areas(server shards)

    I might come back later to optimize the local server/client to only allow small groups of players. But for now, large scale is my first and primary focus.

  • Sometimes there are no enemies.

    I didnt even know there WERE enemies before some1 mentioned killing them was hard.

    After a few refreshes I finally was able to get enemies to spawn.

  • Looks good, but unplayable for myself. scrolling/panning the screen is WAY too fast. very jerky and hard to move about the screen/map.

  • Boats are the ONLY way to win haha.

    Looks really good so far.

  • I guess my concern is: I'm not actually loading, playing, or using any sound at all in my server.

    If no sound is being loaded, played or otherwise used. Why does it need to take up one of those "sources" as you say. I'm not a sound expert by any means. But I feel like this might be construct reserving or using audio when not necessary.

    My plan is to host multiple shards. Have instances of the server running for different regions of my game.

    but now it seems this might not be possible to do this or at the very least create some big limitations down the road.

    A possible solution is to have a different project for the server. And not have a sound object at all. But this complicates things for end users.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • The thing is, it says 6 but I had like 12 tabs open. And no audio was playing.

    The audio object was not even in use.

    With zero sound playing it makes me feel like it is a construct 2 issue.

    My drivers are up to date.

    Using built in audio on my p9x79 pro motherboard.

    This shouldn't be an issue for any end user. But the server side of things means there could be limitations on how many instances/rooms/ map regions are hosted.