STORY   LOOP   FURRY   PORN   GAMES
• C •   SERVICES [?] [R] RND   POPULAR
Archived flashes:
228141
/disc/ · /res/     /show/ · /fap/ · /gg/ · /swf/P0001 · P2561 · P5122

<div style="position:absolute;top:-99px;left:-99px;"><img src="http://swfchan.com:57475/60015001?noj=FRM60015001-19DN" width="1" height="1"></div>

This is resource T9B3O7U, an Archived Thread.
Discovered:1/11 -2015 13:23:12

Ended:1/11 -2015 19:07:09

Checked:1/11 -2015 20:23:03

Original location: http://boards.4chan.org/f/thread/2940543/need-some-hep-…
Recognized format: Yes, thread post count is 10.
Discovered flash files: 1





File: Shitty Titty Flash.swf-(4 KB, 550x400, Game)
[_] Anonymous 11/01/15(Sun)07:22:02 No.2940543

  need some hep with my shitty game. When you jump off the edge you fall back through the ground
  multiple times before stopping. Not sure if it's something in the code. Didn't write it myself
  but I've been messing with it with no luck. Any help with my shitty ass game much appreciated.

Marked for deletion (old).
>> [_] Anonymous 11/01/15(Sun)07:31:28 No.2940546

  It doesn't happen under all circumstances (you CAN fall without this happening), so I blame
  bug-ridden collision detection code. Check all the conditionals and see if you are able to edit
  it so you have all possible events under control. It seems to have to do with too big horizontal
  part of velocity.

>> [_] Anonymous 11/01/15(Sun)07:39:06 No.2940548

  I was thinking it had something to do with the velocity also here's the code:

  onClipEvent (load) {
  var ground:MovieClip = _root.ground;
  var grav:Number = 0;
  var gravity:Number = 2;
  var speed:Number = 7;
  var maxJump:Number = -12;
  var touchingGround:Boolean = false;
  }
  onClipEvent (enterFrame) {
  _y += grav;
  grav += gravity;
  while (ground.hitTest(_x, _y, true)) {
  _y -= gravity;
  grav = 0;
  }
  if (ground.hitTest(_x, _y+5, true)) {
  touchingGround = true;
  } else {
  touchingGround = false;
  }
  if (Key.isDown(Key.RIGHT)) {
  _x += speed;
  }
  if (Key.isDown(Key.LEFT)) {
  _x -= speed;
  }
  if (Key.isDown(Key.UP) && touchingGround) {
  grav = maxJump;
  }
  if (ground.hitTest(_x+(_width/2), _y-(_height/2), true)) {
  _x -= speed;
  }
  if (ground.hitTest(_x-(_width/2), _y-(_height/2), true)) {
  _x += speed;
  }
  if (ground.hitTest(_x, _y-(height), true)) {
  grav = 3;
  }
  }

>> [_] Anonymous 11/01/15(Sun)08:00:22 No.2940561

  Alright, it does not have to do with horizontal velocity, I pulled it right out of my ass. That
  part works alright. Anyway - the problem is with the vertical velocity. If you jump before
  falling off the ledge your ball has more room to gain momentum and thus leads to bigger speed in
  the y-axis than planned. Thus it just ignores the collision checking at the time it seems to meet
  the block, as the conditions are passed - the ball doesn't actually "meet" the block in a way
  that the code anticipates at any frame, so it ignores the event as if nothing happened (because
  to the program nothing has happened). This continues for a couple more cycles, until the falling
  ball is "in phase" with the block, when the conditions are passed and the ball stops.

>> [_] Anonymous 11/01/15(Sun)08:04:30 No.2940565

  So I'm guessing I would have to write something up that checked for this condition right? I have
  no idea what the hell I'm doing though.

>> [_] Q-tip 11/01/15(Sun)10:48:47 No.2940637

  The down button doesn't do anything faggot.

>> [_] Anonymous 11/01/15(Sun)10:56:27 No.2940639

  I came expecting Titty.

  I did not received Titty.

  Instead, I received disappointment.

  So very many disappointment.

>> [_] Anonymous 11/01/15(Sun)10:57:03 No.2940640

  >>2940637
  not true
  every time you press the down button a child in africa dies

>> [_] Anonymous 11/01/15(Sun)13:03:40 No.2940700

  The easiest way to solve this is to check if you are above the floor this frame, and if you are,
  check if you are below the floor in the next. If that is also true and the x position for the
  next frame is within the range of the floor, then set the y position to the floor level instead
  of whatever position gravity would set it to.

>> [_] Anonymous 11/01/15(Sun)13:05:56 No.2940702

  Just set the y coordinate of the reset position closer to the ground.



http://swfchan.net/31/T9B3O7U.shtml
Created: 1/11 -2015 13:23:12 Last modified: 1/11 -2015 20:23:05 Server time: 19/05 -2024 19:32:21