Author Topic: Jump  (Read 19950 times)

0 Members and 2 Guests are viewing this topic.

Offline mrmprog

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 559
  • Rating: +35/-1
    • View Profile
Jump
« on: July 27, 2011, 02:51:18 am »
This is my first attempt at something big in Axe. You jump around and try not to fall. Yay! I am going to try and make this a full game.






It looks better on calc. Thanks to Eeems, Darl, Hayleia, FinaleTI, Builderboy,and p2 for help.  I need to somehow make it so impossible places can't happen. If anyone has a solution to this problem, please let me know. I will be fine tuning things, improving code and the such meanwhile. Please give me feedback, as this is my first Axe project.


Controls:2nd to jump, left and right to move, enter to select stuff, clear to exit or skip stuff.

« Last Edit: November 15, 2011, 09:08:25 pm by mrmprog »

Offline Sitarknight

  • LV2 Member (Next: 40)
  • **
  • Posts: 21
  • Rating: +1/-0
  • I am SitarKnight
    • View Profile
Re: mrmprog's game
« Reply #1 on: July 27, 2011, 04:57:47 am »
Looks pretty good man, I like it
"The promise of a Craftknight is stronger than the toughest steel."

Offline mrmprog

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 559
  • Rating: +35/-1
    • View Profile
Re: mrmprog's game
« Reply #2 on: July 27, 2011, 09:28:06 am »
Glad you like it :) Yay, updates! I made platforms more "regular", a new sprite for falling/jumping, you can jump further, and dying is... different.

Next: Highscores, a menu, and a death animation.
Maybe Next: Title screen.
« Last Edit: July 29, 2011, 05:36:56 am by mrmprog »

Offline p2

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 849
  • Rating: +51/-11
  • I'm back :)
    • View Profile
Re: mrmprog's game
« Reply #3 on: July 27, 2011, 10:02:13 am »
looks not bad - it looks good!
You may add, that the lines are just possible to be at every trind line of the screen, or something like this. (then they are not like giant, grey blocks of 4 or 5 lines)

I think, A ball or a smiley would be a better than a stickfigure. (you can't really see, what the pic is; ih's hard in cause of the grey lines)
*insert supercool signature*

Offline mrmprog

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 559
  • Rating: +35/-1
    • View Profile
Re: mrmprog's game
« Reply #4 on: July 27, 2011, 10:03:59 am »
Yeah, I might change that. What would look best in your opinion?

Edit: I made some smiley sprites and they look much better, thanks :)

Tommorow, I will post another screenshot with the new sprites.
« Last Edit: July 27, 2011, 10:11:24 am by mrmprog »

Offline p2

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 849
  • Rating: +51/-11
  • I'm back :)
    • View Profile
Re: mrmprog's game
« Reply #5 on: July 27, 2011, 10:30:45 am »
I thought of something like this:



Now, your Program makes that:
Quote
--  -  - -  - --- -

-- - ---- - --- --
-- - - - -  --  --


- - -- - ---- --
----- -- - ---- -

- - --  --- -- -

--- --- --  -- -

--- --- - -- -- 
-- ---- - - ----



If you make it like this:
Code: [Select]
:rand^16 -> A           //A is the Y-coord of the line
4*(A) -> A

the game would look like that:
Quote
--  -  - -  - --- -



-- - ---- - --- --



-- - - - -  --  --



- - -- - ---- --



----- -- - ---- -



- - --  --- -- -



- - --  --- -- -



--- --- --  -- -



--- --- - -- -- 



-- ---- - - ----

It will be better like that, because else there are giant grey blocks of 3 or 4 lines, each one intersecting each other.


With this you'll get the best results iv you use many lines.





Another idea:
Try to use
:pt-off(X,Y,[FFFFFFFFFFFFFFFF])
:pt-on(X,Y,[code of smiley])
It'll make a white space behind the smiley, so that you can see it better.
*insert supercool signature*

Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: mrmprog's game
« Reply #6 on: July 27, 2011, 11:36:56 am »
Another idea:
Try to use
:pt-off(X,Y,[FFFFFFFFFFFFFFFF])
:pt-on(X,Y,[code of smiley])
It'll make a white space behind the smiley, so that you can see it better.
For that idea, a
Pt-Off(X,Y,[code of smiley or pointer]
would be enough as "Pt-Off" puts a sprite but erases what there is at the location before.
I own: 83+ ; 84+SE ; 76.fr ; CX CAS ; Prizm ; 84+CSE
Sorry if I answer with something that seems unrelated, English is not my primary language and I might not have understood well. Sorry if I make English mistakes too.

click here to know where you got your last +1s

Ashbad

  • Guest
Re: mrmprog's game
« Reply #7 on: July 27, 2011, 12:32:52 pm »
Another idea:
Try to use
:pt-off(X,Y,[FFFFFFFFFFFFFFFF])
:pt-on(X,Y,[code of smiley])
It'll make a white space behind the smiley, so that you can see it better.
For that idea, a
Pt-Off(X,Y,[code of smiley or pointer]
would be enough as "Pt-Off" puts a sprite but erases what there is at the location before.

No it doesn't.  Pt-Off() simply XORs the sprite in parameter slot 3 against the said place on the buffer, it doesn't clear the space behind it first.

Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: mrmprog's game
« Reply #8 on: July 27, 2011, 02:18:46 pm »
No it doesn't.  Pt-Off() simply XORs the sprite in parameter slot 3 against the said place on the buffer, it doesn't clear the space behind it first.
Wut ? Weren't you confused with Pt-Change ?
Here is a screenie of Commands.htm
Or maybe I'm wrong because of a grayscale story. I don't know anything to grayscale.
« Last Edit: July 27, 2011, 02:20:06 pm by Hayleia »
I own: 83+ ; 84+SE ; 76.fr ; CX CAS ; Prizm ; 84+CSE
Sorry if I answer with something that seems unrelated, English is not my primary language and I might not have understood well. Sorry if I make English mistakes too.

click here to know where you got your last +1s

Ashbad

  • Guest
Re: mrmprog's game
« Reply #9 on: July 27, 2011, 04:01:37 pm »
Oh, my bad, you are correct.  I remember that Pt-Off used to mean it XORed it against the buffer,  I guess that has recently changed.
« Last Edit: July 27, 2011, 04:02:46 pm by Ashbad »

Offline calcdude84se

  • Needs Motivation
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2272
  • Rating: +78/-13
  • Wondering where their free time went...
    • View Profile
Re: mrmprog's game
« Reply #10 on: July 27, 2011, 04:37:14 pm »
Oh, my bad, you are correct.  I remember that Pt-Off used to mean it XORed it against the buffer,  I guess that has recently changed.
I don't think it's ever been like that. Pt-Change( has always been used for XOR.
"People think computers will keep them from making mistakes. They're wrong. With computers you make mistakes faster."
-Adam Osborne
Spoiler For "PartesOS links":
I'll put it online when it does something.

Offline LincolnB

  • Check It Out Now
  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1115
  • Rating: +125/-4
  • By Hackers For Hackers
    • View Profile
Re: mrmprog's game
« Reply #11 on: July 27, 2011, 06:20:43 pm »
I need to ... make a counter of some sort so that it shifts the screen every few times through the loop, instead of every time.


Try this:

Code: [Select]
.use the variable A for the counter you need
.Main game loop:

1->A

Repeat getkey(15)

A+1->A

If A=4
1->A
End

If A=1
Vertical +
Vertical +{r}
End

.Rest of your code goes here
.
.

End

Let me know how that works out. Also, if you wanted to have multiple difficulty levels, you could have another variable , like B or something, and instead of writing:

Code: [Select]
If A=4
1->A
End

, you could write:

Code: [Select]
If A=B
1->A
End

, where B is the difficulty level, 4 being easiest / slower because it makes it wait longer to scroll, and 2 being the fastest (where it scrolls every iteration of the main game loop).

Let me know if I didn't explain that very well.
« Last Edit: July 27, 2011, 06:27:14 pm by buttsfredkin »
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 mrmprog

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 559
  • Rating: +35/-1
    • View Profile
Re: mrmprog's game
« Reply #12 on: July 27, 2011, 10:46:55 pm »
@buttsfredkin Thank you for the code, but I already did that using the score counter. You will see it soon.
Also, about the pixeloff(, if I do that, wont it erase the lines behind the sprite? The lines are just drawn every few cycles of the loop, so I don't think I can redraw them if they are overwritten.
« Last Edit: July 28, 2011, 03:42:53 am by mrmprog »

Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: mrmprog's game
« Reply #13 on: July 28, 2011, 04:00:13 am »
Yes, the lines would be erased :(
But what do you use ? Do you use Pt-On or Pt-Change ? Because the guy's pixels seem to be inverted if there is a line behind him, so it looks like a Pt-Change.
I own: 83+ ; 84+SE ; 76.fr ; CX CAS ; Prizm ; 84+CSE
Sorry if I answer with something that seems unrelated, English is not my primary language and I might not have understood well. Sorry if I make English mistakes too.

click here to know where you got your last +1s

Offline mrmprog

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 559
  • Rating: +35/-1
    • View Profile
Re: mrmprog's game
« Reply #14 on: July 28, 2011, 04:03:03 am »
Yes, It is Pt-Change. If you can think of a better way, please let me know. I will be posting an update soon, and this time I will include the poorly written source. Btw, check the first post for the most recent screenie :)