Author Topic: Grappler!  (Read 30442 times)

0 Members and 2 Guests are viewing this topic.

Offline ztrumpet

  • The Rarely Active One
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5712
  • Rating: +364/-4
  • If you see this, send me a PM. Just for fun.
    • View Profile
Re: Grappler!
« Reply #165 on: December 15, 2011, 10:38:26 pm »
That looks pretty great.  Nice job on it!

Offline leafy

  • CoT Emeritus
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1554
  • Rating: +475/-97
  • Seizon senryakuuuu!
    • View Profile
    • keff.me
Re: Grappler!
« Reply #166 on: December 16, 2011, 12:43:12 am »
That speed needs some improvement but that enemy sprite is awesome :O
In-progress: Graviter (...)

Offline epic7

  • Chopin!
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2200
  • Rating: +135/-8
  • I like robots
    • View Profile
Re: Grappler!
« Reply #167 on: December 16, 2011, 03:58:18 pm »
Thanks!
I don't have full (not on 83+BE right?) so its stuck at 6mhz

Like I said before the length of a loop was
.033
Then with tilemap tripled to
.095
Then with optimizations it got down to
.063 (shown on screenie)
Now, I made it so that the tilemap updates every other loop, which gets it to
.43
However, movement is a little bit irregular since the frames each display after a different time :P
But it doesn't make it look bad.

Screenie:
*this is to show the speed of the game, not how much my tilemap screw up when the guy goes too far*

Its faster on calc.
« Last Edit: December 16, 2011, 04:34:35 pm by epic7 »

Offline LincolnB

  • Check It Out Now
  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1115
  • Rating: +125/-4
  • By Hackers For Hackers
    • View Profile
Re: Grappler!
« Reply #168 on: December 16, 2011, 05:30:39 pm »
very cool, it looks great! Are you going to add Y axis scrolling, cause that would be boss.
Completed Projects:
   >> Spacky Emprise   >> Spacky 2 - Beta   >> Fantastic Sam
   >> An Exercise In Futility   >> GeoCore

My Current Projects:

Projects in Development:
In Medias Res - Contest Entry

Talk to me if you need help with Axe coding.


Spoiler For Bragging Rights:
Not much yet, hopefully this section will grow soon with time (and more contests)



Offline epic7

  • Chopin!
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2200
  • Rating: +135/-8
  • I like robots
    • View Profile
Re: Grappler!
« Reply #169 on: December 16, 2011, 05:47:25 pm »
Yeah, I'll add Y.

Also, do you have the link for the tilemap compression thingamajig?

Anyone know how to do pxl-testing for the collisions?
Or is there maybe an easier way for using a tilemap?
« Last Edit: December 16, 2011, 05:52:26 pm by epic7 »

Offline LincolnB

  • Check It Out Now
  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1115
  • Rating: +125/-4
  • By Hackers For Hackers
    • View Profile
Re: Grappler!
« Reply #170 on: December 16, 2011, 07:08:08 pm »
Also, do you have the link for the tilemap compression thingamajig?

Oh yeah, sorry I forgot about that. I'll try and get that to you later today. And for pxl based collisions, you can go ahead and use the engine I wrote for Seeker if you want to.
Completed Projects:
   >> Spacky Emprise   >> Spacky 2 - Beta   >> Fantastic Sam
   >> An Exercise In Futility   >> GeoCore

My Current Projects:

Projects in Development:
In Medias Res - Contest Entry

Talk to me if you need help with Axe coding.


Spoiler For Bragging Rights:
Not much yet, hopefully this section will grow soon with time (and more contests)



Offline epic7

  • Chopin!
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2200
  • Rating: +135/-8
  • I like robots
    • View Profile
Re: Grappler!
« Reply #171 on: December 16, 2011, 09:52:14 pm »
Can you explain how that works?

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 #172 on: December 16, 2011, 09:56:58 pm »
Yeah I still need to know how the jumping part works
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 #173 on: December 16, 2011, 10:01:47 pm »
Jumping isnt really that bad.

Saintrunner:
[FFFFFFFFFFFFFFFF]->Pic1
56*256->Y
0->X->V->W->A->B->J
Repeat getKey(15)
If getKey(54)
-256->W
256->V
8->B
End
If Y/256>57 ;simple collision :P
56*256->Y
0->A->B->V->W
End
V+A->V+X->X
W+B->W+Y->Y
Pt-On(X/256,Y/256,Pic1)
DispGraphClrDraw
End

Where X,Y are coordinates
V,W are velocities
A,B are accelerations

I need to figure out my collisions before I start making the tilemaps have obstacles.
« Last Edit: December 17, 2011, 06:38:14 pm by epic7 »

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 #174 on: December 16, 2011, 10:30:41 pm »
Those variables are confusing me...and the 256 is just so it's more accurate right?
My Sprites Thread   :Updated often :) for your viewing pleasure

GAMES:

Offline leafy

  • CoT Emeritus
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1554
  • Rating: +475/-97
  • Seizon senryakuuuu!
    • View Profile
    • keff.me
Re: Grappler!
« Reply #175 on: December 16, 2011, 10:32:13 pm »
Jumping isnt really that bad.

Saintrunner:
[FFFFFFFFFFFFFFFF]->Pic1
56*256->Y
0->X->V->W->A->B->J
Repeat getKey(15)
If getKey(54)
-256->W
256->V
-8->B
End
If Y/256<57 ;simple collision :P
56*256->Y
End
V+A->V+X->X
W+B->W+Y->Y
Pt-On(X/256,Y/256,Pic1)
DispGraphClrDraw
End

Where X,Y are coordinates
V,W are velocities
A,B are accelerations

I need to figure out my collisions before I start making the tilemaps have obstacles.

Shouldn't it be If Y/256>57? :P
In-progress: Graviter (...)

Offline epic7

  • Chopin!
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2200
  • Rating: +135/-8
  • I like robots
    • View Profile
Re: Grappler!
« Reply #176 on: December 16, 2011, 10:39:26 pm »
Oh you're right, I get screwed up sometimes with the Y coordinates :P

Saintrunner, fix that inequality and I forgot to add that it needs to do
0->V->W->A->B
After it.
(edited the post)

And 256 is for accuracy.
I'm using variables for Location, velocity, and acceleration, which I think works nicely.
« Last Edit: December 16, 2011, 10:41:22 pm by epic7 »

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 #177 on: December 16, 2011, 10:42:11 pm »
ok thanks
My Sprites Thread   :Updated often :) for your viewing pleasure

GAMES:

Offline LincolnB

  • Check It Out Now
  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1115
  • Rating: +125/-4
  • By Hackers For Hackers
    • View Profile
Re: Grappler!
« Reply #178 on: December 16, 2011, 10:46:15 pm »
Can you explain how that works?

So I have two subroutines, MoveX and MoveY. Each of these moves the character as far as the [velocity variables] dictate, stopping the character and zeroing the [velocity variables] if there's a pixel in the way.

Basically, I have a loop set up that loops from 1 to however large the [velocity variable] is (negative values of the [velocity variable] made things a little complicated, but it wasn't too bad). Inside this loop is another loop that goes from [zero] to the [height of the sprite] minus one, doing a buttload of pxl-test commands to see if there's anything in the way. If there's anything in the way, stop the MoveX or MoveY routine, and move the character position as far as they can (up to a point) without hitting something.

It looks kinda like this: assuming X is the X_COORDINATE and D is the X_VELOCITY. Pretend that X_VELOCITY is positive (so the character moves down). Assume there's no inflation, and X_VELOCITY (D) is 3, so the character can potentially move 3 pixels in the downward direction, and this is written out in non-loop form (which is highly impractical but demonstrates the concept fairly well).

1. Look to see if there's any filled in pixels in the 8-pixel-wide row directly beneath the character (assume a rectangular character).
2. If there's none, move the character one pixel down, and repeat step 1 until you've already gone as far as you had the potential to go (You don't want to go fifteen pixels, you want to go three, because X_VELOCITY is three, and X_VELOCITY is the maximum number of pixels your character can move in a frame.
3. If there are any, stop moving the character. Return from the subroutine, get on with the rest of the game logic and whatnot.

That probably didn't make much sense. But hopefully that^^, coupled with studying the source code of my engine, will help you.
Completed Projects:
   >> Spacky Emprise   >> Spacky 2 - Beta   >> Fantastic Sam
   >> An Exercise In Futility   >> GeoCore

My Current Projects:

Projects in Development:
In Medias Res - Contest Entry

Talk to me if you need help with Axe coding.


Spoiler For Bragging Rights:
Not much yet, hopefully this section will grow soon with time (and more contests)



Offline epic7

  • Chopin!
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2200
  • Rating: +135/-8
  • I like robots
    • View Profile
Re: Grappler!
« Reply #179 on: December 16, 2011, 10:49:26 pm »
* epic7 scans
You mean for how fast the velocity is, the farther down and larger area to check for pixels?