Wyrmsun

Wyrmsun is an RTS / Grand Strategy game which features elements of mythology, history and fiction.
User avatar
Kyran
Posts: 499
Joined: Sat Dec 31, 2011 5:19 pm
Location: Australia
Contact:

Re: Wyrmsun

Postby Kyran » Wed Dec 18, 2013 5:42 pm

b_o wrote:A lot of the AT sprites seem like they only need some repair (a few more shades and some slight adjustments, I might be able to help with that).
A lot of the AT sprites just need to be thrown away. :D
04:27 jim4 why haven't you added wc1 support? this project sucks. i'm only going to use freecraft
05:06 jim4 finished wc1 support yet? i've been waiting for 6 years
05:10 jim4 new things scare me
User avatar
b_o
Posts: 328
Joined: Sun Jan 01, 2012 12:07 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: Wyrmsun

Postby b_o » Wed Dec 18, 2013 5:59 pm

Kyran wrote:A lot of the AT sprites just need to be thrown away. :D
The ones with the wrong angle might be more work to fix than they are worth.. but some of the stuff seems salvageable:
atd.png
atd.png (1.91 KiB) Viewed 5964 times
User avatar
Kyran
Posts: 499
Joined: Sat Dec 31, 2011 5:19 pm
Location: Australia
Contact:

Re: Wyrmsun

Postby Kyran » Wed Dec 18, 2013 9:13 pm

An interesting idea. The AT footman doesn't look quite right, but if it were scaled down a little on the Y axis to be the same pixel height of the Wargus footman, I think it would look much better. Put the AT and Wargus footmen side by side to see what I mean.
Attachments
footman.png
footman.png (32.91 KiB) Viewed 5961 times
04:27 jim4 why haven't you added wc1 support? this project sucks. i'm only going to use freecraft
05:06 jim4 finished wc1 support yet? i've been waiting for 6 years
05:10 jim4 new things scare me
User avatar
cybermind
Posts: 110
Joined: Sat Dec 31, 2011 11:43 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: Wyrmsun

Postby cybermind » Wed Dec 18, 2013 11:45 pm

Andrettin wrote:"big fire" and "small fire" effects
I think there is no need for that. Stratagus now has a particle system, so you can use it to create more beautiful effects for fire.
User avatar
Andrettin
Posts: 433
Joined: Sun Jun 30, 2013 9:58 pm
Location: Vienna, Austria
Contact:

Re: Wyrmsun

Postby Andrettin » Thu Dec 19, 2013 2:57 am

b_o wrote:
Kyran wrote:A lot of the AT sprites just need to be thrown away. :D
The ones with the wrong angle might be more work to fix than they are worth.. but some of the stuff seems salvageable:
atd.png
Yes, it seems to me that many of the humanoid units in AT are in the wrong angle (many of them look isometric instead of having the angle WC2 units do). The mechanical units seem to be in a better state, and would probably take less work to improve. For instance, these two units:

Image

Image

They are both in a proper angle, and are in decent shape already, although they could be improved a bit (for instance: the ballista's "body" is a bit too small, both the strings and the team-colored parts are not shaded at all and maybe the coloring of the ballista could be improved; the ballista bolt in the unit's graphics is nice, but it doesn't match with the ballista bolt missile).
User avatar
Andrettin
Posts: 433
Joined: Sun Jun 30, 2013 9:58 pm
Location: Vienna, Austria
Contact:

Re: Wyrmsun

Postby Andrettin » Thu Dec 19, 2013 2:58 am

cybermind wrote:
Andrettin wrote:"big fire" and "small fire" effects
I think there is no need for that. Stratagus now has a particle system, so you can use it to create more beautiful effects for fire.
Is there anywhere I can see an example of the particle system being used?
User avatar
cybermind
Posts: 110
Joined: Sat Dec 31, 2011 11:43 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: Wyrmsun

Postby cybermind » Thu Dec 19, 2013 3:16 am

Andrettin wrote:Is there anywhere I can see an example of the particle system being used?
Currently there are 2 games on Stratagus which use particle system: Bos Wars and Doom Wars.
How it could be used:
1) define a particle:

Code: Select all

particle_building_smoke = {}
particle_building_smoke_light = {}

for i = 1, 4 do
  particle_building_smoke[i] = LoadGraphic("graphics/missiles/particles/buildingsmoke"..i..".png", 16, 15)
  particle_building_smoke_light[i] = LoadGraphic("graphics/missiles/particles/buildingsmoke"..(i + 4)..".png", 16, 15)
end

function addChunkParticles(amount, smokegraphic, debrisgraphic, ticksperframe1, ticksperframe2,
	x, y, minvel, maxvel, minangle, maxTTL, destroyparticle, ticksperframe3, dlDeb, dlSmok, dlDest)
	local smokeanimation = GraphicAnimation(smokegraphic, ticksperframe1)
	local debrisanimation = nil
	local destroyanimation = nil
	if (debrisgraphic ~= nil) then
		debrisanimation = GraphicAnimation(debrisgraphic, ticksperframe2)
	else
		debrisanimation = GraphicAnimation(nullgraphics, 1)
	end
	if (destroyparticle ~= nil) then
		destroyanimation = GraphicAnimation(destroyparticle, ticksperframe3)
	else
		destroyanimation = GraphicAnimation(nullgraphics, 1)
	end
	for i = 1, amount do
		local chunk = CChunkParticle(CPosition(x, y), smokeanimation, debrisanimation, destroyanimation, minvel, maxvel, minangle, maxTTL, dlDeb)
		chunk:setSmokeDrawLevel(dlSmok)
		chunk:setDestroyDrawLevel(dlDest)
		ParticleManager:add(chunk:clone())
	end
end

function addSmokeParticle(graphic, ticksperframe, x, y, speedx, speedy, drawlevel)
   local smokeanimation = GraphicAnimation(graphic, ticksperframe)
   local smoke = CSmokeParticle(CPosition(x, y), smokeanimation, speedx, speedy, drawlevel)
   ParticleManager:add(smoke:clone())
end
2) define a unit lua handler function:

Code: Select all

DefineUnitType("unit-tech-center", { 
................................
  OnEachCycle = SmokeControlTechCenter,
........................................
 } )
3) define that function and write whatever you want in it

Code: Select all

function ParticleBuildingSmoke(x, y)
	addSmokeParticle(pickRandom(particle_building_smoke_light), 150, x + math.random(4) - 2, y + math.random(4) - 2, 2 + math.random(8), -15 - math.random(15), drawLevels.DL_PartGround)
end

function SmokeControlTechCenter(slot)
	if (GetUnitVariable(slot,"HitPoints","Value") * 100 / GetUnitVariable(slot,"HitPoints","Max") <= 50) 
	 and GetUnitVariable(slot,"SmokeTime") > 0 then
		SetUnitVariable(slot,"SmokeBreak", GetUnitVariable(slot,"SmokeBreak") + 1)
		if GetUnitVariable(slot,"SmokeBreak") == 8 then
			SetUnitVariable(slot,"SmokeBreak", 0)
			local x = GetUnitVariable(slot, "PosX") * 32
			local y = GetUnitVariable(slot, "PosY") * 32
			ParticleBuildingSmoke(x + 85, y + 81)
			if math.random(100) >= 95 then
				addChunkParticles(1, pickRandom(particle_building_smoke), pickRandom(particle_building_parts), 150, 100, x + 85, y + 81, 0, 400, 77, 0, nil, 0, drawLevels.DL_PartGround, drawLevels.DL_PartLow, drawLevels.DL_PartLow)
			end
		end
	end
end

How that looks like in Doom Wars:
Image
User avatar
Andrettin
Posts: 433
Joined: Sun Jun 30, 2013 9:58 pm
Location: Vienna, Austria
Contact:

Re: Wyrmsun

Postby Andrettin » Thu Dec 19, 2013 3:29 am

cybermind wrote:
Andrettin wrote:Is there anywhere I can see an example of the particle system being used?
Currently there are 2 games on Stratagus which use particle system: Bos Wars and Doom Wars.
How it could be used:
1) define a particle:

Code: Select all

particle_building_smoke = {}
particle_building_smoke_light = {}

for i = 1, 4 do
  particle_building_smoke[i] = LoadGraphic("graphics/missiles/particles/buildingsmoke"..i..".png", 16, 15)
  particle_building_smoke_light[i] = LoadGraphic("graphics/missiles/particles/buildingsmoke"..(i + 4)..".png", 16, 15)
end

function addChunkParticles(amount, smokegraphic, debrisgraphic, ticksperframe1, ticksperframe2,
	x, y, minvel, maxvel, minangle, maxTTL, destroyparticle, ticksperframe3, dlDeb, dlSmok, dlDest)
	local smokeanimation = GraphicAnimation(smokegraphic, ticksperframe1)
	local debrisanimation = nil
	local destroyanimation = nil
	if (debrisgraphic ~= nil) then
		debrisanimation = GraphicAnimation(debrisgraphic, ticksperframe2)
	else
		debrisanimation = GraphicAnimation(nullgraphics, 1)
	end
	if (destroyparticle ~= nil) then
		destroyanimation = GraphicAnimation(destroyparticle, ticksperframe3)
	else
		destroyanimation = GraphicAnimation(nullgraphics, 1)
	end
	for i = 1, amount do
		local chunk = CChunkParticle(CPosition(x, y), smokeanimation, debrisanimation, destroyanimation, minvel, maxvel, minangle, maxTTL, dlDeb)
		chunk:setSmokeDrawLevel(dlSmok)
		chunk:setDestroyDrawLevel(dlDest)
		ParticleManager:add(chunk:clone())
	end
end

function addSmokeParticle(graphic, ticksperframe, x, y, speedx, speedy, drawlevel)
   local smokeanimation = GraphicAnimation(graphic, ticksperframe)
   local smoke = CSmokeParticle(CPosition(x, y), smokeanimation, speedx, speedy, drawlevel)
   ParticleManager:add(smoke:clone())
end
2) define a unit lua handler function:

Code: Select all

DefineUnitType("unit-tech-center", { 
................................
  OnEachCycle = SmokeControlTechCenter,
........................................
 } )
3) define that function and write whatever you want in it

Code: Select all

function ParticleBuildingSmoke(x, y)
	addSmokeParticle(pickRandom(particle_building_smoke_light), 150, x + math.random(4) - 2, y + math.random(4) - 2, 2 + math.random(8), -15 - math.random(15), drawLevels.DL_PartGround)
end

function SmokeControlTechCenter(slot)
	if (GetUnitVariable(slot,"HitPoints","Value") * 100 / GetUnitVariable(slot,"HitPoints","Max") <= 50) 
	 and GetUnitVariable(slot,"SmokeTime") > 0 then
		SetUnitVariable(slot,"SmokeBreak", GetUnitVariable(slot,"SmokeBreak") + 1)
		if GetUnitVariable(slot,"SmokeBreak") == 8 then
			SetUnitVariable(slot,"SmokeBreak", 0)
			local x = GetUnitVariable(slot, "PosX") * 32
			local y = GetUnitVariable(slot, "PosY") * 32
			ParticleBuildingSmoke(x + 85, y + 81)
			if math.random(100) >= 95 then
				addChunkParticles(1, pickRandom(particle_building_smoke), pickRandom(particle_building_parts), 150, 100, x + 85, y + 81, 0, 400, 77, 0, nil, 0, drawLevels.DL_PartGround, drawLevels.DL_PartLow, drawLevels.DL_PartLow)
			end
		end
	end
end

How that looks like in Doom Wars:
Image
Hey cybermind,

thanks for the explanation! :)
User avatar
jarod42
Posts: 101
Joined: Fri Jan 20, 2012 7:43 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: Wyrmsun

Postby jarod42 » Fri Dec 20, 2013 10:11 am

@cybermind: if not done, can you add it in the help documentation. thanks.
User avatar
Zed
Posts: 1
Joined: Sat Nov 23, 2013 12:00 pm
Location: Brazil
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: Wyrmsun

Postby Zed » Fri Dec 20, 2013 1:17 pm

jarod42 wrote:@cybermind: if not done, can you add it in the help documentation. thanks.
That wouldn't be in the Stratagus spirit.

[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Who is online

Users browsing this forum: No registered users and 1 guest