Eufloria > Eufloria Classic Mods

Experimental Lab

<< < (18/19) > >>

annikk.exe:
Good point Aino. :>



--- Code: ---function LevelSetup()

a = AddAsteroidWithAttribs(50,50,1,1,1)
a:SetRadius(180)
a.Owner = 1
a:Reveal(1)

a = AddAsteroidWithAttribs(400,400,1,1,1)
a:SetRadius(180)
a.Owner = 2
a:Reveal(1)

end

function LevelLogic()

x = 0
y = 0
scale = 1000
speed = 3

while GameRunning() do

input = GetGameTime() / speed

x = math.cos(input) * scale
y = math.sin(input) * scale

GetAsteroid(0).position.x = x
GetAsteroid(0).position.y = y

coroutine.yield()
end

end
--- End code ---

How about that? :>

Tomfloria:
Nope, doesn't work haha, shows the same thing as last time, Two asteroids XD

annikk.exe:
Yep so asteroid movement does not work on iPad.  Shame, hopefully that will be changed eventually.

Lost Seedling:
I'm experimenting with an idea for a map, but am unsure if it is worth pursuing due to an early problem. I'd like some input.

I want to enable the player to drag and drop icons onto asteroids to affect the game-play. Unfortunately, I'm having performance issues with the icons failing to follow the cursor efficiently. I'm not sure if the problem is with my computer speed, my mouse, my code, or just a limitation with the game itself.

If anyone is interested, please run the attached sample and try dragging the spheres around and dropping them on the asteroid or anywhere. For me, in order for the icon to track smoothly, I have to move the cursor rather slowly, otherwise it "drops" the sphere, and I'm not sure if this limitation would be satisfactory for actual game-play. Please let me know how it works on your computer and if you think it is too slow or erratic to be practical. Ideally, the icon would follow the cursor regardless of how fast the mouse is moved.

I don't want to waste time on this idea if it isn't practical.

Thanks!

(我希望我能說中國話)

Pilchard123:
I haven't looked at the code, but could you do something like:

OnMouseDown(){
  if (over an icon){
    selected icon = the icon that was clicked
  }
}

OnMouseUp(){
  if (selected icon~=nil){
    if (mousepos over asteroid){
      //do asteroid + icon things
    }
    selected icon = nil
  }
}

while GameRunning() do {
    if(selected icon ~= nil){
      //draw selected icon at mouse position
    }
}

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version