Journeywar - Page 42

Journeywar

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

Moderators: Moderators, Content Developer

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

Re: Journeywar

Post by PicassoCT »

Attachments
video2.gif
(11.35 MiB) Downloaded 4 times
video4.gif
(820.61 KiB) Downloaded 4 times
User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10454
Joined: 24 Jan 2006, 21:12

Re: Journeywar

Post by PicassoCT »

Image

This are the spawncreatures of the shadowdancer.. (they work as radarblips and general distraction by nightmarishness)..
Attachments
raphi.jpg
(65.5 KiB) Downloaded 4 times
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: Journeywar

Post by knorke »

Here in my car
I feel safest of all
I can lock all my doors
It's the only way to live in cars!

also weeee, gifs in HD resolution :shock:
User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10454
Joined: 24 Jan 2006, 21:12

Re: Journeywar

Post by PicassoCT »

HD Gifs with waterstains on them. Never has bandwithbackstabbing handyCapped so many cellphones :D

Got to holy the 42
Image
Attachments
screen00303.jpg
(450.47 KiB) Downloaded 4 times
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: Journeywar

Post by knorke »

good luck i am on my iphone. gifs almost make it feel like flash!
I use this for gifs:
http://answers.springlobby.info/questio ... rom-spring
Tried many other software before and found it to be easiest and gives good results, no watermarks, good controll over filesize etc.

Btw the eyes of that fishthing look familiar..not sure what..
User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10454
Joined: 24 Jan 2006, 21:12

Re: Journeywar

Post by PicassoCT »

Yep i "AtlasShrugged" on the ghostdancer.. as its now the hippster Thing to do. Oh, Atlases, you propably never heard of them ;)

The unit will actually done by satan :D The concept is quite breathtaking :D Its basically.. the graphic representation of a horrortrip... its- one hit to death, but with chances... basically starts as 100% bulletproof and the chance of a lethal hit increases per second.. the problem is, every unit that shoots on it, gets speed set to zero.
Image
This is a RailGun. It Rails people into Nons.


Image
RailGun in Action:
http://www.youtube.com/watch?v=vCffpC5I67I
Attachments
cegtex.7z
(68.29 KiB) Downloaded 3 times
happyEastern.jpg
(1.4 MiB) Downloaded 4 times
wtf.jpg
(175.2 KiB) Downloaded 4 times
User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10454
Joined: 24 Jan 2006, 21:12

Re: Journeywar

Post by PicassoCT »

Needing some help here:

Code: Select all

function CaveInLoop()
	while(true) do 
	Spring.Echo("Terraformloop Active")
				while elementsInTable ~= 0 do
				Spring.Echo("table not empty")
				--get the randomized CaveInPoint
			
      			x=math.random(1,elementsInTable)
				Spring.Echo(elementsInTable)
						if terraFormTable[x][1]~= nil then
						xCaveIn=terraFormTable[x][1]
						Spring.Echo(xCaveIn)
						zCaveIn=(terraFormTable[x][2])
						Spring.Echo(zCaveIn)
						Spring.Echo(yCaveIn)
						yCaveIn=(terraFormTable[x][3])-math.random(0,4)
						--get Spring to set the Terrain on CaveIn
						Spring.Echo(yCaveIn)				
						
						Spring.SetHeightMapFunc(function(x,z,y)
					
								Spring.SetHeightMap(x,z,y,1)
					
						end,
						xCaveIn,
						zCaveIn,
						yCaveIn
						)
					
						
					
						table.remove(terraFormTable,x)
						elementsInTable=elementsInTable-1
						end
				end
	sleep=math.random(400,1200)
	Sleep(sleep)
	end
end
basically a loop which gets in a table precalculated points of the last railgun shot and then carves those into the landscape. Where did i go wrong? Sy and lua dont have a answer to this one, besides "the wiki knows it all".. googlefrog and knorke aint home.. so im asking here

http://www.youtube.com/watch?v=ZwCpVWtP0bk
Image
Attachments
butIfIworkAllDayOnTheBlueSk.jpg
(559.07 KiB) Downloaded 4 times
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: Journeywar

Post by knorke »

exploding zombies look cool.
basically a loop which gets in a table precalculated points of the last railgun shot and then carves those into the landscape.
dont understand what you mean..you want to create crater in shapes other than the circular holes spring does?
User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10454
Joined: 24 Jan 2006, 21:12

Re: Journeywar

Post by PicassoCT »

yep basically the railgun leaves craters shaped as lines. And as the ground is never really equal everywhere, the caveInValue is random.


I tried the examplecode yesterday.. and it definatly works, so the terraform system is not bugged but the way i hand over values into the function is wrong.

The drillTree.. lovingly called spacepotatoe.
Image
Attachments
spacePotatoe.jpg
(101.91 KiB) Downloaded 4 times
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: Journeywar

Post by knorke »

I found this old pastebin from a unitscript:
http://pastebin.com/B87GBpup

it makes the terrain under a units footprint form a wall inside the unit (so you other units can stand on top or w/e)

Anyway, to change the terrain at (x,z) by height it does:

Code: Select all

originaly = Spring.GetGroundOrigHeight (x,z)
Spring.SetHeightMapFunc (Spring.SetHeightMap, x,z, height+originaly)
not sure if could be simpler.
User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10454
Joined: 24 Jan 2006, 21:12

Re: Journeywar

Post by PicassoCT »

knorke wrote:I found this old pastebin from a unitscript:
http://pastebin.com/B87GBpup

it makes the terrain under a units footprint form a wall inside the unit (so you other units can stand on top or w/e)

Anyway, to change the terrain at (x,z) by height it does:

Code: Select all

originaly = Spring.GetGroundOrigHeight (x,z)
Spring.SetHeightMapFunc (Spring.SetHeightMap, x,z, height+originaly)
not sure if could be simpler.
It works now.. but i screwed it up mathwise.

slope=math.tan(math.deg(gHeading))

Spring.Echo("AddingaPoint",slope)

Code: Select all

x,z,zOfOld=0
	for i=15,range,1 do
	--calc point
	x=i+unitPosX
	z=(slope*x)+unitPosZ
	--modulu -if != yOfOld
			if zOfOld ~= (z-(z%1))then
			--getHeight add set point if height > unitPosX
			y=Spring.GetGroundHeight(x,z)
					if y > unitPosY then
					tempTable={}
					--add unitPosition
					tempTable[1]=x
					tempTable[2]=z
					tempTable[3]=y
					table.insert(terraFormTable,elementsInTable+1,tempTable)
					elementsInTable=elementsInTable+1
					
					--yOfOld =y
					end
			zOfOld=z
			end

	end
Well.. there is enough work otherwise. So now that this works. Time to get the Metalldiggester to run properly.

Image
Attachments
screen00312.JPG
the potato has landed, i repeat the potato has landed
(222.21 KiB) Downloaded 4 times
User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10454
Joined: 24 Jan 2006, 21:12

Re: Journeywar

Post by PicassoCT »

Well... as terraforming is expensive.. and i have many units doing it. I concluded packing all the terraforming into one gadget might be a good idea. So i programmed on a sort of LandLord Gadget. It collects the WaterHeightChanges and the Various Blended together HeightmapChanges (by DrillTrees and MetallDiggesters), computes a new Heightmap every 60 secs and applies the very same slowly.

And while iam at it, i also get the Efence Gadget done, it beeing basically a pathfinder, who getting units in circles, explores these "nodes" going out from the Wallbuilders, setting the explored nodes to "charged".

3 mins after i impemented this, the Dev Murphy is going to push finally_morph_Animations commit.. wow style Lava
Image
Image

Planning on using the distortion shadder over that.. if there ver was a shadder that fitted the occation better :D

One weekend went into that godamn volcano.. hope it was worth it in the end..
Image
Attachments
Volcan.jpg
(169.91 KiB) Downloaded 4 times
protoVolcano.jpg
(45.76 KiB) Downloaded 4 times
Wow_lava.jpg
Wow_lava.jpg (80.32 KiB) Viewed 2568 times
User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10454
Joined: 24 Jan 2006, 21:12

Re: Journeywar

Post by PicassoCT »

Just realised today what a mess jw is currently:
3 gadgets.. none of them working properly..
electrify gadget to electrify e-fences
terraformgadget (to apply mining excavations and mountains +waterlevel)
headcrab gadget-> suppossed to spawn the headcrabs (which should attack people (WHICH THEY DO), which then should turn into zombies (WHICH THEY DONT)

All praise be upon Satans BugFixer.. the one that searches the infolog for my wrongdoings.

Todo:
-- the volcano doesent work
--get the headcrabs to spawn..
--get some eruptionssounds for the volcano.. (maybe something like a dragonroar..)
--get in the other central buildings for the gameplay (those that enforce offensive gameplay (waterExtractor and waterGate))
--spend a week on refinements and bugfixxing
get..get..get
some sleep..
User avatar
Karl
Panzerstahl Developer
Posts: 746
Joined: 01 Apr 2010, 21:05

Re: Journeywar

Post by Karl »

It would be 200% percent looking much better when spring would finaly support properly animation and not that obsolete TA-ish "animation" which we have for YEARS!
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: Journeywar

Post by knorke »

(unfinished, could be fancier)

i stole headcrab idea and made this:

Code: Select all

local ZOMBO = "anything at all"

--config for killer,victim,zombie relation
local zomba = {
--when a scorpion kill a dude, the dude dies so hard he turns into a helicopter and converts to your team:
[UnitDefNames["tpscorpion"].id] = {[UnitDefNames["tpdude"].id] = {unit=UnitDefNames["tphubschrauber"].id, killerTeam=true,}, } ,

--when a tank is destroyed (no matter by what) a dude escapes from it, like the technicans in C&C:
[ZOMBO] = {[UnitDefNames["tptank"].id] = {unit=UnitDefNames["tpdude"].id, killerTeam=false,}, } ,

--jeep turns everything it kills into a new jeep (for its team)
[UnitDefNames["tpjeep"].id] = {unit=UnitDefNames["tpjeep"].id, killerTeam=true,} ,

--headcrab creates new headcrab when killing a dude: 
-- [UnitDefNames["headcrab"].id] = {[UnitDefNames["dude"].id] = {unit=UnitDefNames["headcrab"].id, killerTeam=true,}, } ,
}

function gadget:UnitDestroyed(unitID, unitDefID, teamID, attackerID, attackerDefID, attackerTeamID)
	local result = nil
	if (zomba[attackerDefID]) then
			if zomba[attackerDefID][unitDefID] then
				result = zomba[attackerDefID][unitDefID]		
		else
			result = zomba[attackerDefID]
		end
	end
	
	if (result==nil and zomba[ZOMBO]) then
		result = zomba[ZOMBO][unitDefID]
	end
	
	if (result) then
		local x,y,z = Spring.GetUnitPosition (unitID)
		if (result.killerTeam) then 
			teamID = attackerTeamID
		end
		Spring.CreateUnit (result.unit, x,y,z, 0, teamID)
	end
end
(that works if you replace unitnames and c&p the gadget:GetInfo() stuff on top)

can config it like this:

Code: Select all

--when  this kills something, creates this:
--        v                            v
--zomba[attacker]             =     result

--also possible:
--when   this kills this creates this
--          v         v			   v
--zomba [attacker][victim]   =   result

--when something should turn into a new thing, no matter what killed it:
-- anything kills this creates this
--      v          v            v
--zomba[ZOMBO][victim] =     result

killerTeam = true / false
new unit is on killer's team or original team
User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10454
Joined: 24 Jan 2006, 21:12

Re: Journeywar

Post by PicassoCT »

im doing it right? Thanks knorke. Loads of work done better then my hax.

Code: Select all

function gadget:GetInfo()
  return {
    name      = "OverHeadCrab",
    desc      = "",
    author    = "jK - always jk is there anyhting lua, that he didnt do long before you, making you look like a idiot in his fathers shoes. :(.
Haha, this time its mainly copied from knorke : )",
    date      = "Sep. 2008",
    license   = "GNU GPL, v2 or later",
    layer     = 0,
    enabled   = true,
  }
end


if (gadgetHandler:IsSyncedCode()) then

gaiaTeamID=Spring.GetGaiaTeamID()
local ZOMBO = "anything at all"
//This part sends them too hell

--config for killer,victim,zombie relation
local zomba = {
--when a scorpion kill a dude, the dude dies so hard he turns into a helicopter and converts to your team:
[UnitDefNames["headcrab"].id] = {[UnitDefNames["bg"].id] = {unit=UnitDefNames["zombie"].id, killerTeam=true,}, } ,
[UnitDefNames["headcrab"].id] = {[UnitDefNames["tiglil"].id] = {unit=UnitDefNames["zombie"].id, killerTeam=true,}, } ,
[UnitDefNames["headcrab"].id] = {[UnitDefNames["css"].id] = {unit=UnitDefNames["zombie"].id, killerTeam=true,}, } ,
[UnitDefNames["headcrab"].id] = {[UnitDefNames["skinfantry"].id] = {unit=UnitDefNames["zombie"].id, killerTeam=true,}, } ,

--when a tank is destroyed (no matter by what) a dude escapes from it, like the technicans in C&C:
[ZOMBO] = {[UnitDefNames["restrictor"].id] = {unit=UnitDefNames["bg"].id, killerTeam=false,}, } ,
[ZOMBO] = {[UnitDefNames["mtw"].id] = {unit=UnitDefNames["bg"].id, killerTeam=false,}, } ,
[ZOMBO] = {[UnitDefNames["ampro"].id] = {unit=UnitDefNames["bg"].id, killerTeam=false,}, } ,

--jeep turns everything it kills into a new jeep (for its team)
--[UnitDefNames["tpjeep"].id] = {unit=UnitDefNames["tpjeep"].id, killerTeam=true,} ,

--headcrab creates new headcrab when killing a dude:
-- [UnitDefNames["headcrab"].id] = {[UnitDefNames["dude"].id] = {unit=UnitDefNames["headcrab"].id, killerTeam=true,}, } ,
}

function gadget:UnitDestroyed(unitID, unitDefID, teamID, attackerID, attackerDefID, attackerTeamID)
   local result = nil
   if (zomba[attackerDefID]) then
         if zomba[attackerDefID][unitDefID] then
            result = zomba[attackerDefID][unitDefID]      
      else
         result = zomba[attackerDefID]
      end
   end
   
   if (result==nil and zomba[ZOMBO]) then
      result = zomba[ZOMBO][unitDefID]
   end
   
   if (result) then
      local x,y,z = Spring.GetUnitPosition (unitID)
      if (result.killerTeam) then
         teamID = gaiaTeamID
      end
      Spring.CreateUnit (result.unit, x,y,z, 0, teamID)
   end
end

//THis part watches for shell


  local headCrabWeapon = {}


  for i=1,#WeaponDefs do
    local wd = WeaponDefs[i]
	
    if (wd.description:find("HeadCrab-Shell"))  then
      Script.SetWatchWeapon(wd.id,true)
      headCrabWeapon[wd.id] = true
    end
  end




  function gadget:Explosion(weaponID, px, py, pz)
  if (headCrabWeapon[weaponID]) then
	  Spring.CreateUnit("hc",px,py,pz, 0, gaiaTeamID)  
  end
  
    return false
  end

 
end
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: Journeywar

Post by knorke »

nothing obvious too wrong with it..does it work?
for i=1,#WeaponDefs do
local wd = WeaponDefs
if (wd.description:find("HeadCrab-Shell")) then
can directly get the weapondefID like this:

Code: Select all

weapondefID = WeaponDefNames["HeadCrab-Shell"].id
Script.SetWatchWeapon(weapondefID , true)
and put it in gadget:Initialize(), having stuff (beside global declarations outside) is appearently bad. For example it won't allow the gadget to be disabled completly.
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: Journeywar

Post by knorke »

forgott that when when canceling unit contruction in a factory it calls UnitDestroyed. So add something like:

Code: Select all

function gadget:UnitDestroyed(unitID, unitDefID, teamID, attackerID, attackerDefID, attackerTeamID)
	if (not finishedUnits[unitID]) then return end
...
finishedUnits[unitID] = nil
end

--checking buildprogess==1 in UnitDestroyed does not work
local finishedUnits = {}
function gadget:UnitFinished(unitID, unitDefID, teamID)
	finishedUnits[unitID] = true
end
User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10454
Joined: 24 Jan 2006, 21:12

Re: Journeywar

Post by PicassoCT »

knorke wrote:forgott that when when canceling unit contruction in a factory it calls UnitDestroyed. So add something like:

Code: Select all

function gadget:UnitDestroyed(unitID, unitDefID, teamID, attackerID, attackerDefID, attackerTeamID)
	if (not finishedUnits[unitID]) then return end
...
finishedUnits[unitID] = nil
end

--checking buildprogess==1 in UnitDestroyed does not work
local finishedUnits = {}
function gadget:UnitFinished(unitID, unitDefID, teamID)
	finishedUnits[unitID] = true
end
? So, if a unit would be chanceled, a little guy would leave--> infinite infantry? but why does buildprogress not work- the unit still exists when this is called.

Also thx knorke. Your help is most appreciated.

Combine Building Debris..
Image
Attachments
SomeMBsForAFsEyesOnly.jpg
(1022.78 KiB) Downloaded 4 times
debris.jpg
(1.01 MiB) Downloaded 4 times
User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10454
Joined: 24 Jan 2006, 21:12

Re: Journeywar

Post by PicassoCT »

no recent posts due to reasons advances beeing to fast:
stuff that now works (ocassionaly):
Headcrabs finding bodys.. spawning zombies..
zombies attacking nearest enemys...
building leaving wreckages and running civilians..
civilians leaving dead bodys

also worked on the beanstalk growth animation... well it works, but the modell sucks.. goes back into the forge..
TodoList:
TerraInForm-Gadget -> Volcano
J-Shadow
J-Beherith
The Electricity Gadget
The spawn a Headcrab at shell impact Gadget (Yes, i suck at gadgetmaking-> recent Advances are mostly due to copying from jK and knorke)
the genericInfantryBody needs a new description "Memento Mori" would be fitting.

Hope they dont catch me- the Todo is redlisted

Image
Attachments
beanstalkgrowthan.jpg
(18.63 KiB) Downloaded 4 times
Post Reply

Return to “Journeywar”