This is my entry for the Halloween Game Tournament 2017
Behind Enemy Lines
Prolog:
You are Sergeant Cole, a member of a special unit that operates under cover. You and your comrades have the mission to destroy drug fields and facilitys for the production of drugs. .....
Keys
WASD = Moving
F = Flash light
N = Nightvision
T = Holster Weapon
E = Use
Space = Jump
F11 = Show stats
Note:
In the last weeks or month i work hard on this. Even if the work and the family takes me, as soon as I have time I continue to work on it.
Some Models are by my self, created with blender. These are not a masterpiece but .. now build your own opinion and tell it to me in this blog. Other models are from the usual Internet sites, where i looked for royalty free models. Also some sound - effects are by my self. For the music sound see the credits.
In the past weeks or months I have expanded my experience in Lua. I have mentioned it several times, but would like to do it at this point again. Thanks to Macklebee and AggrorJorn for your patience and help.It will not be the last time I contact you
Ok, now to the text writing.. this is also not a masterpiece and i have a lot of fine tuning to this because english is not my native language. Jorn has changed a lot, but as I said there is much to do here. So if you have tips or help, the help is in any case welcome.
The Voice Acting. This is an experiment at the moment. I hope Jorn found some time to continue working on it. But I will also try some things myself, especially a few Voice Morphing tools. As for the text writing, if you have fun with this you are welcome, send a p.m. to me.
The performance. Ok this is something hard. i have a i7 5820k and a MSI 1070. at the most time i have 60 fps. Sometimes i have a little frame break in from 60 to 55 . Sometimes if a cut scene the frame breaks are radical . i think this are the camera switches from hide to show and the render time. At the moment i have no solution for this . Also if i have an NPC that will show at a special time and goes active then there are little frame breaks. If i load the scene again often there are only a few frame breakes. If this is known to you and you already have a solution, it would be grateful if you send me a hint or solution.
Jen told me that i have to reduce the batch. At the max i have 350 batches (this is in Akt2 Teil 2 ) at the cottage. What is the best Nr. of batches in a scene? Some objects i bind in blender together. But this only function if i have the "FBX" files. some Models are only "MDL" files so i cant bind them. And so many objects i have not place at the cottage (i think)
ok thats it for the first blog to "Behind Enemy Lines"
Have fun trying it
I have learned much in Scripting and some Lua function as i worked on Akt2.
So i implemented a primitive Loading Screen (not realy one but i looks in my eyes nice).
Also the performance is better now because i released some entitys if they not longer used.
Hi,
the last weeks in office are very bussy. But today i have some time to work on my project.
In Akt 3 i would imlement a Mortar.
I found a nice free model that i rework in blender and exported as mdl file
also i searched for some sounds and mixed them together.
For the sound i use "Audacity" becaus i get some errors in leadwerks with this sound i converted sounds with "Audio online converter"
then i work on the scirpts.
i use some parts from einlanders grenade script. and changed the projectile script and saved it to Mortal Ammo script.
at the moment it is a little buggy and i dont know what i have to chage. i think the problem is in this part:
if bullet~=nil then
bullet:Show()
bullet:SetFriction(10000,10000)
bullet:SetCollisionType(Collision.Projectile)
bullet:SetPosition(self.muzzle:GetPosition(true),true)
bullet:SetRotation(self.muzzle:GetRotation(true),true)
bullet:SetMass(1)
Force = Vec3(0,3000,0)
bullet:AddForce(Force)
if bullet.script~=nil then
bullet.script.owner = self
if type(bullet.script.Enable)=="function" then
bullet.script:Enable()
end
bullet:Turn(Math:Random(-3,3),Math:Random(-3,3),0)
the bullet is not always transformed into an explosion when it hits the ground. If it hits the player, then it always works.
here is the result. Sometimes it is funny how crazy the bullet goes. But now i have to look video with my daughter so i will work later on it.
if anyone knows how i align the force at the distance of the player, about help or hints i would be glad.
Also on a note why the bullet does not always explode on the ground, I would be glad. As always sorry for my english. By the way Act 3 is progressing. Below are a few pictures.
Hi ,
Currently I'm planning the next level for Behind Enemy Lines. Since the player has to do part of the level with a sniper rifle, a little preliminary work had to be done. So, Here's my way to tackle this topic with the Addon "FPS Weapon Pack":
The tutorial from tipforeveryone was very helpful to me. You can find it here
https://www.leadwerks.com/community/blogs/entry/1775-realistic-sniper-rifle-scope-in-lua/
i downloaded a Scope frome here :http://www.cadnav.com/3d-models/model-36647.html
and put it as a child to the "vwep m4" and saved it as a prefab "vwep m4_sniper"
it should be look like this
Now you have to ajust the scope
But for the scope script to work, an empty script must be inserted in the following places. Thanks to Macklebee for this hint!
Now you have to change 2 scripts
1. fpsgun.lua
2. fpsplayer.lua
1. fpsgun.lua
this script i saved under "FPSGun_Sniper.lua"
then this video helps a lot :https://www.youtube.com/watch?time_continue=628&v=3OqwQSP-2FU
thanks to BluHornet
place this in your fpsgun_sniper.lua
Script.offsetNor=Vec3(0,0,0)
Script.offsetADS=Vec3(0,0,0)--Vec3 "Offset ADS"
the next line put after the function Script:Start()
self.offsetNor = self.offset
self.hasZoom=true
self.hasZoom=true (or false) has been inserted because the ironsight will be active in every weapon, but at Grenade or something else i did not want this.
Since I have difficulty with the sway of the weapon and I have no solution for it currently, I commented under function Script: Draw () the following lines out:
--self.swayspeed = Math:Curve(speed,self.swayspeed,20)
--self.swayspeed = math.max(0.5,self.swayspeed)
--self.amplitude = math.max(2,Math:Curve(speed,self.amplitude,20))
now its time to change the fpsplayer.lua
2. fpsplayer.lua
this line put in at the beginning
Script.ADSmode=false
next place the following lines under the function Script:UpdateWorld()
if self.weapons[self.currentweaponindex]~=nil and self.weapons[self.currentweaponindex].hasZoom then
if self.ADSmode == false then
self.camera:SetFOV(70)
self.weapons[self.currentweaponindex ].offset = self.weapons[self.currentweaponindex ].offsetNor
end
if self.ADSmode == true then
self.camera:SetFOV(20)
self.weapons[self.currentweaponindex ].offset = self.weapons[self.currentweaponindex ].offsetADS
end
end
and this also in this function (i put this after a lince called "--fire weapon"
if window:MouseHit(2) then
if self.weapons[self.currentweaponindex]~= nil then
if self.ADSmode == false then
self.ADSmode=true
else
self.ADSmode=false
end
if self.sound.pickupweapon~=nil then self.sound.pickupweapon:Play() end
end
end
if you do not want the ironsight by jump, reload, or carry an item, then paste those lines at the right places
self.ADSmode=false
Since the original crosshair disturbs me in the ironsight, I have inserted "and self.ADSmode==false then" in the function Script:PostRender(context) it should looks like this
if self.health>0 then
if self.canUse==true and self.carryingEntity == nil then
local pickUpX = math.floor((context:GetWidth() - self.image.hand:GetWidth()))/2
local pickUpY = math.floor((context:GetHeight() - self.image.hand:GetHeight()))/2
context:SetBlendMode(Blend.Alpha)
context:DrawImage(self.image.hand, pickUpX, pickUpY)
else
if self.carryingEntity==nil then
if self.weapons[self.currentweaponindex]~=nil then
if self.image.crosshair and self.ADSmode==false then
local crossHairX = math.floor((context:GetWidth() - self.image.crosshair:GetWidth()))/2
local crossHairY = math.floor((context:GetHeight() - self.image.crosshair:GetHeight()))/2
context:SetBlendMode(Blend.Alpha)
context:DrawImage(self.image.crosshair, crossHairX, crossHairY)
end
end
end
end
What follows now are the individual settings for each weapon to get an Ironsight.
M4 Sniper:
in the script:
the sniper M4 looks now like this
the m4 without scope
in the script:
it should look like this
the shotgun
in the script
the shotgun look like this
the pistol
in the script
the pistol look now like this
So, that was my solution. But if you have even better settings, feel free to write in this blog. I hope that this blog helped a bit. Especially to save time to find the settings for the Ironsight.
Have fun.
Greetings burgelkat
Due to some feedback, I'm thinking about how a better HUD could look like. Below is the Old HUD, and then the new HUD. What do you think? Or how can a HUD look more appealing to this game?
After some problems with the Game.exe ( crash ) I have at least a couple of solutions found . None good solutions at the end but still the game works.
On the one hand I had the collision system in the vegetation system off (if i activate the collision with paintet rocks and put a prefab (barrel with shape) in it, the game crashed. if i delete the barrel the collision function in the vegetation system but then i can´t implement my quest idea. So i deactivated the collsion in the vegetation system and now the barrel with shape (so i can take it in my hand) function in my map (Akt2)
The other Problem is my idea with the skybox. If i try the code from some threads i found or with your help (look at this post: http://www.leadwerks.com/werkspace/topic/14518-problem-with-skybox/ ) in my game engine and in the stand-alone-game everything function fine but not in the game launcher. Because my upload time is very long i cant try my solutions (uploadtime 4 hours i have to wait until november then i get a faster DSL)
so i uploaded in dropbox the stand-alone-game from Mortifer (i hope it function for you). So you can see my idea.
About prepares another thing to worry me is wy in game-launcher the "fps" are good in the stand alone game its slower. If someone has an explanation, I would be glad about.
So thats my entry for now
(and as always, sorry for my english)
.
greetings
burgelkat
Edit: i forgot something, one thing that make me cracy is the ermitter. Sometimes the placed ermitter has no flow (i dont know how i can describe it ... the ermitter "puffs like a train" .. if i change the duration with another number and change it back, the ermitter function right.
I work really hard on my new projekt. With the next Event from Josh i would show the first Alpha.
Meanwhile, I can also program more in LUA. I am really happy because i modified Hancinators "MeleeScript" with patrols. I put in a search function so the NPC continue his Path if he lost sight to you. Also i programmed a "Effect Script" so the NPC make "something" if the Effect is "true"
Also i try to voiceacting but this is in test at the moment (Jorn is busy at the moment )
Here are some pictures
Edit: If someone knows how I get the ammunition bar behind the Hud, I would be grateful for help here.
After I have my project crashed and there is no chance fully to restore it
, I started with Akt1 again new.
But after all its not a completly bad thing. I have now the chance to redesign things and rewrite some scripts. So it now looks like , that i probably win a little performance (fps). Also, I have a little busy myself with the theme animations . A soldier can now be shot
And i build with more structure (Flowgraph, and also Prefabs)
I´ve been working on my game "Projekt Mortifer". To introduce in the Stroy , I would like to install a few " Meanwhile" scenes . Here it gets even to complications . There are certainly easier ways to build this in
, but my programming skills are still limited
1. I can only read the text once of "Interactive Sign " (From FlowGUI). If i read another text for example of a second sign and go back to the first sign then it shows me the text of the last sign i read. The same if i change the map
2. If i am dead i can´t go back to the start menue.
(i included in my player script
if self.alive==true then
.
.
else
if (window:KeyHit(Key.Enter)) then
-- go back to start menu
changemapname="start"
end