Journeywar - Page 32

Journeywar

PicassoCT's stunning mixture of game design and psychedelia, for your enjoyment!

Moderators: Moderators, Content Developer

User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10450
Joined: 24 Jan 2006, 21:12

Re: Journeywar

Post by PicassoCT »

SpringFiles Admin deleted my pw-proctored alpha..
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: Journeywar

Post by smoth »

hoijui wrote:i think it is somehow possible to not flatten the ground for a building, which.. if i remember right, should be no problem if the building is not producing units.
should look better with this turret.
it is possible yes. levelGround
User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10450
Joined: 24 Jan 2006, 21:12

Re: Journeywar

Post by PicassoCT »

Argh, the laws of animation are a harsh misstress...

my strider doesent stop walking...

http://pastebin.com/tFdQAqDp

Infolog states:

Code: Select all

[f=0000278] LuaRules::RunCallIn: error = 2, CLuaUnitScript::StopMoving, not in a thread
I cant make head and tailes of this..
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6240
Joined: 29 Apr 2005, 01:14

Re: Journeywar

Post by FLOZi »

Certain callins are threaded, others are no. Animation calls can only be done in threaded functions (or was it particularly WaitForX and Sleep?).
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: Journeywar

Post by knorke »

Instead of Spring.UnitScript.Hide you can just write Hide.
Hiding empty pieces (like flares) has no effect anyway.
Animation calls can only be done in threaded functions (or was it particularly WaitForX and Sleep?).
I think it is the WaitFor and Sleep that must be in threads.

Code: Select all

function script.StopMoving()
                legs_down ()
end
This legs_down() uses WaitForTurn, so make it a thread but without a while (true) loop.
User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10450
Joined: 24 Jan 2006, 21:12

Re: Journeywar

Post by PicassoCT »

User avatar
hoijui
Former Engine Dev
Posts: 4344
Joined: 22 Sep 2007, 09:51

Re: Journeywar

Post by hoijui »

although i have no idea about animation scripts, it looks to me, as if you should add more steps to the animation, as in:
instead of moving the the leg by 30 degree every 30 frames, move it by 1 degree every frame (or something in-between).
User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10450
Joined: 24 Jan 2006, 21:12

Re: Journeywar

Post by PicassoCT »

But if you do it slow enough, it turns the leg slowly..

The real Problem is, that the animationscript doesent do as i say. I comend it to take a wide, outside step.

I mean, how does it extrapolate out of two animations as in the picture, this "I-need-to-Pee-Weemidiatly" stance ingame?
Image

The animation coordinates and pieces are in order.. i checked it, making my StreeWee do the dog-legliftup and the hitler-greeting.

Still, its very alpha, and its allready fun. You should see the soldiers flyin and dyin, when the warpcannon hits them.
Attachments
strider.jpg
(41.65 KiB) Downloaded 4 times
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: Journeywar

Post by knorke »

cool video. I like the part where the strider gets killed by a wizard hat!

in upspring left and right is mirroed.
left handed soldiers ftw :roll:

moving/turning works like
Turn (piece, axis, targetAngle, speed)
(if you leave out speed, it instantly snaps to the new angle/position.)
If you turn two pieces, one by 45┬░ and the other by 90┬░ you must rotate the 90┬░ piece at double the speed so that they finish movement at the same time.

It is also helpful to make some movement in sub functions.
allow Mister LavaLava to demonstrate:
Image

Code: Select all

function bounceThread ()
	Signal(SIG_BOUNCE)
    SetSignalMask(SIG_BOUNCE)
    while (true) do
		bounceTo (10,20)
		Sleep (500)
		bounceTo (0,20)
		Sleep (500)
    end
end
and bounceTo looks like this:
notice the bounceSpeed*3 on the hip, it moves three times faster than one of the 3 leg-telescope-secments:

Code: Select all

function bounceTo (bounceDist, bounceSpeed)
Move (hip, y_axis, -bounceDist*3, bounceSpeed*3)
	for i=1,6 do
		Move (legs[i], y_axis, bounceDist, bounceSpeed)
	end		
	WaitForMove (hip, y_axis)
end
Attachments
Neuer Ordner.zip
(781.77 KiB) Downloaded 15 times
User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10450
Joined: 24 Jan 2006, 21:12

Re: Journeywar

Post by PicassoCT »

strider walks and goes into WarpCanon Position...finally some headway.
User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10450
Joined: 24 Jan 2006, 21:12

Re: Journeywar

Post by PicassoCT »

and the headway is gone again: Im sorry, i worked the whole day on this animationscript.. and i still dont understand that concept of threats.. if i call a function, why does it have troubles executing it when sleep is inside

http://pastebin.com/ganUdUwD

Its a freaking mess. And while i got some info on what to fix out of the old- line something errors, i dont get anything out of this stop not in a thread messages!

Of course stop is not in a a thread. The Engine determinates when the walk is done, doesen it?!
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: Journeywar

Post by knorke »

normally the script is executed line by line
1 do something
2 do this thing
3 do that thing
...

Now with threads you can make it run in multiple places at once.
Image
do all the things!

With StartThread you can "fork" the flow of the script: It continues where you called StartThread(wiggle) and it also continues in the function which name is given in the () of StartThread.
See how it is different from normally calling a function like wiggle()?

All that signal stuff is basically just to prevent the same thread-function running multiple times because that can cause problems. Otherwise one instance of your walk() function might want to move the right leg forward but there is another instance running which wants to move it backward.
User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10450
Joined: 24 Jan 2006, 21:12

Re: Journeywar

Post by PicassoCT »

Then why is it sometimes complaining that things i dont want in a thread- are not in in a thread.

For example, if i want walking to stop, its
stop_moving()
legs_down()
while(true) do
idle()
end
end

and suddenly all hell breaks loose. I fucking hate this. I wrote a 700 line animationscript, and not a single line in it works like i expected. 2 days wasted for near_no result -
Understand kivi and co for not using spring. This is a inverted, shivering, spasming nightmare.

sorry, little meltdown here
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6240
Joined: 29 Apr 2005, 01:14

Re: Journeywar

Post by FLOZi »

^

And yet some people say we don't need an Upspring replacement and assimp will solve all our woes. :lol:
User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10450
Joined: 24 Jan 2006, 21:12

Re: Journeywar

Post by PicassoCT »

DEATHANIMATION: THIS IS SUPPOSSED TO BE THE LAST THING TO DO- A LIST OF MOVES AND TURNS! AND IT IGNORES THE FUCKING LINES I WRITE. TURN 60┬░.

IT DOESENT TURN 60┬░.. IT DOES WHATEVER IT WANTS...

Doesent even matter if you enter idiotic values for christs sake. It just scrambles them anyway.

FLOZI DONT YOU DARE BE HAPPY IN THIS THREAD. NOT NOW. NOT FRIGGING NOW.

Why not replace every little more complex movescript with

Code: Select all

Turn(whatever_axis, math.rad(math.random(1,360), math.random(1,90))
There a fucking one liner, and its allready better than upspring.
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: Journeywar

Post by knorke »

accidently the whole browser by dropping my keys on the keyboard :roll:
but i re-opend it to say fuck i hope upspring dies in its ass.
Why not replace every little more complex movescript with Turn(whatever_axis, math.rad(math.random(1,360), math.random(1,90))
walk animation for the brick scorpion:

Code: Select all

for i=1,6 do			
  Turn (legs[i], z_axis, math.random(-1,1)*legA, legS)
end
close-enough.jpg

for the killed() animation try stopping all other threads so they do not interfer with the death animation.
User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10450
Joined: 24 Jan 2006, 21:12

Re: Journeywar

Post by PicassoCT »

X(
User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10450
Joined: 24 Jan 2006, 21:12

Re: Journeywar

Post by PicassoCT »

Man: Sometimes really creepy to watch once outbursts in retrospective. Sorry again.
User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10450
Joined: 24 Jan 2006, 21:12

Re: Journeywar

Post by PicassoCT »

Everything is stashed away safely in threads now..

Code: Select all

000219] /give tiglil
[f=0000219] Giving 1 tiglil to team 0
[f=0000329] stopped walking!
[f=0000329] [string "scripts/tiglilscript.lua"]:718: attempt to call global 'legs_down' (a nil value)
[f=0000329] stack traceback:
	[string "scripts/tiglilscript.lua"]:718: in function <[string "scripts/tiglilscript.lua"]:713>
[f=0000452] stopped walking!
[f=0000452] [string "scripts/tiglilscript.lua"]:718: attempt to call global 'legs_down' (a nil value)
[f=0000452] stack traceback:
	[string "scripts/tiglilscript.lua"]:718: in function <[string "scripts/tiglilscript.lua"]:713>
[f=0000509] stopped walking!
[f=0000509] [string "scripts/tiglilscript.lua"]:718: attempt to call global 'legs_down' (a nil value)
[f=0000509] stack traceback:
	[string "scripts/tiglilscript.lua"]:718: in function <[string "scripts/tiglilscript.lua"]:713>
[f=0000591] stopped walking!
[f=0000591] [string "scripts/tiglilscript.lua"]:718: attempt to call global 'legs_down' (a nil value)
[f=0000591] stack traceback:
	[string "scripts/tiglilscript.lua"]:718: in function <[string "scripts/tiglilscript.lua"]:713>
[f=0000673] stopped walking!
[f=0000673] [string "scripts/tiglilscript.lua"]:718: attempt to call global 'legs_down' (a nil value)
[f=0000673] stack traceback:
	[string "scripts/tiglilscript.lua"]:718: in function <[string "scripts/tiglilscript.lua"]:713>
[f=0000696] stopped walking!
[f=0000696] [string "scripts/tiglilscript.lua"]:718: attempt to call global 'legs_down' (a nil value)
[f=0000696] stack traceback:
	[string "scripts/tiglilscript.lua"]:718: in function <[string "scripts/tiglilscript.lua"]:713>
[f=0000900] stopped walking!
[f=0000900] [string "scripts/tiglilscript.lua"]:718: attempt to call global 'legs_down' (a nil value)
[f=0000900] stack traceback:
	[string "scripts/tiglilscript.lua"]:718: in function <[string "scripts/tiglilscript.lua"]:713>
[f=0000949] User exited
[f=0000949] Path cache hits 0 0%
[f=0000949] Path cache hits 0 0%
[f=0000949] Statistics for local connection:
Received: 2131 bytes
Sent: 9318 bytes
Any help appreciated - why is it all of the sudden wrong to call a function in a thread, that does nothing but reset the position.

SIGh

This aint fun.
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6240
Joined: 29 Apr 2005, 01:14

Re: Journeywar

Post by FLOZi »

legs_down declared before it is called?
Post Reply

Return to “Journeywar”