Author Topic: Grappler!  (Read 30229 times)

0 Members and 1 Guest are viewing this topic.

Offline saintrunner

  • Custom Spriter: You ask it! I'll Make it!
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1787
  • Rating: +115/-11
  • Flogging Molly
    • View Profile
    • Jonny K Music
Re: Grappler!
« Reply #90 on: November 28, 2011, 04:01:32 pm »
not sure, I'd have to play it.
My Sprites Thread   :Updated often :) for your viewing pleasure

GAMES:

Offline epic7

  • Chopin!
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2200
  • Rating: +135/-8
  • I like robots
    • View Profile
Re: Grappler!
« Reply #91 on: November 29, 2011, 04:26:14 pm »
Status update 1
Progress:
Not much

Problems:
Guy getting stuck in the air.
---------------------------------------------------------------

Ok, I can't figure out the problem. Ive tried to find the values of the variables by displaying them on the screen. I got some information from them, but I still cant fix it.

Main problem is that the guy gets stuck in the air.

Location of problem is by the first inequality, checking H

By memory:
If H>1
If H<41
Line(x/256+7,y/256,s,t
;A few other things I cant remember now
If H<15
H++
Y+256->Y
If theta
X+256->X
else
X-256->X
end
If Y/256 = 48 ;If hits the ground
;stops grappling
end
end
some more stuff and then ends.

So, when it reaches the above code and when H = 2, it works. However, it completely skips this when H = 3. It is like 3 is not in between 2 and 40!
To see if the thing is screwing up, I made it display H>1 and H<15. I forgot to do H<41, but that should be true if H<15 (unless the calc thinks 14 and below are greater than 40 O.O)

Both H>1 and H<15 returned 1, but yet it still skipped my Ifs.

I don't know what to do now D:
« Last Edit: November 29, 2011, 09:30:07 pm by epic7 »

Offline epic7

  • Chopin!
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2200
  • Rating: +135/-8
  • I like robots
    • View Profile
Re: Grappler!
« Reply #92 on: November 29, 2011, 10:41:39 pm »
ERROR FIXED!! :w00t: :w00t:
Quote from: M. Bison
YYYESSS!! YYESSSS!

The error was simply screwing up ends. I'm going to start programming the computer with indents :P

Now that The Game actually functions, I can now see how the grappling is performing. Conclusion after playing: my grappling curves are unbelievably unrealistic. So, now progress can resume! :w00t:

:w00t:

I solved it by trying builderboy's idea. His idea was to make is displae value of a Var before the problem. When the Text( never worked, I realized that there must be something before where I thought the problem was.

The problem was that once H reached 3, it didn't work. I never closed an end in the right spot so the if H>1 was acutally nested in a if H=2.

Offline epic7

  • Chopin!
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2200
  • Rating: +135/-8
  • I like robots
    • View Profile
Re: Grappler!
« Reply #93 on: November 30, 2011, 09:23:09 pm »
So, how should I do the grappling?

I was thinking of having the user hold 2nd to swing and let go of it to release the grappling hook.

I might make it to always make it hit at a 45 degree angle and swing down until the rope is vertical, then change direction.

Suggestions

Offline aeTIos

  • Nonbinary computing specialist
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3915
  • Rating: +184/-32
    • View Profile
    • wank.party
Re: Grappler!
« Reply #94 on: December 02, 2011, 10:44:13 am »
I think holding 2nd is the best way.
I'm not a nerd but I pretend:

Offline epic7

  • Chopin!
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2200
  • Rating: +135/-8
  • I like robots
    • View Profile
Re: Grappler!
« Reply #95 on: December 07, 2011, 03:58:57 pm »
Finished with grappling.

I made parabolic curves for rope swings :w00t:
Hold 2nd to swing implemented :w00t:
More realistic gravity :w00t:

I lost some progress, but remade it in science class >:D

I'll grab a screenie later
« Last Edit: December 07, 2011, 08:53:37 pm by epic7 »

Offline epic7

  • Chopin!
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2200
  • Rating: +135/-8
  • I like robots
    • View Profile
Re: Grappler!
« Reply #96 on: December 08, 2011, 06:17:37 pm »
Screenie:

I let the player adjust the moment of release with letting go of the button.

I make the guy warp to the beginning since I don't have scrolling yet.

When the guy goes back up from the swing, it looks kinda bad, so I might tweak it. I had it better before, but because of ram clear, I remade that part <_<

Sometimes it grapples to the floor, but that will be taken care of.

Also do you think the dude travels to far on one swing?

Also I might make the going left swing better and flip the sprite.

Suggestions?

Offline Nick

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1166
  • Rating: +161/-3
  • You just got omnom'd
    • View Profile
    • Nick Steen
Re: Grappler!
« Reply #97 on: December 08, 2011, 06:22:59 pm »
nive, you solved it! well done..
The travelled distance is too big imo, and it seems that it is possible to catch the ceiling really far, maybe too far

it's always so painfull to hear something got lost with a ram clear xs
« Last Edit: December 08, 2011, 06:23:34 pm by Nick »

Offline epic7

  • Chopin!
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2200
  • Rating: +135/-8
  • I like robots
    • View Profile
Re: Grappler!
« Reply #98 on: December 08, 2011, 06:24:07 pm »
I think its too far, yes.

Seems possible to catch what really far?

Going left needs to be changed too.
« Last Edit: December 08, 2011, 06:24:37 pm by epic7 »

Offline Nick

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1166
  • Rating: +161/-3
  • You just got omnom'd
    • View Profile
    • Nick Steen
Re: Grappler!
« Reply #99 on: December 08, 2011, 06:26:19 pm »
well, when you're flying really fast, the rope gets attached to the ceiling to far i think, that causes it to go faster an faster, so eventually (if you do it good) you can make him fly endlessly fast

Offline epic7

  • Chopin!
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2200
  • Rating: +135/-8
  • I like robots
    • View Profile
Re: Grappler!
« Reply #100 on: December 08, 2011, 06:28:36 pm »
That can't happen in my code, though.

Offline epic7

  • Chopin!
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2200
  • Rating: +135/-8
  • I like robots
    • View Profile
Re: Grappler!
« Reply #101 on: December 08, 2011, 09:04:36 pm »
I added a lot to the gravity. That takes almost 96 pixels off of max distance in one swing.

Here, using 3 scale greyscale, I made a test for it by putting all grey under the game. It makes the other stuff look like crap though <_<

I might put some greyscale designs in the background in the future if there's a way to improve it.
« Last Edit: December 11, 2011, 09:12:43 pm by epic7 »

Offline epic7

  • Chopin!
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2200
  • Rating: +135/-8
  • I like robots
    • View Profile
Re: Grappler!
« Reply #102 on: December 09, 2011, 08:28:50 pm »
I had an idea for pxl texts. Would this work?

For(E,0,W/256)
If pxl-Test(X/256,Y/256+E+8) ;only checks left side right now
;reset stuff
Goto PP
End
End
Lbl PP

Offline leafy

  • CoT Emeritus
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1554
  • Rating: +475/-97
  • Seizon senryakuuuu!
    • View Profile
    • keff.me
Re: Grappler!
« Reply #103 on: December 10, 2011, 01:15:23 am »
I had an idea for pxl texts. Would this work?

For(E,0,W/256)
If pxl-Test(X/256,Y/256+E+8) ;only checks left side right now
;reset stuff
Goto PP
End
End
Lbl PP

I would recommend (to make this go faster)
{°W+1}→θ
For(E,0,θ)
If pxl-Test({°X+1},{°Y+1}+E+8) ;only checks left side right now
;reset stuff
Goto PP
End:End
Lbl PP

Although if your character is essentially a rectangle all you need to do is check the top and bottom corners.
In-progress: Graviter (...)

Offline epic7

  • Chopin!
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2200
  • Rating: +135/-8
  • I like robots
    • View Profile
Re: Grappler!
« Reply #104 on: December 10, 2011, 08:53:54 am »
Since I haw no idea what's going on in that code, :P
Would pxltest({°X+1}+6,.........
Check the part 6 pixels to the right?