Author Topic: how to jump?  (Read 24110 times)

0 Members and 1 Guest are viewing this topic.

Offline epic7

  • Chopin!
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2200
  • Rating: +135/-8
  • I like robots
    • View Profile
Re: how to jump?
« Reply #30 on: December 21, 2011, 05:42:30 pm »
Oh, ok. I dont really know too much about optimizing anyways :P
(That would be epic if squidjetx made a second guide :P)
But he should use the D*8+Pic0 thingy, thats always good to use.
« Last Edit: December 21, 2011, 05:43: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: how to jump?
« Reply #31 on: December 21, 2011, 05:44:10 pm »
sure :) (you should probably explain that though)

(lol he's not even online so he will have some tutorial when he does get on !)
« Last Edit: December 21, 2011, 05:44:59 pm by saintrunner »
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: how to jump?
« Reply #32 on: December 21, 2011, 06:04:27 pm »
Each monochrome sprite is 8 bytes, so by adding 8 to an initial pointer sprite you end up with the sprite immediately after that initial one.
In your code, if D is 0, it'll draw Pic0. If D is 1, it'll draw Pic0+8, which is the sprite data directly after the first 8 bytes of Pic0. And so on.
This is pretty useful, so you don't have to make cases, because casework is always bad.
In-progress: Graviter (...)

Offline Cram

  • LV3 Member (Next: 100)
  • ***
  • Posts: 49
  • Rating: +0/-0
    • View Profile
Re: how to jump?
« Reply #33 on: December 21, 2011, 11:32:39 pm »
thank everyone for your help i understand better now! ;D but i added a monster to kill me and i tryed this code but it dosnt work :(
Code: [Select]
[...]
sub(DIE)
if D
return
end
[...]

Lbl DIE
if pxl-test(u-1,v)=1
1->D
return
when i go close to my monster, he just continu to move across me and nothing happen.. what sould i do or what is the problem? :O
« Last Edit: December 21, 2011, 11:33:44 pm by Cram »

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: how to jump?
« Reply #34 on: December 21, 2011, 11:48:40 pm »
are you moving from the right? your are pxl-testing the top left hand corner (one spot to the left) so is your sprite tall enough to hit that? or are you smaller then the monster? try pxl-test(U-1,V+7)

edit: this should work (and take up less space)

if pxl-test(U-1,V+7)=1
return
end

I don't think you need a subroutine
« Last Edit: December 21, 2011, 11:58:16 pm by saintrunner »
My Sprites Thread   :Updated often :) for your viewing pleasure

GAMES:

Offline Cram

  • LV3 Member (Next: 100)
  • ***
  • Posts: 49
  • Rating: +0/-0
    • View Profile
Re: how to jump?
« Reply #35 on: December 22, 2011, 12:01:07 am »
are you moving from the right? your are pxl-testing the top left hand corner (one spot to the left) so is your sprite tall enough to hit that? or are you smaller then the monster? try pxl-test(U-1,V+7)
the monster walk left and go across me after that he go right and walk across me again even if i change v by v+7 :S

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: how to jump?
« Reply #36 on: December 22, 2011, 12:02:27 am »
can I see a screenie?

and did you try my code, minus a subroutine ^^
« Last Edit: December 22, 2011, 12:02:55 am by saintrunner »
My Sprites Thread   :Updated often :) for your viewing pleasure

GAMES:

Offline Cram

  • LV3 Member (Next: 100)
  • ***
  • Posts: 49
  • Rating: +0/-0
    • View Profile
Re: how to jump?
« Reply #37 on: December 22, 2011, 12:04:58 am »
can I see a screenie?

and did you try my code, minus a subroutine ^^
yes i tryed it but dont work lol and how can i do a screenie?

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: how to jump?
« Reply #38 on: December 22, 2011, 12:06:31 am »
you need wabbit emu....but lets fix this problem first, then I'll teach you that, Ok so can you post your full code? or is that too long?
My Sprites Thread   :Updated often :) for your viewing pleasure

GAMES:

Offline Cram

  • LV3 Member (Next: 100)
  • ***
  • Posts: 49
  • Rating: +0/-0
    • View Profile
Re: how to jump?
« Reply #39 on: December 22, 2011, 12:08:14 am »
ok but i will skip useless thing like graphism :P
« Last Edit: December 22, 2011, 12:08:54 am by Cram »

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: how to jump?
« Reply #40 on: December 22, 2011, 12:09:39 am »
I just need to see movement and displays
My Sprites Thread   :Updated often :) for your viewing pleasure

GAMES:

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: how to jump?
« Reply #41 on: December 22, 2011, 12:17:45 am »
Also welcome on the forums by the way :D

It will be a good idea to post the code so people can see what you are doing wrong. I personally cannot help, though, since I have barely coded in Axe. Also I suggest to not start straight away with a Mario clone, since it would be a ridiculous amount of work as first ever calc project. A platformer game with less features is fine, though. :)

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: how to jump?
« Reply #42 on: December 22, 2011, 12:19:00 am »
lol my first one was a mario clone...with a shotgun....lol Mario is such a common clone...A GOOD ONE though is a lot harder
My Sprites Thread   :Updated often :) for your viewing pleasure

GAMES:

Offline Cram

  • LV3 Member (Next: 100)
  • ***
  • Posts: 49
  • Rating: +0/-0
    • View Profile
Re: how to jump?
« Reply #43 on: December 22, 2011, 12:23:21 am »
Code: [Select]
0→r→d→z→j+43→y+27→x
0→w+27→u
15→v
repeat getkey(15)
if pxl-test(u-1,v+7)=1
return
end
sub(MMO)
if getkey(2) and (pxl-test(x,y+7)≠1)
x-1→x
if z=0
2→z
elseif z=2
0→z
end
elseif getkey(3) and (pxl-test(x+7,v+7)≠1)
x+1→x
if z=0
2→z
elseif z=2
0→z
end
end
if getkey(1) and pxl-test(x+5,y+8)
3→z
elseif getkey(4)
0→z
end
if getkey(54) and (pxl-test(x+2,y+8) or pxl-test(x+6,y+8)
15→j
1→z
end
if(j>0)
j-1→j
y-1→y
end
if(pxl-test(x+6,y+8) or pxl-test(x+2,y+8)=o and (j=0)
0→j
0→z
y+1→y
end
if y=49
return
end
pause 25
pt-change (x,y,z*8+pic0p1
dispgraph
pt-change (x,y,z*8+pic0p1
end

lbl mmo
pt-change(u,v,r*8+pic0M1
if u≥27 and w=0
u+1→u
elseif u≤62 and w=1
u-1→u
end
if u=27
0→w
elseif u=62
1→w
end
pt-change(u,v,r*8+pic-M1
return
i think everything is here
« Last Edit: December 22, 2011, 12:24:59 am by Cram »

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: how to jump?
« Reply #44 on: December 22, 2011, 12:24:00 am »
Oh I meant making a Super Mario Bros 1/2/3/World clone, literally. Some people get their calc and start straight with a full Mario port, then realize the project is beyond their programming experience then quit.