Project X Forums



It is currently Thu Mar 28, 2024 5:58 pm

All times are UTC




Post new topic Reply to topic  [ 48 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next
Author Message
 Post subject: Re: F.O.W Mole Fort Tactical
PostPosted: Sat Jul 30, 2016 9:32 pm 
Offline
User avatar

Joined: Mon Aug 31, 2015 5:28 pm
Posts: 74
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. =)


Top
 Profile  
Reply with quote  
 Post subject: Re: F.O.W Mole Fort Tactical
PostPosted: Sun Jul 31, 2016 1:57 am 
Offline
Betatester

Joined: Fri Oct 16, 2009 3:26 pm
Posts: 155
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.

_________________
Skype - verygooder1
ICQ - 420622934
Steam - http://steamcommunity.com/id/jarent/

use steam coz im too lazy to log into icq and skype


Top
 Profile  
Reply with quote  
 Post subject: Re: F.O.W Mole Fort Tactical
PostPosted: Sun Jul 31, 2016 2:39 pm 
Offline
User avatar

Joined: Mon Aug 31, 2015 5:28 pm
Posts: 74
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.


Top
 Profile  
Reply with quote  
 Post subject: Re: F.O.W Mole Fort Tactical
PostPosted: Tue Aug 02, 2016 12:58 pm 
Offline

Joined: Mon Jul 30, 2012 9:45 am
Posts: 194
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 550 times

_________________
http://twitch.tv/wormsdotam | http://worms.am/hl | http://worms.am/zombieshopper | http://worms.am/golf | http://worms.am/holywar
Top
 Profile  
Reply with quote  
 Post subject: Re: F.O.W Mole Fort Tactical
PostPosted: Thu Aug 04, 2016 11:26 am 
Offline
Betatester

Joined: Fri Oct 16, 2009 3:26 pm
Posts: 155
just found that CTurnGame has FinishTurn(int reason) function

_________________
Skype - verygooder1
ICQ - 420622934
Steam - http://steamcommunity.com/id/jarent/

use steam coz im too lazy to log into icq and skype


Top
 Profile  
Reply with quote  
 Post subject: Re: F.O.W Mole Fort Tactical
PostPosted: Thu Aug 04, 2016 10:27 pm 
Offline
User avatar

Joined: Mon Aug 31, 2015 5:28 pm
Posts: 74
-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.


Top
 Profile  
Reply with quote  
 Post subject: Re: F.O.W Mole Fort Tactical
PostPosted: Fri Aug 05, 2016 10:22 am 
Offline

Joined: Mon Jul 30, 2012 9:45 am
Posts: 194
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)

_________________
http://twitch.tv/wormsdotam | http://worms.am/hl | http://worms.am/zombieshopper | http://worms.am/golf | http://worms.am/holywar


Top
 Profile  
Reply with quote  
 Post subject: Re: F.O.W Mole Fort Tactical
PostPosted: Wed Aug 10, 2016 8:06 am 
Offline
User avatar

Joined: Mon Aug 31, 2015 5:28 pm
Posts: 74
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!!


Top
 Profile  
Reply with quote  
 Post subject: Re: F.O.W Mole Fort Tactical
PostPosted: Fri Aug 12, 2016 2:55 pm 
Offline
User avatar

Joined: Mon Aug 31, 2015 5:28 pm
Posts: 74
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..)


Top
 Profile  
Reply with quote  
 Post subject: Re: F.O.W Mole Fort Tactical
PostPosted: Sat Aug 13, 2016 4:58 pm 
Offline
User avatar

Joined: Mon Aug 31, 2015 5:28 pm
Posts: 74
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);


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 48 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 23 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Skin by Lucas Kane