View unanswered posts | View active topics It is currently Thu Dec 26, 2024 9:40 pm



Reply to topic  [ 33 posts ]  Go to page Previous  1, 2, 3  Next
 MINES version 3.0 Now With NAPALM!!! 
Author Message
User avatar

Joined: Tue Nov 06, 2007 6:58 am
Posts: 2054
Reply with quote
Post Re: MINES version 2.0 is here!!!
We need a performance analysis on lua.
Like naw.


Fri Aug 14, 2009 4:35 am
Profile
REAL AMERICAN HERO
User avatar

Joined: Sat Jan 27, 2007 10:25 pm
Posts: 5655
Reply with quote
Post Re: MINES version 2.0 is here!!!
Boxes are also an engine class; WithinBox is a direct engine function. It's always going to be faster (albeit marginally) than the longform lua method (what geti posted as a square prox. check). Admittedly raycasting is also direct-engine, but I rather think there's more to check in a raycast than a box.

Also in this topic: crappy mods get turned into performance discussions.

To Lua Scripting, then?


Fri Aug 14, 2009 6:26 pm
Profile
User avatar

Joined: Tue Apr 28, 2009 4:48 pm
Posts: 29
Reply with quote
Post Re: MINES version 3.0 Now With NAPALM!!!
Aveneski wrote:
Pretty good.

Boulder mine is... honestly, If you made this mine pretty much a Metal box that drops on a person, It'd work a lot better, like a hanging trap. Zombie mine, interesting, but I think A fire mine would be better, but not as FPS-rape-ish as the C4, and more effective. Like napalm. That'd be great.


Granted: I changed the boulder mine to one giant boulder. it dosent allway work so im going to fix it in the next version.

I actualy finished the Napalm mine before you said this.


if someone wants to make me some Lua files (i need 2) that would be great.
They would look something like this.

Code:
If enemy is in bounding box
then gib the mine


and

Code:
If enemy is in bounding box
then wait 3 seconds and gib the mine


Fri Aug 14, 2009 7:28 pm
Profile

Joined: Sat Aug 23, 2008 2:51 pm
Posts: 209
Reply with quote
Post Re: MINES version 3.0 Now With NAPALM!!!
I think you need to redo the description for the napalm mine...

Also, just as a suggestion, could you have a GIF of each mine? I think that would attract more people.


Fri Aug 14, 2009 7:56 pm
Profile
User avatar

Joined: Tue Apr 28, 2009 4:48 pm
Posts: 29
Reply with quote
Post Re: MINES version 3.0 Now With NAPALM!!!
Thanks for catching that :lol: :P


Fri Aug 14, 2009 8:00 pm
Profile
User avatar

Joined: Sun Mar 22, 2009 7:30 am
Posts: 168
Reply with quote
Post Re: MINES version 3.0 Now With NAPALM!!!
The mins sorta crash the moment you select "done building".


Fri Aug 14, 2009 9:07 pm
Profile
User avatar

Joined: Tue Aug 11, 2009 2:42 am
Posts: 321
Location: On an iceberg typing away...
Reply with quote
Post Re: MINES version 3.0 Now With NAPALM!!!
The rock one doesn't work! :(


Sat Aug 15, 2009 3:02 am
Profile
User avatar

Joined: Sun Jul 13, 2008 9:57 am
Posts: 4886
Location: some compy
Reply with quote
Post Re: MINES version 3.0 Now With NAPALM!!!
Grif wrote:
To Lua Scripting, then?
indeed. we should probably do some proper testing on all of this.

1
Code:
If enemy is in bounding box
then gib the mine

Code:
function Create(self)
   self.box = Box(self.Pos - Vector(24 ,24) , self.Pos + Vector(24 ,24)) --change the 24s to whatever size you want your box /2
   self.timer = Timer()
end

function Update(self)
   if self.timer:IsPastSimMS(300) then --adjust for however many MS, this is a delay to prevent lag
      for actor in MovableMan.Actors do
         if self.box:WithinBox(actor.Pos) then -- if theres an actor in the box:
            self:GibThis() --boom
         end
      end
      self.timer:Reset() --reset the timer
   end
end

2
Code:
If enemy is in bounding box
then wait 3 seconds and gib the mine

Code:
function Create(self)
   self.box = Box(self.Pos - Vector(24 ,24) , self.Pos + Vector(24 ,24)) --change the 24s to whatever size you want your box /2
   self.timer = Timer()
   self.boomtimer = Timer()
end

function Update(self)
   if self.timer:IsPastSimMS(300) then --adjust for however many MS, this is a delay to prevent lag
      for actor in MovableMan.Actors do
         if self.box:WithinBox(actor.Pos) then -- if theres an actor in the box:
            self.needstoexplode = true --set some random variable with a name you can remember
            self.boomtimer:Reset() --reset the timer for the delay on the explosion
         end
      end
      self.timer:Reset() --reset the timer
   end
   if self.needstoexplode and self.boomtimer:IsPastSimMS(3000) then --if theres an actor nearby and weve waited 3 seconds
      self:GibThis() --boom
   end
end

note the similarity of the scripts.


Sat Aug 15, 2009 5:12 am
Profile WWW
User avatar

Joined: Tue Apr 28, 2009 4:48 pm
Posts: 29
Reply with quote
Post Re: MINES version 3.0 Now With NAPALM!!!
THANKS :D
I'll see about adding that to the mod

Also, is that sensitive to teammates?

Note to other people:
this will get rid of manual detonation


Sat Aug 15, 2009 8:43 pm
Profile
User avatar

Joined: Sun Jul 13, 2008 9:57 am
Posts: 4886
Location: some compy
Reply with quote
Post Re: MINES version 3.0 Now With NAPALM!!!
sure as hell isnt sensitive to teammates. if the mine is an actor though, you could do an "and self.Team ~= actor.Team" in the for loop if.


Sat Aug 15, 2009 11:02 pm
Profile WWW
User avatar

Joined: Mon Jun 04, 2007 5:55 am
Posts: 1627
Location: Ohio
Reply with quote
Post Re: MINES version 3.0 Now With NAPALM!!!
Okay, these are pretty cool and all but I have a question.

Why does this even need to use lua for anything more than to replace the mines? what ever happened to Team = 2, Pinned actors with guns that make them explode? Oh right never mind, the AI would shoot at them, thats why.

So I have 2 Ideas, First of all, if anything enters an area, if it is AHuman or ACrab, and it is on the AI's team, then explode. In other words, Don't go through the tables, just check if ANYTHING enters. It only really needs to check once every 1/2 or 1/3 of a second, not every frame, every frame is kind of dumb, and lagtastic.

As for how to replace the mines, thats easy, I can think of 3 ways right off the bat.

1) Lua w/some method of checking for, A mine. Check ONE POINT, the exact point the mine is on, for ONLY that mine. Also, to reduce lag, Only check once every 3-5 seconds. thats ONE pixel's space, being check ONCE every 3-5 seconds, for one SPECIFIC instance. thats much less to load.

2) Manual replacement Via Lua, with areas. Add a HDevice, a tool, that works like the R/G/B Detonator. It sets a variable for a instant. that variable tells a Null spritted AEmitter (pinned) to Emit a new mine. you would need a HDevice per mine, and thus you might have to color-code them, by type, or you'd go to use it, and emit a mine into another mine, and they'd all blow up. Or you could just not bother, and call it a 'forced re-set' feature.

3) the mine is set to GetsHitMos = 0, and it gibs into another of itself, with 0 velocity. this way when it blows up, it turns into another of itself. Also to keep it from 'catching' all of the 'explosion' you could make it turn into a TDE, or an AEmitter, or SOMETHING, that you can put a delay on, that has a null sprite, that when X time has passed, it gibs, into another new mine.




More Ideas- Horizontal corridor mines, I don't like pits, things always get stuck there, they get clogged, and they take up to much space. also, my bases aren't vertical columns, also exploding light bulbs.


Sun Aug 16, 2009 2:46 am
Profile YIM WWW
User avatar

Joined: Sun Jul 13, 2008 9:57 am
Posts: 4886
Location: some compy
Reply with quote
Post Re: MINES version 3.0 Now With NAPALM!!!
you dont know ♥♥♥♥ about lua do you miles?
Miles_T3hR4t wrote:
So I have 2 Ideas, First of all, if anything enters an area, if it is AHuman or ACrab, and it is on the AI's team, then explode. In other words, Don't go through the tables, just check if ANYTHING enters.
yeah, cause you can just check if anything is there, right? no, actually you cant. going through the actor tables (oh no, 20 loops, boo) is the only way to do it without rays, which as we've discussed, will probably lag more than this simple box check. also, the script i posted only checks every 300ms, which is 3 1/3 times per second.
learn what you're talking about before you post stuff like that.
the exploding light bulb is a good idea though, it would be a nice trap that was pretty unidentifiable.


Sun Aug 16, 2009 3:51 am
Profile WWW
User avatar

Joined: Mon Jul 16, 2007 9:50 am
Posts: 1512
Location: Tallahassee, FL
Reply with quote
Post Re: MINES version 3.0 Now With NAPALM!!!
I like these big block mines. Reminds me of stuff you'd see in older platformers.


Sun Aug 16, 2009 3:43 pm
Profile YIM
REAL AMERICAN HERO
User avatar

Joined: Sat Jan 27, 2007 10:25 pm
Posts: 5655
Reply with quote
Post Re: MINES version 3.0 Now With NAPALM!!!
Geti wrote:
you dont know ♥♥♥♥ about lua do you miles?
learn what you're talking about before you post stuff like that.


Miles doesn't actually know anything about anything.

Hey miles spoilers you could just have the mine gib into itself with recursion! :gasp: 0 velocity and high enough pinstrength and it won't move a pixel.


Sun Aug 16, 2009 4:34 pm
Profile
User avatar

Joined: Tue Aug 11, 2009 2:42 am
Posts: 321
Location: On an iceberg typing away...
Reply with quote
Post Re: MINES version 3.0 Now With NAPALM!!!
The mines are kinda tooo sensitive cuz a piece of debris past it and killed 2 units that were fighting a dropship.


Sun Aug 16, 2009 6:38 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 33 posts ]  Go to page Previous  1, 2, 3  Next

Who is online

Users browsing this forum: No registered users


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.
Designed by STSoftware for PTF.
[ Time : 0.491s | 14 Queries | GZIP : Off ]