Author Topic: Seeker  (Read 33322 times)

0 Members and 2 Guests 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: Seeker
« Reply #60 on: December 10, 2011, 11:03:56 pm »
THANK YOU SOOO MUCH!!!
My Sprites Thread   :Updated often :) for your viewing pleasure

GAMES:

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: Seeker
« Reply #61 on: December 10, 2011, 11:54:51 pm »
sorry to double post, but could you go in depth on the jumping part and what you are doing in the code? thats the part i need, thanks
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: Seeker
« Reply #62 on: December 11, 2011, 01:58:43 pm »
How does the pixeltesting work in this?
« Last Edit: December 11, 2011, 01:59:09 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: Seeker
« Reply #63 on: December 11, 2011, 05:24:57 pm »
update, still need to fix jumping for realism. right now adding backgrounds
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: Seeker
« Reply #64 on: December 11, 2011, 08:42:10 pm »
sorry to double post, but could you go in depth on the jumping part and what you are doing in the code? thats the part i need, thanks

You're talking about just the gravity, not the collisions, right?

How does the pixeltesting work in this?


I'm kinda busy right now, but I'll post more about it later.
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: Seeker
« Reply #65 on: December 11, 2011, 09:09:04 pm »
Yup, Saintrunner wants the gravity, not collisions, and I want to know collisions, not gravity :P

In the mean time, I'll start putting together a tilemap.

Offline LincolnB

  • Check It Out Now
  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1115
  • Rating: +125/-4
  • By Hackers For Hackers
    • View Profile
Re: Seeker
« Reply #66 on: December 11, 2011, 10:39:57 pm »
Okay, so for gravity, all you need is two variables: Y_Position and Y_Velocity. Y_Position is just where on the screen the character is displayed, the Y coordinate. Y_Velocity is the speed the character moves per frame. So, to move the character upward, all you need is a negative velocity. Since Y_Velocity is added to Y_Position every frame automatically, if you simply set the Y_Velocity to a negative number, you will go upwards (adding a negative number to Y_Position = subtracting from Y_Position = making the character go up). To simulate realistic gravity, we need to define exactly what gravity is. Gravity is downward acceleration, that's all. Implementing this is fairly trivial - just add a constant number to the Y_Velocity every frame.

Example:
Code: [Select]
.I'm going to use Y for Y_Position and E for Y_Velocity
.So every frame, put this line in somewhere:

Y+E->Y

.And add a constant to E

E+100->E

.100 is a pretty good number for 256x inflation
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: Seeker
« Reply #67 on: December 11, 2011, 11:39:05 pm »
100 for Y acceleration? O.O
I'm using 12 for gravity...…
« Last Edit: December 11, 2011, 11:39:31 pm by epic7 »

Offline leafy

  • CoT Emeritus
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1554
  • Rating: +475/-97
  • Seizon senryakuuuu!
    • View Profile
    • keff.me
Re: Seeker
« Reply #68 on: December 12, 2011, 02:47:02 am »
100 for Y acceleration? O.O
I'm using 12 for gravity...…
Yeah, butts I think you probably meant 10 or something. 100 is way too fast.
In-progress: Graviter (...)

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: Seeker
« Reply #69 on: December 12, 2011, 04:04:25 pm »
I get all that stuff, I just can't get it to pxl test when I come down on a plat form..
My Sprites Thread   :Updated often :) for your viewing pleasure

GAMES:

Offline parserp

  • Hero Extraordinaire
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1455
  • Rating: +88/-7
  • The King Has Returned
    • View Profile
Re: Seeker
« Reply #70 on: December 12, 2011, 04:05:59 pm »
I get all that stuff, I just can't get it to pxl test when I come down on a plat form..
what is your sprite? I can code an example program for you with the sprite. :)

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: Seeker
« Reply #71 on: December 12, 2011, 04:08:15 pm »
no I have all that. like it jumps and moves, but if I put in a line as a plat form, the sprite jumps through it instead of landing on it...I think I is cuz it is adding and subtracting multiple numbers from the sprites position...
My Sprites Thread   :Updated often :) for your viewing pleasure

GAMES:

Offline parserp

  • Hero Extraordinaire
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1455
  • Rating: +88/-7
  • The King Has Returned
    • View Profile
Re: Seeker
« Reply #72 on: December 12, 2011, 04:21:25 pm »
no I have all that. like it jumps and moves, but if I put in a line as a plat form, the sprite jumps through it instead of landing on it...I think I is cuz it is adding and subtracting multiple numbers from the sprites position...
you mean like this?:
Code: [Select]
:.assuming that Y is your Y position and E is your Y velocity
:.and that your sprite is [FFFFFFFFFFFFFFFF]
:.and that X is your X position
:
:Repeat GetKey(15)
:ClrDraw
:Y+E->Y
:
:If E>>0 //if your velocity is negative
:sub(TEST) //subroutine that sees if there is platform
:End
:
:E+100->E
:
:.the rest of your code (jumping, etc.)
:End //end main loop
:
:Lbl TEST
:For(B,((Y/256)-(E/256)+8),((Y/256)+8
:For(A,(X/256),(X/256)+7
:If pxl-Test(A,B
:0->E
:((B*256)-2048)->Y
:Return
:End
:End
:End
:Return
« Last Edit: December 12, 2011, 04:22:35 pm by parser padwan »

Offline thydowulays

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 184
  • Rating: +12/-1
  • Don't gimme dat lip
    • View Profile
    • Thy Gaming Forum
Re: Seeker
« Reply #73 on: December 12, 2011, 05:38:21 pm »
Sorry to be a super n00b, but what does >> mean? For example: X>>12. Also, I've never understood for loops, what are the 3 arguments?
Current Projects:
-Sparta GUI Library: 25% - Alpha Stage
-Grapher - 75% - Beta Stage *on hiatus




Offline parserp

  • Hero Extraordinaire
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1455
  • Rating: +88/-7
  • The King Has Returned
    • View Profile
Re: Seeker
« Reply #74 on: December 12, 2011, 05:52:11 pm »
Sorry to be a super n00b, but what does >> mean? For example: X>>12. Also, I've never understood for loops, what are the 3 arguments?
> works on only positive numbers.
>> works on positive and negative numbers. ;)

in a for( loop, the 3 arguments are: first, the variable. second, the starting value of the variable, and third, the ending value of the variable.
for example:
Code: [Select]
:For(A,0,3) //loops through 4 times
:Disp A>Dec //displays the value of A (see how it changes?)
:End