New Doom Forums  
FS: Possible FS additions. - New Doom Forums
Go Back   New Doom Forums > Source Ports > Doom Legacy

Reply
 
Thread Tools Display Modes
Old January 31st, 2006, 08:55 AM   #1
Danimetal
Commander Keen
 
Danimetal's Avatar
 
Join Date: Apr 2004
Location: Spain
Posts: 4,344
FS: Possible FS additions.

When Legacy V2.0 is out surely FS and the BEX extensions will be used to make new weapons. Regarding this I´ve thought about a couple of modifications to the functions that, if possible to be coded, could add more possibilities to Legacy.

-The Lineattack function will be surely used for a lot of new firearms but it doesn´t work for melee weapons that should duplicate the chainsaw or fist effect. I suggest adding a "distance" parameter to the function so melee weapons can be done too. As far as I know, the original Doom fist is a lineattack weapon with a limited range.

-The Spawnmissile function will also allow for new weapons and works right as it is. Still, if something could be added it would be a "spawner" parameter: I seem to remember that some projectile weapons in Doom can´t harm the one who fires them (plasma gun) and it would be nice to make this effect possible with custom weapons too. I don´t know the difficulty for this.

And I think that´s all... Well, the only thing that´s missing is a railgun and then some function to spawns a projectile that doesn´t dissapear when impacts the enemy. Now that I think about that, it could be interesting: it could keep hurting until the health of the projectile is completely depleted (that would be achieved by hurting things or after a given period of time)... Clouds of venom and "railgun projectiles" could be done with this. Anyway, I just wanted to point the two above.
Danimetal is offline   Reply With Quote
Old January 31st, 2006, 01:22 PM   #2
shinobi
Commander Keen
 
shinobi's Avatar
 
Join Date: Sep 2004
Location: Chile, Southamerica
Posts: 56
Mmmm, railgun sucks, im happy that doom doesnt have one
shinobi is offline   Reply With Quote
Old January 31st, 2006, 09:28 PM   #3
Ebola
Commander Keen
 
Ebola's Avatar
 
Join Date: Jul 2000
Location: Sweden
Posts: 422
Quote:
Originally Posted by danimetal
When Legacy V2.0 is out surely FS and the BEX extensions will be used to make new weapons.
Or they could use a good system to make the weapons.
Ebola is offline   Reply With Quote
Old February 1st, 2006, 02:44 AM   #4
Danimetal
Commander Keen
 
Danimetal's Avatar
 
Join Date: Apr 2004
Location: Spain
Posts: 4,344
Quote:
Originally Posted by Ebola
Or they could use a good system to make the weapons.
Indeed... When I think about this I tend to think about separate things: the weapons graphics (seen on the screen), the weapons functioning (firing, ammo consumption) and the weapons sideeffects (light effects, checkreload states...).

Right now you can emulate only the functioning with scripting, but nothing less. If Legacy was to have a custom weapons system, would it be embedded inside FS or would it be another kind of system like an extended table?... I don´t know, but a simple and effective way to do it would be as following:

{
weapon = 06 // For example, the number.
bobbing01 = ("Handgun01", 2 , 0) // The graphic lump, duration and sideeffects. If no sideffect specified, the state passes to the next.
bobbing02 = ("Handgun02", 2, 0)
bobbing03= ("Handgun03, 2, bobbing1) // If sideeffect = frame that frame is called.
firing01 = ("Hangunfir01", 4, startscript(1)); //Again, graphic lump, duration and sideffect (call script 1).
firing02 = ("Handgunfir02", 2, startscript(2));
firing... //Etc... Lower, Raise and other weapon states should be called. In addition, some "customstates" could be done for custom stuff like weapon reloading, secondary fires and things like that... These custom states would be called only from scripting.
}

script 1
{
if (x != 0) // Given x as ammo.
{
callweaponframe(6, firing02); //If there´s ammunition the weapon number 6 proceeds to the second firing frame.
}
else
{
callweaponframe(6, bobbing01); //If there´s not, we get back to the bobbing frame.
}
}

script 2
{
callstate("LIGHT1"); // Lits up the room when firing.
x=x-1; //Substracts ammo.
lineattach(blahblah); //Attack itself.
playsound("BLAH"); // Sound of the weapon.
}

You see, first there´s the definitions and then we create the effects and working with scripts. For example, this weapon works in a simple way: if there´s ammo it fires and lits the room, if not it goes back to bobbing frames... Need functions (like callstate, callweaponframe and stuff) would be needed along with lot of other things for this system to work but well, this is just a suggestion or inspiration .
Danimetal is offline   Reply With Quote
Old February 1st, 2006, 05:34 AM   #5
DarkWolf
Keen For Life
 
DarkWolf's Avatar
 
Join Date: Jan 2002
Location: Elsewhere
Posts: 287
Quote:
Originally Posted by danimetal
-The Spawnmissile function will also allow for new weapons and works right as it is. Still, if something could be added it would be a "spawner" parameter: I seem to remember that some projectile weapons in Doom can´t harm the one who fires them (plasma gun) and it would be nice to make this effect possible with custom weapons too. I don´t know the difficulty for this.
Well lineattack was an experiment and really wasn't supposed to be documented. But somehow it got in the CVS and then someone found out about it. As far as spawning a missle inside a player you can get around this by using simple trig to spawn the missle in front of the player by a few pixels.

weaponx = cos(playerangleinrads) * distance from player + playerx
weapony = sin(playerangleinrads) * distance from player + playery
DarkWolf is offline   Reply With Quote
Old February 1st, 2006, 05:46 AM   #6
Danimetal
Commander Keen
 
Danimetal's Avatar
 
Join Date: Apr 2004
Location: Spain
Posts: 4,344
Yeah, that can be made and you can also spawn a node just a little more distance away to be the target for the missile spawned. What I meant with a spawned parameter was that the missile (projectile) would never harm you if you shoot it and collide with it.

We al know missiles hurt the player that launchs them but plasma and BFG shots don´t (you can do a large hallway with teleporters in each side and check yourself) so you´re invulnerable to your own weapons. If you spawn those with FS you´re bound to be harmed by them so to avoid that you could use a "spawner" parameter. Anyway, that should be hard to code.

It really can sound pointless since the player never gets to reach his own plasma balls but I don´t know, you can script plasma balls that circle around the player or something and those would hurt. The whole purpose of that parameter would be to "emulate" the original Doom behaviour (supposing it´s easy to implement and worth the effort).
Danimetal is offline   Reply With Quote
Old February 14th, 2006, 09:03 AM   #7
Danimetal
Commander Keen
 
Danimetal's Avatar
 
Join Date: Apr 2004
Location: Spain
Posts: 4,344
I just thought... With any user-made projectile weapon (assuming it´s done with FS) the whole multiplayer and deathmatch thing would be harder to script, but possible but... How would you recognise who killed someone with an user-made projectile weapon so he gets the frag?. Using the player as the spawn point?.
Danimetal is offline   Reply With Quote
Old February 14th, 2006, 02:38 PM   #8
Ebola
Commander Keen
 
Ebola's Avatar
 
Join Date: Jul 2000
Location: Sweden
Posts: 422
Why not just add Decorate?
Ebola is offline   Reply With Quote
Old February 14th, 2006, 02:49 PM   #9
Danimetal
Commander Keen
 
Danimetal's Avatar
 
Join Date: Apr 2004
Location: Spain
Posts: 4,344
I´m sure that most people would agree and second that but I´m not sure if it´s a priority or even an objective for the Legacy team. Also, wouldn´t DECORATE need to add an extended thing table or something?. With Hexen on the works it could be a little messy if not planned right.
Danimetal is offline   Reply With Quote
Old February 14th, 2006, 04:56 PM   #10
DarkWolf
Keen For Life
 
DarkWolf's Avatar
 
Join Date: Jan 2002
Location: Elsewhere
Posts: 287
The projectile's target should be the monster or player that fired the missile.
DarkWolf is offline   Reply With Quote
Old February 14th, 2006, 05:32 PM   #11
Danimetal
Commander Keen
 
Danimetal's Avatar
 
Join Date: Apr 2004
Location: Spain
Posts: 4,344
Does that identify in the "Spawnmissile" as the source of the missile?. Wouldn´t that make rockets explode in the mouth of the players?.
Danimetal is offline   Reply With Quote
Old February 14th, 2006, 05:52 PM   #12
Ebola
Commander Keen
 
Ebola's Avatar
 
Join Date: Jul 2000
Location: Sweden
Posts: 422
Quote:
Originally Posted by danimetal
I´m sure that most people would agree and second that but I´m not sure if it´s a priority or even an objective for the Legacy team. Also, wouldn´t DECORATE need to add an extended thing table or something?. With Hexen on the works it could be a little messy if not planned right.
Err, how do you figure that? Decorate is something that was made for Zdoom, Zdoom support all the Doom engine games. So, you are not making any sense.
Ebola is offline   Reply With Quote
Old February 14th, 2006, 06:06 PM   #13
DarkWolf
Keen For Life
 
DarkWolf's Avatar
 
Join Date: Jan 2002
Location: Elsewhere
Posts: 287
In the FS command, the trigger of the script is used as the creator of the missile. So if you're spawning the projectiles from a script started with "startscript" then they should belong to player 1.
DarkWolf is offline   Reply With Quote
Old February 14th, 2006, 06:19 PM   #14
Danimetal
Commander Keen
 
Danimetal's Avatar
 
Join Date: Apr 2004
Location: Spain
Posts: 4,344
Quote:
Originally Posted by Ebola
Err, how do you figure that? Decorate is something that was made for Zdoom, Zdoom support all the Doom engine games. So, you are not making any sense.
That´s the whole point of asking questions: to try not to state something that doesn´t make sense. What are you exactly referring to?. For the extended thing table I meant to get free thing numbers to be assigned to DECORATE items (I think it works that way, from 8000 or something?). I´m not sure about the Legacy code supporting that and I´m not sure about the numbers that Hexen will use in V2.0, hence the possible mess if they coincide (not likely).

Quote:
Originally Posted by DarkWolf
In the FS command, the trigger of the script is used as the creator of the missile. So if you're spawning the projectiles from a script started with "startscript" then they should belong to player 1.
So, in multiplayer and with an adecuate Codepointer work there would be no problems, I guess. For example, making the missile launcher codepointer trigger a script where the "trigger" fires five missiles will make the player that triggered it fire them... The only thing that could be a concern is that Legacy could mess with several instances of the script running at the same time but I guess they are independent...

Finally, wasn´t there a bug that crashed Legacy when you spawned a lot of things?. Wouldn´t it happen too with spawned projectiles?.
Danimetal is offline   Reply With Quote
Old February 15th, 2006, 06:43 AM   #15
DarkWolf
Keen For Life
 
DarkWolf's Avatar
 
Join Date: Jan 2002
Location: Elsewhere
Posts: 287
The problem with spawn is that it creates a mapthing (defines where a monster/item spawns at map load) to prevent respawning monsters from crashing (since they need to start where they were first spawned). However, when you remove an object, it doesn't free the memory that's taken up by the mapthing.

I don't believe spawnmissile has this problem since projectiles aren't respawned.

And the as long as the codepointer correctly assigns the trigger of the script as the object that called it, everything should work okay (in theory).
DarkWolf is offline   Reply With Quote
Old February 15th, 2006, 07:12 AM   #16
Danimetal
Commander Keen
 
Danimetal's Avatar
 
Join Date: Apr 2004
Location: Spain
Posts: 4,344
Darkwolf, I remember you told me that you introduced the setobjposition function in FS precisely to find a route around this problem (or so I think)... Do you think it could be possible to fix it and, if possible, do you think it would be in V2.0?. I tend to think that all problems in v1.42 will be fixed by rewriting the whole code (fun it´s said in other thread that Legacy is dead) but I´m not sure about which ones could be fixed. Maybe I should try to learn coding so I can be useful in a few years.
Danimetal is offline   Reply With Quote
Old February 15th, 2006, 03:25 PM   #17
g6672D
 
Join Date: Oct 2005
Location: Unknown
Posts: 1,330
The one thing I'd really like to see in FraggleScript is functions since it gets VERY messy with globals.
g6672D is offline   Reply With Quote
Old February 15th, 2006, 07:33 PM   #18
DarkWolf
Keen For Life
 
DarkWolf's Avatar
 
Join Date: Jan 2002
Location: Elsewhere
Posts: 287
There are a few different ways it could be addressed. Hopefully the problem won't translate into v2.0.
DarkWolf is offline   Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Few additions for JDoom.. Mr. Chris Doomsday 0 November 20th, 2002 03:50 PM
Role playing additions Hunt1024 DOOM Series 2 June 21st, 2001 01:55 AM


All times are GMT -7. The time now is 03:19 AM.


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
NewDoom.com © 2000-2009 Mindless Games & Entertainment. All Rights Reserved.