Project X Forums
http://px.worms2d.info/forum/

F.O.W Mole Fort Tactical
http://px.worms2d.info/forum/viewtopic.php?f=12&t=2083
Page 2 of 5

Author:  Resurrection [ Sat Jul 30, 2016 9:32 pm ]
Post subject:  Re: F.O.W Mole Fort Tactical

New update! Torch got an overhaul.
Both maps now allows 6 teams with 3 worms each as long as colors alternate.
Torch is now the right color without using 6 .png files. =)

Author:  Zed [ Sun Jul 31, 2016 1:57 am ]
Post subject:  Re: F.O.W Mole Fort Tactical

Very fun scheme, nice work!

Quote:
Fixed the Far Sight making you click twice, worked around it by Root->RetreatTimer = 1; It's not perfect but could not find any "EndTurn" function.

How do you turn regular sheep to aqua sheep? I get both kind in crates.


Endturn can be simulated by sending M_TURNEND message to GetCurrentWorm(), i think.
Code:
   
             if(GetCurrentWorm() != NullObj)
{         
             CMessageData msgend;
             msgend.params[0] = GetCurrentWorm()->WormTeam;
             GetCurrentWorm()->Message(NullObj, M_TURNEND, 1032, &msgend);
}


Supersheep usually turned into aquasheep via regular scheme's settings. Weapon editor also has var "Chance in crate" altho i never tried that.

Author:  Resurrection [ Sun Jul 31, 2016 2:39 pm ]
Post subject:  Re: F.O.W Mole Fort Tactical

The GetCurrentWorm()->CanFire = false; was moved to FireFinal and now turn ends correctly.
SuperSheep spawn chance 0 and amount in crate is 0. Aqua Sheep still should spawn hopefully.

Author:  -raffie- [ Tue Aug 02, 2016 12:58 pm ]
Post subject:  Re: F.O.W Mole Fort Tactical

I saw in the lantern code that you override existing WA sprite in order to use the ColorMod, and so have to use AddSprite instead of AddSpriteEx, which doesn't allow rotation. But there is a simpler method to use ColorMod so you can still use AddSpriteEx. I've implemented it with white glow sprite and it works fine, ColorMod with beautiful rotating sprite :)

I also wanted to try to animate the torch fire sprite (think it would look great with animated fire in combination with the sparkle particles) but I see the torch sprite is 175 x 175px (same size as glow) so that would be a huge memory eater to make for example 6 frames (would be 175 x 1050px image :!: ). Should be possible to make the image 48 x 48px and place it in correct position in the code? Then I could animate the flame :)

Attachments:
lantern.rar [60.51 KiB]
Downloaded 570 times

Author:  Zed [ Thu Aug 04, 2016 11:26 am ]
Post subject:  Re: F.O.W Mole Fort Tactical

just found that CTurnGame has FinishTurn(int reason) function

Author:  Resurrection [ Thu Aug 04, 2016 10:27 pm ]
Post subject:  Re: F.O.W Mole Fort Tactical

-raffie- yeah the torch sprite was made this size because of glow. it's better to make it smaller and have two draw calls, one for the glow and the other for the torch. Even tough your math is correct, .png file format is compressing so the size difference will not be that big. for example 1x1px fully transparent .png is 16kb while a 40x40px one is 17kb.

Let me check on this tomorrow, i will release the new version with super mole included.

Author:  -raffie- [ Fri Aug 05, 2016 10:22 am ]
Post subject:  Re: F.O.W Mole Fort Tactical

Hehe of course you're right about PNG compression, I didn't mean file size, I'm talking about loading big (around 1000px is max, bigger sprites just disappear) sprites in game, if you load one or more sprites of about 1000px, it will start lagging the game. (at least on my configuration)

Author:  Resurrection [ Wed Aug 10, 2016 8:06 am ]
Post subject:  Re: F.O.W Mole Fort Tactical

There, now lantern is animated and tweaked particles.
Added SUPER mole bomb which is controllable in air.
Most of the things now glow in dark so you can scout with mole/sheep etc.

Does anyone wanna take screenshots of scheme for me to put on start page?

update: big map was broken. its now working and there are barrels everywhere, super fun. try it out!!

Author:  Resurrection [ Fri Aug 12, 2016 2:55 pm ]
Post subject:  Re: F.O.W Mole Fort Tactical

Fixed darkness lib so camera follows supersheep. Could be merged in to original darkness lib but decided to make it a new lib so it does not clash with old versions.
Added TeleArrow from cweps.
Removed super mole sprites, it now looks like normal mole. (until fix..)

Author:  Resurrection [ Sat Aug 13, 2016 4:58 pm ]
Post subject:  Re: F.O.W Mole Fort Tactical

Tried to add a mine that spawns when super mole explodes but it would cause desync. Or it might have been particles. (Are particles synced??)
I just followed code snippet on wiki.
Code:
void SpawnMineMole(int x, int y, int teamz)
{           
            CMineParams MParams;
            CShootDesc SDesc;
            zero(&MParams);
            zero(&SDesc);
            MParams.Prefuse = 0;  //time before ability to activate
            MParams.Flags = 60;    //flags of objects to react on
            MParams.Bias = 0;     //Y shift of explosion
            MParams.Damage = 29;  //damage
            MParams.BlastPower = 200;
            MParams.Fuse = 3000;
            MParams.Radius = 100;
            SDesc.Team = teamz;
            SDesc.X = x;
            SDesc.Y = y;
            SDesc.SpX = 0;   //speed
            SDesc.SpY = 0;
            local Mine = new CMine(Root->GetObject(25, 0), &MParams, &SDesc, false, 0);

 
}


Code:
CMissile::ExplodeAt...
SpawnMineMole(x,y, MagicMole->initdesc.Team);

Page 2 of 5 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/