Omnimaga

Calculator Community => TI Calculators => Axe => Topic started by: Michael_Lee on December 12, 2010, 09:45:47 pm

Title: Random Effect
Post by: Michael_Lee on December 12, 2010, 09:45:47 pm
 :evillaugh:  Muhaha!  :evillaugh:
In Axe, if you mess up, you usually either clear your RAM or cause ugliness to appear on the screen.
However, this time, I messed up, but accidentally obtained a decent picture of a randomly generated scrolling cityscape!
(for the record, I was trying to make scrolling clouds, which I still haven't been able to do well   :banghead:)

Code: [Select]
([r] is the radians symbol)

.CITY
ClrDraw
ClrDraw[r]
Repeat getkey(15)
  DS<(A,10)
    Horizontal -[r]
  End
  For(B,0,5)
    B*4+L1->Z
    !If {Z}
      rand^21->{Z}->{Z+1}
      rand^65->{Z+2}
      3->{Z+3}
    End
    If {Z+1}
      {Z+1}-1->{Z+1}
      Rect(95,{Z+2},1,rand^{Z+3})[r]
      If {Z}-{Z-1}<4
        {Z+3}+1->{Z+3}
      ElseIf {Z-1}<4
        {Z+3}-1->{Z+3}
      End
    Else
      0->{Z}->{Z+1}->{Z+2}->{Z+3}
    End
  End
  DispGraph[r]
End
Title: Re: Random Effect
Post by: SirCmpwn on December 12, 2010, 09:47:21 pm
That's pretty cool!
Title: Re: Random Effect
Post by: AngelFish on December 12, 2010, 09:49:43 pm
That's pretty interesting, although it's obvious where it comes from. I could think of a game that might use this.
Title: Re: Random Effect
Post by: Michael_Lee on December 12, 2010, 09:53:22 pm
That's pretty interesting, although it's obvious where it comes from. I could think of a game that might use this.

I'm working on right now, actually, that's going to incorporate this as a background effect.
Title: Re: Random Effect
Post by: meishe91 on December 12, 2010, 10:00:12 pm
Thats pretty neat. The only thing that bothers me is the random little triangles sticking out but it still looks really sweet :) Good job.
Title: Re: Random Effect
Post by: DJ Omnimaga on December 12, 2010, 11:46:58 pm
This reminds me an intro of one of the Mega Man games. This is awesome for sure. Is it safe to use?
Title: Re: Random Effect
Post by: AngelFish on December 12, 2010, 11:58:21 pm
Yeah, it's just reading pseudo-random data from the RAM.
Title: Re: Random Effect
Post by: DJ Omnimaga on December 13, 2010, 01:46:37 am
Ah that's cool then. :)

I guess it uses a method similar to my sandstorm effect :D