Author Topic: TinyCraft II (name subject to change)  (Read 51421 times)

0 Members and 1 Guest are viewing this topic.

Offline stevon8ter

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 663
  • Rating: +10/-0
    • View Profile
Re: TinyCraft II (name subject to change)
« Reply #30 on: May 26, 2012, 01:02:48 pm »
It would indeed be nice if you could arrange that, some people say: ow i love to play without chickens, others say, i only want 1 because of the bugs, and then there's 2 more groups: people who don't mind playing with bugs and people who don't wanna play at all
None of my posts are meant offending... I you feel hurt by one of my posts, tell me ... So i can appoligise me and/or explain why i posted it


Hi there, I'm the allmighty (read as: stupid, weak...) STEVON8TER

Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: TinyCraft II (name subject to change)
« Reply #31 on: May 27, 2012, 03:19:03 am »
Ok, here is the code for the chickens.
I over commented it so you can understand what it does and optimise it if you want.
Of course, if you optimise it, it has to produce the exact same effect, and you would have to overcomment it too se I can see what you do (and you would get credits of course ;))

Something is also missing in that code: chickens can walk one on another.

Spoiler For Spoiler:
For(T,1,5)
   T*^^oWIDTH+V->V3
   {+2}^^r->V2-B->X
   {V3}^^r->V1-A->Y
   .V2 and V1 hold coordinates of chicken on map
   .X and Y hold coordinates of  chicken on LCD
   A+30>V1?A+30-V1,V1-A-30
   ->r1*r1->r1
   B+40>V2?B+40-V2,V2-B-40
   ->r2
   *r2+r1->r2
   .I am calculating sqrt( (A-V1)²+(B-V2)² )
   If sqrt(r2)<100
      .distance between player and chicken < 100 pixels
      !If TC^2
         .TC is a counter; the chicken only moves every 2 frames so you can run faster than him
         If X<88 and (Y<56)
            Pt-Off(X->Z,Y->theta,V3+4,L3+11)
            Pt-Off(X,Y,Str0)
            .erases the chicken on screen
         End
         .only erase it when it is on screen to not produce strange trails on the grass for no reason when its coordinates modulo something makes it appear as if on the screen
         If A+30>V1
            .can't just write Y<30 if the chicken is on the edge of the LCD
            .If the chicken is above you
            {V1-1/8*^^oWIDTH+(V2/8)+V}->r1=0 or (r1>2) or ({V1-1/8*^^oWIDTH+(V2+7/8)+V}->r1>2 or (r1=0))
            ??V1-1->V1-A->Y
            .If there is no tile to prevent him to go upwards, then he goes upwards
            V1->{V3}^^r
            .save his new coordinate in appvar
         Else
            .If A+30<V1
            .If the chicken is below you
            {V1+8/8*^^oWIDTH+(V2/8)+V}->r1=0 or (r1>2) or ({V1+8/8*^^oWIDTH+(V2+7/8)+V}->r1=0 or (r1>2))
            ??V1+1->V1-A->Y
            V1->{V3}^^r
         End
         If B+40>V2
            {V1/8*^^oWIDTH+(V2-1/8)+V}->r1=0 or (r1>2) or ({V1+7/8*^^oWIDTH+(V2-1/8)+V}->r1=0 or (r1>2))
            ??V2-1->V2-B->X
            V2->{V3+2}^^r
         Else
            .If B+40<V2
            {V1/8*^^oWIDTH+(V2+8/8)+V}->r1=0 or (r1>2) or ({V1+7/8*^^oWIDTH+(V2+8/8)+V}->r1=0 or (r1>2))
            ??V2+1->V2-B->X
            V2->{V3+2}^^r
         End
         pt-get(X,Y,L3,V3+4)
         .to erase chicken next time
      End
      If X<88 and (Y<56)
         .If on screen
         Pt-Mask(X,Y,B+40<V2*2*2*2*2+GDB1W+128)
         .draws the chicken
         .only if on screen in case sometimes with a modulo thing he appears to have coordinates "on screen" while he doesn't
      End
   End
End
« Last Edit: May 27, 2012, 03:45:01 am 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

Offline kindermoumoute

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 836
  • Rating: +54/-3
    • View Profile
Re: TinyCraft II (name subject to change)
« Reply #32 on: May 27, 2012, 04:18:47 am »
Je vois Plusieurs choses :
  • utilise la commande carré au lieu de r1*r1.
  • V1-1->V1 ==> V1-- (et pareil pour un V2+1 plus bas)
  • {V1+8/8*^^oWIDTH+(V2/8)+V}->r1=0 or (r1>2) or ({V1+8/8*^^oWIDTH+(V2+7/8)+V}->r1=0 or (r1>2)) ==>  {V1+8/8*^^oWIDTH +V->r1+(V2/8)}=0 or ({(V2+7/8)+r1}->r1=0) and (r1>2) (Il y a plusieurs opérations comme ça simplifiables)
  • Après j'ai d'autres idées mais ça rendra le code illisible. ;D

Projects :

Worms armageddon z80 :
- smoothscrolling Pixelmapping : 100%
- Map editor : 80%
- Game System : 0%

Tutoriel français sur l'Axe Parser
- 1ère partie : en ligne.
- 2ème partie : en ligne.
- 3ème partie : en ligne.
- 4ème partie : 10%
- Annexe : 100%

Offline stevon8ter

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 663
  • Rating: +10/-0
    • View Profile
Re: TinyCraft II (name subject to change)
« Reply #33 on: May 27, 2012, 05:21:51 am »
Holy shit man, that's way above my level, i don't use axe
None of my posts are meant offending... I you feel hurt by one of my posts, tell me ... So i can appoligise me and/or explain why i posted it


Hi there, I'm the allmighty (read as: stupid, weak...) STEVON8TER

Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: TinyCraft II (name subject to change)
« Reply #34 on: May 27, 2012, 05:33:54 am »
Holy shit man, that's way above my level, i don't use axe
Lol, I don't code optimized so it stays readable :)

Je vois Plusieurs choses :
  • utilise la commande carré au lieu de r1*r1.
  • V1-1->V1 ==> V1-- (et pareil pour un V2+1 plus bas)
  • {V1+8/8*^^oWIDTH+(V2/8)+V}->r1=0 or (r1>2) or ({V1+8/8*^^oWIDTH+(V2+7/8)+V}->r1=0 or (r1>2)) ==>  {V1+8/8*^^oWIDTH +V->r1+(V2/8)}=0 or ({(V2+7/8)+r1}->r1=0) and (r1>2) (Il y a plusieurs opérations comme ça simplifiables)
  • Après j'ai d'autres idées mais ça rendra le code illisible. ;D
(English topic ? :P)
Thanks :)
Just a question: does the square command work for "negative" numbers ?
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 kindermoumoute

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 836
  • Rating: +54/-3
    • View Profile
Re: TinyCraft II (name subject to change)
« Reply #35 on: May 27, 2012, 10:19:46 am »
I suppose. You can try it quickly. ^^
Projects :

Worms armageddon z80 :
- smoothscrolling Pixelmapping : 100%
- Map editor : 80%
- Game System : 0%

Tutoriel français sur l'Axe Parser
- 1ère partie : en ligne.
- 2ème partie : en ligne.
- 3ème partie : en ligne.
- 4ème partie : 10%
- Annexe : 100%

Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: TinyCraft II (name subject to change)
« Reply #36 on: May 27, 2012, 12:22:25 pm »
I suppose. You can try it quickly. ^^
It works greatly, thanks :D
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 stevon8ter

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 663
  • Rating: +10/-0
    • View Profile
Re: TinyCraft II (name subject to change)
« Reply #37 on: May 27, 2012, 12:35:11 pm »
Good news, i'm gonna download your project soon and then i'll give you a (probably possitive) feedback
None of my posts are meant offending... I you feel hurt by one of my posts, tell me ... So i can appoligise me and/or explain why i posted it


Hi there, I'm the allmighty (read as: stupid, weak...) STEVON8TER

Offline stevon8ter

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 663
  • Rating: +10/-0
    • View Profile
Re: TinyCraft II (name subject to change)
« Reply #38 on: May 27, 2012, 05:47:00 pm »
It rocks man, i tried it and it's just f-ing awesome, but what i noticed is: when i got close to one of the chickens it did only leave a little black trail, and that wasn't all the time
None of my posts are meant offending... I you feel hurt by one of my posts, tell me ... So i can appoligise me and/or explain why i posted it


Hi there, I'm the allmighty (read as: stupid, weak...) STEVON8TER

Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: TinyCraft II (name subject to change)
« Reply #39 on: May 28, 2012, 09:02:30 am »
It rocks man, i tried it and it's just f-ing awesome
Thanks :)

But what i noticed is: when i got close to one of the chickens it did only leave a little black trail, and that wasn't all the time.
A black trail or a grey trail ?
Also, I added something so that chickens can't go too close to other chickens. But there is another problem: see the poll I added.

Should chickens be transparents or white ?
-transparent is easier to make so it will not have trail problems and will be faster (I am worrying about speed for 83+BEs)
-white is a pain to code (see, they have trails) and slower to execute.

I personally vote for the fast option. If chickens are on sand, they seem white.
« Last Edit: May 28, 2012, 09:05:20 am 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

Offline stevon8ter

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 663
  • Rating: +10/-0
    • View Profile
Re: TinyCraft II (name subject to change)
« Reply #40 on: May 28, 2012, 11:13:38 am »
I think it was grey

And idk
None of my posts are meant offending... I you feel hurt by one of my posts, tell me ... So i can appoligise me and/or explain why i posted it


Hi there, I'm the allmighty (read as: stupid, weak...) STEVON8TER

Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: TinyCraft II (name subject to change)
« Reply #41 on: May 28, 2012, 11:22:17 am »
I think it was grey

And idk
If it was grey, it is "normal". It is just that something (maybe you ;)) was too close to him so he somehow included it in the tile he was walking on then, when he draw the tile back, there was something that should not have been here :)
It is fixed now as chickens can't go too close each one from each other.
But I still have problems with them when they are on the border of the screen, and that would be hard to fix without adding a lot of If statements, whiwh will decrease speed a lot on a 83+. This is why I added the poll.
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 Spyro543

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1189
  • Rating: +74/-3
    • View Profile
Re: TinyCraft II (name subject to change)
« Reply #42 on: May 28, 2012, 11:23:51 am »
I wanna see PIGGYS!!!!!1!!!!! :P
Well, the piggy's AI is kind of the opposite of the chicken's. The piggy actually wants to come toward the player.
I'm not sure about the cows or the sheep. I think they just wander around randomly, but IDK.

Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: TinyCraft II (name subject to change)
« Reply #43 on: May 28, 2012, 11:29:17 am »
I wanna see PIGGYS!!!!!1!!!!! :P
Well, the piggy's AI is kind of the opposite of the chicken's. The piggy actually wants to come toward the player.
I'm not sure about the cows or the sheep. I think they just wander around randomly, but IDK.
ok but transparent or white pigs ? :P

Sorry, but there mainly two problems with pigs :-\:
-a 8x8 sprite of a pig ???
-you can't eat anything on a pig without killing him (whereas a chicken gives eggs)

Btw, here is a screenshot of what a transparent chicken would look like on sand and on grass.
You see that is is not problematic at all on sand, so you just need to put all your chickens on a sand area
« Last Edit: May 28, 2012, 12:02:35 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

Offline Spyro543

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1189
  • Rating: +74/-3
    • View Profile
Re: TinyCraft II (name subject to change)
« Reply #44 on: May 28, 2012, 01:03:34 pm »
I haven't tried doing a piggy yet, but here's a sheep: