Water wakes

Water wakes

Discuss game development here, from a distinct game project to an accessible third-party mutator, down to the interaction and design of individual units if you like.

Moderator: Moderators

Post Reply
User avatar
Tiberium
Posts: 18
Joined: 29 Jun 2012, 19:42

Water wakes

Post by Tiberium »

How do you add water wakes to boats :oops:

Seems all the cool mods have 'em and i cant figure out how there done its like im missing a part thats built in i cant find anything in any mod folder except these:

wake.tga - Placed in bitmaps/gpl

wake='GPL/wake.png', added to resources - had to add this as i built on the tutorial game.

now my animation file has:
local wake1, wake2 = piece('fanl', 'fanr')
SFXTYPE_WAKE1 = 2

local function Wake()
Signal(SIG_Move)
SetSignalMask(SIG_Move)
while true do
Spring.Echo("Do you see it yet :/") -- didnt think so
EmitSfx( wake1, 2 )
EmitSfx( wake2, 2 )
Sleep( 200)
end
end

Which is called when the boat moves i do get the Echo so i got no idea why its not showing is this a built in effect or is there somewhere i need to declare the wake effect? like a CEG maybe? i also looked at other mods for any wake CEGs couldnt find anything even tried someone elses unit/model and animation to see if it was mine that was the problem :( could it be i need to depend or include something?
luckywaldo7
Posts: 1398
Joined: 17 Sep 2008, 04:36

Re: Water wakes

Post by luckywaldo7 »

Change

Code: Select all

EmitSfx( wake1, 2 )
EmitSfx( wake2, 2 )
to

Code: Select all

EmitSfx( wake1, SFX.WAKE )
EmitSfx( wake2, SFX.WAKE )
That should use your wake texture for the default expanding-texture type of wake effect.

Writting your own ceg will give you a lot more control and let you make it nicer, but this should make it work at least.
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6241
Joined: 29 Apr 2005, 01:14

Re: Water wakes

Post by FLOZi »

SFX.WAKE == 2, waldo.

Are the wake emitting pieces just blank?

There should be no need to overwrite wake.tga or add to resources.lua (if you are using the 'automatic' one which is recommended)
User avatar
Deadnight Warrior
Posts: 183
Joined: 08 Jun 2009, 17:59

Re: Water wakes

Post by Deadnight Warrior »

Tiberium wrote:wake.tga - Placed in bitmaps/gpl

wake='GPL/wake.png', added to resources - had to add this as i built on the tutorial game.
The wake.tga is present in spring/base/spring/bitmaps.sdz so you don't need to add it to your project.
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: Water wakes

Post by knorke »

just tested and just EmitSfx( bla, SFX.WAKE ) works.
seems stupid but did you make sure the effect is not obscured by the model? the effect is rather small.
User avatar
Tiberium
Posts: 18
Joined: 29 Jun 2012, 19:42

Re: Water wakes

Post by Tiberium »

thanks for the tips ive tried a few things and its still not working :?

i typed gibberish into the resources.lua and the game wont run if it cant find a graphic for wake so i know thats fine.

ive appled the EmitSfx( turret, SFX.WAKE ) to the turret to see it more clearly and well its not there i was expecting to see a greyish rectangle at least but nothing?

and since theres no CEG for it i dont see how i could mess it up this bad lol and even tried commenting out the resources wake=wake.tga and even that runs but no graphic or rectangle where it should be.

also i dont think its animation or the unit as i had took a unit,model,texture,animation from another game and even that doesnt work in my game is there anyway i can find out if wake is even SFX.WAKE is being ignored or not?
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: Water wakes

Post by knorke »

hm, maybe upload your mod?

I tested with this:
http://springrts.com/wiki/SpringTutorialGame
on one of the hovercraft.
It only required adding the emitsfx to script, no changes to resources.lua etc
User avatar
Tiberium
Posts: 18
Joined: 29 Jun 2012, 19:42

Re: Water wakes

Post by Tiberium »

i have no idea what im doing wrong but i downloaded your base tutorial game and under the script hovereffects.lua i changed all 3 EmitSfx tags to EmitSfx (body, SFX.WAKE)

when i played the game i build the Acid King from the factory i can use it fine just no water wake.

at this point im thinking theres something wrong with spring but zero-k boats are using water wakes just fine?

i also expect my project will work for you since i cant even make a tiny change and it work? i may install spring again to be sure
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: Water wakes

Post by knorke »

are you testing the unit over water?
User avatar
Tiberium
Posts: 18
Joined: 29 Jun 2012, 19:42

Re: Water wakes

Post by Tiberium »

Haha yes i was ive tried all different boat models too so it wasnt just my own one not working very strange tho im re installing incase i somehow mangled the original spring defaults

Edit: unfourtunatly still the same :(
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: Water wakes

Post by knorke »

the "gun boat" in your mod has waves for me.
on map Ternion.
User avatar
Tiberium
Posts: 18
Joined: 29 Jun 2012, 19:42

Re: Water wakes

Post by Tiberium »

ok thanks for trying that so thats good to know it does indeed work i just tried downloading that map and still the boat does not emit that damn wake.

at least i can rule my game out as the problem i got no idea what to try?

could you take a pic so i could see what it does look like :P
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: Water wakes

Post by knorke »

BA ships still have wakes?
If not, maybe particle count is too low maybe?

Image
User avatar
Tiberium
Posts: 18
Joined: 29 Jun 2012, 19:42

Re: Water wakes

Post by Tiberium »

:oops: i think i got it apparently they dont work in dynamic for me but zero-k does very strange? but the other water options are showing it and also it was set to dynamic as standard? what setting do you have?
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: Water wakes

Post by knorke »

screenshot is /water 0 but i actually tried all settings. (all worked)
might be a bug.
User avatar
Tiberium
Posts: 18
Joined: 29 Jun 2012, 19:42

Re: Water wakes

Post by Tiberium »

Ok thanks alot for helping me clear this up gonna try and update driver and mess with settings failure to achieve i will have to choose another water type its not so bad but i will miss those ripples when rockets hit the water :(
Kloot
Spring Developer
Posts: 1867
Joined: 08 Oct 2006, 16:58

Re: Water wakes

Post by Kloot »

note there is a bug in /water 2 that can cause wakes to not show up for ships with deep waterlines (fixed for 89.0)
User avatar
Tiberium
Posts: 18
Joined: 29 Jun 2012, 19:42

Re: Water wakes

Post by Tiberium »

ah it would be that then thanks for letting me know :-) glad its fixed in the mean time im just using a CEG to make the wake
User avatar
hoijui
Former Engine Dev
Posts: 4344
Joined: 22 Sep 2007, 09:51

Re: Water wakes

Post by hoijui »

you chould try with this spring build:
http://springrts.com/wiki/Download_Testing
if what you see is really what kloot suggested.
it would be fixed there.
Post Reply

Return to “Game Development”