Thndr's Forum Posts

  • I tried to put what I learned since this post to create this, but I could not.

    What' I'm trying to do is whenever the player moves over 8 pixels floor(scrollx/8) that it destroys the tileset objects outside of a preset range. The tiles are 8x8 large

    array_scrollx=floor(scrollx/8)

    boundry_scrollx=12

    and I've made some events that may reflect that.

    <img src="http://i.imgur.com/1GzFGrD.png" border="0" />

    Only problem is that it seems to generate duplicate tiles, and not properly delete them, along with taking too long to calculate everything.

    At the moment I have 683 objects total spawned on my layout, and it's a medium sized layout. I expect to reach 1000+ on a real level and I am worried if that might affect gameplay. In the spirit of optimizing what the game does, I want to see if there is a way to only create/use the tiles within a boundry (+/- 12) on the tilemap array efficiently. There has to be a way

  • If you don't want letterboxing, you can just use fullscreen scale, and base it on how you want to judge how much is shown. It automatically scales up until the viewport's larger dimension is the edge.

    I would recommend a minimum for X and Y. You can set things at certain Window Width X's for GUI to give it a bigger screen.

  • Yeah, just going to go with larger objects. Doesn't really do much but clutter up the layout screen. Pretty easy to manage how much text it shows with the inherent properties.

    By 1 pixel border, do you mean if I have 8x8 tiles, try to have the letters be mostly 7x7 to have 1 px of vertical and horizontal? If so I already have that done.

  • Tried out this plugin, like what it does except one minor thing.

    My project ( googledrive.com/host/0B7mHJO1CK--NN1hxV2IxWnM3dTA/gametest2.html ) is currently setup to use it for displaying test variables, but will also be used for generic text. Tileset is 8x8, spritefont is 8x8. Gametest2.html has an iframe set at 3x scale of the original.

    <img src="http://i.imgur.com/h3vX7oO.png" border="0" />

    The problem I'm running into here is that the scaling isn't exact at integers (x2 x3 x4 scaling) as it gets distorted a little (Some letters have 2 tall "pixels" instead of 3 tall), and the upper-right section shows 1 pixel beyond what it should for it's position. I have "Force Point Sampling" on but it doesn't do anything different.

    I tried it manually with using the "Text Scale" function as well as with the layout interger scale function, produces the same result.

    The best I was able to get it was at 1.025 text scale, but even that has incorrect scaling.

    Is there any work around for this or would I have to wait for the plugin to update.

    Edit: Figured out a work around

    SpriteFont Text boxes as big as they need to be:

    <img src="http://i.imgur.com/ChH2EwO.png" border="0" />

    Scaling issues

    Spritefont Text boses way bigger than they need to be (at least 160x144, my layout size)

    <img src="http://i.imgur.com/UaKfkUN.png" border="0" />

    No scaling issues

    For some reason the size of the SpriteFont box affects the scaling of the spritefont itself.

    Edit2:

    After playing around with it, seems that even though it's properly scaled 1x with a larger box, I had to make the box even larger to have it properly scale it's resize. For 3x size I had to make the textbox 320x144

  • Xavy has a very good solution since it works with the platform plugin, not against like manual +/- of x

    If you want to ignore user movement, I suggest making it trigger an event (disablecontrols false/true) and on the control actions, have it check to make sure it's false.

    -On Right down

    -disabled controls is false

    --Simulate Platform Right

  • Try to place this event Every Tick below the player control, or on the very last row?

    My guess is if the Every Tick event is on top, the player will move afterwards, leaving the scroll one tick behind.

    Ah, sounds exactly like what is happening.

    I doubt it'd be a major issue, but I assume it's a valid issue for some minor things like this. Is there any sort of guideline on how to organize things, or should I just make it so every group that has an every-tick function to have the every-tick last?

    EDIT:Put it below in the group and still having occasional jittering.

    Editx2: Tried messing with it and using dt to see if I could use it to prevent it, but somehow made it so it would stutter and then still stutter when I stopped moving.

    Went to another tab, came back and it wasn't stuttering anymore. Since I couldn't get it to stutter on the live versions, going back to assume it's a non-issue for now as it mostly only affects Preview. Leaving the every tick on the bottom of the player group just because it can't hurt.

  • Don't have access to it at the moment, but was screwing around with a hosted version of the game. All I did to recreate it was move to make it scroll -and if it didn't jitter- stop moving, and then move again to make it scroll.

    googledrive.com/host/0B7mHJO1CK--NN1hxV2IxWnM3dTA/gametest2.html

    Seems to not have the stutter when at a proper scale, or at least I couldn't recreate it (That's 3x scale in an iframe)

    googledrive.com/host/0B7mHJO1CK--NN1hxV2IxWnM3dTA/index.html

    Seems to sometimes have a stutter, but fixes itself. (Scales to browser size)

    Guess it happens more reliably during live preview (Scales to browser size). Since it seems to be a non-issue for now and only noticeable on my end, going to file it away as a non-issue until the issue comes back or someone has a better way to scroll with a deadzone.

    Due to the confusion earlier, here's my entire scrolling code. Forgot to link it earlier when I was messing around with the capx.

    <img src="http://i.imgur.com/YIpkzDw.png" border="0" />

  • Well it does it at 60fps.

    What I mean is you're in the dead zone, no scrolling. You move right, outside of it, it scrolls. This functions perfectly except this minor hiccup

    Occasionally instead of a smooth scroll, it scrolls, then stops then scrolls then stops so fast you see a double image. If you stop and move again, it doesn't happen. I'm getting 60fps during this so it's not a performance thing, but calculating the scroll effectively, or the scroll function is lagging behind for some reason.

    I can force the stuttering by adding "wait dt" before the scroll action, or having the >= <= be greater/less than 12/-12

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Tried it another way but it still jitters.

    Every Tick

    -Playerbox.X - scrollx >= 12

    --Set Scroll X to scrollX + (60*dt)

    -Playerbox.X - scrollx <= -12

    --Set Scroll X to scrollX - (60*dt)

    60 being the Playerbox speed.

    Either way I do it it's smooth 97% of the time, but rarely when you make it scroll, it's like the process is lagging a tiny bit. only way to force it is to repeatedly move to scroll, stop and do it again and again until it unfortunately happens.

  • Sorry, had a typo in the first post.

    Anyway what I have is an area 12x on either side of scrollx which is a dead zone. All that works, it's just that occasionally going outside the deadzone, it jitters. It's pretty rare but happens.

  • Here's the platformer I've been working on along with the tools I've been using.

    [tube]dBhvHwFaG7s[/tube]

  • Sometimes when I have the camera moving it jitters. What I have works perfectly except the jittering.

    My scrolling is set up like this:

    Every Tick

    -Playerbox.X - scrollx >= 12

    --Set Scroll X to Playerbox.X - 12

    -Playerbox.X - scrollx <= -12

    --Set Scroll X to Playerbox.X + 12

    edit: typo and forgot comparison with scrollx

    This kind of scrolling has a dead area the center of the screen so the camera is not locked on to the player.

    However occasionally (not too oftem) it jitters when going right, or left. Can't reproduce it on command. I added a Wait 0.001 seconds function but that doesn't do anything to alleviate the problem.

  • Sounds like the arrow is spawned on top of the enemy.

    Either set the enemies immune during the shooting (disable collisions, wait 1, enable collisions) or have the arrow object created outside of the enemy hitbox.

    You could also make the hitbox for the enemy bend around where you spawn the arrow as well, but that might be weird.

  • Original thread was moved to closed bugs. Unless bug is resolved in versions beyond [r120.2]. still persists and easily reproducible and modifiable.

    Original Thread: scirra.com/forum/topic63900.html

    Link to .capx file (required!):

    dl.dropbox.com/u/73774002/platformbug.rar

    Contains CAPX (saved in [r119]) along with exports (bug exported from [r120.2])

    Steps to reproduce:

    0. Open BUG export OR Open CapX file in [r120.2] and Preview

    1. Hold Right/Left into a 2 tile high wall

    2. Push jump

    3. Continue holding left/right

    Observed result:

    Sprite jumps then immediately goes on platform

    Expected result:

    Sprite jumps and finishes jump with arch while going right/left.

    Browsers affected:

    Chrome: yes

    Firefox: yes

    Internet Explorer: yes

    Operating system & service pack: Windows 7 x64

    Construct 2 version: [r120.2] x64

    ====

    The issue seems to be affected by changing platforming variables. In the previous thread I modified the jumpstrength in the capx file to 300, and it only affected 3 tile high walls instead of only 2 tile high walls.

    I have included the exported project as well both from [r119] and [r120.2], as the bug is noticeable upon export.

    Looking into it, it could be the bugfix from r120 which is messing it up:

    Bug Fix     Platform: possible 1px hover before triggering 'On land'

    It's the only thing that seems to have changed in platforming since [r119]

  • If you stand by a wall and push up, it goes for the full jump. As you can see in the demo, the jump strength itself makes you go significantly above the platforms.

    If you stand by a wall, push right/left into the wall and push jump, you only go as high as the wall then start walking immediately. Even does it without pixel rounding.

    It seems to only affect the walls that are 2 tiles high. 1 tile, 3 tile, 4 tiles don't matter. This is at 250 jumpstrength with default settings

    At 300 jumpstrength it only affects 3 tile high walls.

    My game with platforming configured more detailed, it affects all platforming as 1 2 or even 3 tile high walls it does this (3 tile is the max jump height for that game)

    It seems to be anything that is compiled with the [r120.2] build has this issue, as my previously compiled exports do not do this. edit: Just did a test and preview/compile with [r119] does not reproduce the issue I'm having with [r120.2]

    Edit: version I am on is [r120.2]. Not just [r120]