Eufloria > Eufloria Classic Mods

Experimental Lab

(1/19) > >>

Aino:
Ok, making a new topic for: Experimentation! Ok, so you can just goa round experiementing with cool codes and stuff and keep it for yourself... Or you can post the cool code here! I hope that we in the end will end up with tons of ways to make stuff :D

So I'll add all the codes that is presented under this spoiler button :)
(click to show/hide)

--- Quote from: Aino ---

--- Quote from: Strange "Thing": ---Code:

--- Code: ---for i = 1,100 do
DrawSprite(1,math.cos(GetGameTime()*(math.pi/i))*(i*10),math.sin(GetGameTime()*(math.pi/i))*(i*10),1,1,1,1,10)
end
--- End code ---
Info:
Makes a strange kind of "thing"... All the dots will circle around the mid point and the one closest go fast around and the one with the longest distance(or is the end of the for loop) will go extremely slow... Test it :D
--- End quote ---


--- Quote from: Radar Sweep: ---Code:

--- Code: ---for i = 1,100 do
DrawSprite(1,math.cos(GetGameTime()*math.pi)*(i*10),math.sin(GetGameTime()*math.pi)*(i*10),1,1,1,1,10)
end
--- End code ---
Info:
Makes a line which circles around one point like a radar sweep...
--- End quote ---


--- Quote from: MouseX/Y ---Tracks the mouse position on the level, pretty useful and brings new stuff to make :)


--- Code: ---function GetMouseX()

return(GetCameraX()+(((GetMouseScreenX()-(GetScreenWidth()/2)))*GetCameraZoom()))

end

function GetMouseY()

return(GetCameraY()+(((GetMouseScreenY()-GetScreenHeight()/2))*GetCameraZoom()))

end
--- End code ---

Note: It is used just like GetGameTime() and GetNumSeedling() and all the other functions, you can put it straight into the calculations :)

--- End quote ---

--- End quote ---



Sorry if the quotes annoy you!!!


So I hope you find this either useful or funny :)

P.S Post your experiements here :D

dragoonreas:
You could make some interesting maps if you used either of those code snippets to position your asteroids. :)

I noticed a small error when I was testing the radar sweep code. You seem to have missed the closing bracket for math.cos, which looks like it's supposed to go after math.pi.

Also, for the Strange "Thing" (which looks a lot like a vortex to me), you might want to seed the positions with something other than just the result of GetGameTime(). I wasn't actually testing your code in Eufloria (so I may be wrong here), but if GetGameTime() always starts at 0 you could use the system time instead so that the things you're positioning don't just start out in one straight line.

Aino:
They don 't "start" in a straight line I belive, but they do seem to, maybe because GetGameTime() is faster than your eyes?

Aino:
Added GetMouseX() and GetMouseY()... maybe A&R should add it themself(just sayin' :))

Lost Seedling:
I was playing around with some of Annikk's mathematics and made a hypnotic screensaver.

It's fun to tweak the graphics.

Attached is a more 3D-looking version.

Navigation

[0] Message Index

[#] Next page

Go to full version