Author Topic: Random Effect  (Read 3543 times)

0 Members and 1 Guest are viewing this topic.

Offline Michael_Lee

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1019
  • Rating: +124/-9
    • View Profile
Random Effect
« 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
« Last Edit: December 12, 2010, 09:47:52 pm by Michael_Lee »
My website: Currently boring.

Projects:
Axe Interpreter
   > Core: Done
   > Memory: Need write code to add constants.
   > Graphics: Rewritten.  Needs to integrate sprites with constants.
   > IO: GetKey done.  Need to add mostly homescreen IO stuff.
Croquette:
   > Stomping bugs
   > Internet version: On hold until I can make my website less boring/broken.

SirCmpwn

  • Guest
Re: Random Effect
« Reply #1 on: December 12, 2010, 09:47:21 pm »
That's pretty cool!

Offline AngelFish

  • Is this my custom title?
  • Administrator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3242
  • Rating: +270/-27
  • I'm a Fishbot
    • View Profile
Re: Random Effect
« Reply #2 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.
∂²Ψ    -(2m(V(x)-E)Ψ
---  = -------------
∂x²        ℏ²Ψ

Offline Michael_Lee

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1019
  • Rating: +124/-9
    • View Profile
Re: Random Effect
« Reply #3 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.
My website: Currently boring.

Projects:
Axe Interpreter
   > Core: Done
   > Memory: Need write code to add constants.
   > Graphics: Rewritten.  Needs to integrate sprites with constants.
   > IO: GetKey done.  Need to add mostly homescreen IO stuff.
Croquette:
   > Stomping bugs
   > Internet version: On hold until I can make my website less boring/broken.

Offline meishe91

  • Super Ninja
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2946
  • Rating: +115/-11
    • View Profile
    • DeviantArt
Re: Random Effect
« Reply #4 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.
Spoiler For Spoiler:



For the 51st time, that is not my card! (Magic Joke)

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: Random Effect
« Reply #5 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?

Offline AngelFish

  • Is this my custom title?
  • Administrator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3242
  • Rating: +270/-27
  • I'm a Fishbot
    • View Profile
Re: Random Effect
« Reply #6 on: December 12, 2010, 11:58:21 pm »
Yeah, it's just reading pseudo-random data from the RAM.
∂²Ψ    -(2m(V(x)-E)Ψ
---  = -------------
∂x²        ℏ²Ψ

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: Random Effect
« Reply #7 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