UPDATE: in version 0.5 there's now a preliminary vehicle shooting function. Health bar has been implemented, and there's now a proper option menu you can open/close with the letter O key where you can switch between WASD and arrow keys to move and switch between spacebar and left mouse button for shooting.
UPDATE: there's pathing now in FPS mode. So you can't walk up a cliff and you can't walk through a unit.*
This is a beta of my FPS engine.
BacklitAvenger's FPS Engine v 0.4
WHAT IS WORKING
There's four weapon types:
Instant - makes the weapon effect appear at the trace collision point, whether unit or ground
Projectile - makes a projectile that flies to the trace collision point, whether unit or ground
AOE constant - used for flamethrower, basically adds all the units within the AoE to a unit group and then does the selected weapon damage
while the spacebar is held down it will cycle the firing mechanism, so that you continue to spray flames as long as space bar is down
Linear Constant - basically runs the projectile op a bunch of times. this is for autocannons, gatling guns, fully automatic weapons, etc.
Each weapon is defined by variables, so to change the range, just alter that one variable for that weapon.
damage is applied by a custom effect that has no graphics, because the traceline handles making the hit graphic appear
There are 4 actual weapons, one to exemplify each type of weapon operator. Rifle, which is instant, rockets, which are projectile, flamethrower, which is AoE constant, and autogun, which is linear constant
movement is with the arrow keys. It would be changed to wasd in about five seconds flat by changing up the key trigger.
this is a beta, meaning that while the vehicle system is there, it's not finished. you can get int and out of them, but the firing triggers aren't different for the vehicles yet, so weapons and vehicles don't work well together.
There's some stuff built into this to keep memory use down. example is the 'set camera bounds' trigger that moves the camera is off when theres no movement taking place, etc. basically turning off triggers that would be called but not complete due to conditions not being fulfilled.
WHAT IS NOT WORKING
vehicles shooting
enemy ai
FPS->TPS and back custom action is messy (camera wise)
multiplayer support (moot point till lag is fixed)
hp, ammo count, UI
but I figure it's decent right now so if the triggers in it help anybody out, coolio.
commands:
spacebar - shoot
arrow keys OR wasd - move
letter O key - switch between arrow keys and wasd movement
mouse - look around
period - cycle forward thru weps
comma - cycle back through weps
letter q key - release the mouse (no trigger to reverse this)
letter v key - get in/out vehicle
teal units are vehicles you can get into, white are non-hostile enemies. once AI is implemented there'll be red, which would be hostile. white units are just there so you can test the weapons on them.
if you want to put units other than marines, goliaths, tanks, or science vessels, you'll need to enter e height value for them in the global data bank first.
you'd do this: save real value . at string "unittypename" where . is the height value of the unit and "unittypename" is the exact string of the unit type's name, because the unit hit detector calls the value from the databank to see if it hits based on a string that is the potentially hit unit's type.
i'm hoping the triggers don't get all messed up name-wise because everything's super clearly labeled and whatnot.
sorry the map is so plain. the idea is to get the guts of the engine working before anything else. there's terrain height and cliff changes to demonstrate the trace taking terrain height into account
Steal the code and make it better!
EDIT: forgot to mention if you drive the tank, the left and right arrow keys aren't strafe anymore, they're to turn the tank. when riding a tank the mouse will be rotating the turret, but that's not working yet.
Attached. I was gonna do that originaly but I didn't see the attach link and I figured attaching was disabled in this forum. Stupid indeed. Anyway is attached now.
Oh and I forgot to mention that the pathing isn't implemented yet. So you can walk thru units and walk up cliffs. Will implement a pathing trigger in the next version.
I tested your map and I found the movement being very choppy. I was also not able to fire any projectiles.
At the state it is in at the moment, I wouldn't rate it very high.
Sidenote: I'm also curious to why you chose the Arrow keys as movement keys by default ^^ (I'm not saying it's a problem, 'cause it isn't - I'm just being curious :P).
I tested your map and I found the movement being very choppy. I was also not able to fire any projectiles.
At the state it is in at the moment, I wouldn't rate it very high.
Sidenote: I'm also curious to why you chose the Arrow keys as movement keys by default (I'm not saying it's a problem, 'cause it isn't - I'm just being curious :P).
Yeah, I made a map that was in Third person, I based it off a tutorial and when I tested it out the camera was choppy when the unit moved, so I got rid of the custom camera view and it worked like a charm (well, it was a bit farther out that I would have liked, but it was better than the choppy camera until I can figue out a better system).
I tested your map and I found the movement being very choppy. I was also not able to fire any projectiles.
At the state it is in at the moment, I wouldn't rate it very high.
Sidenote: I'm also curious to why you chose the Arrow keys as movement keys by default (I'm not saying it's a problem, 'cause it isn't - I'm just being curious :P).
Uh, why couldn't you fire any projectiles? You weren't trying to use the mouse button were you because I listed the firing key as the spacebar in the post =P
Did you ever get the unit height thing you were looking for? Ill edit this once Im done testing the map
edit- nice engine. Im going to use the traceline in my map, if thats ok. I didnt realize it was true FPS, I though it would be third person.
Please do, that's the whole point. I started working on this when I looked for a FPS/TPS engine I could borrow (with mapper's permission) that I could use in my campaig I'm working on. None of them were to my liking, so I want people that are having the same problem finding an engine or trace or whatever to have another option in the form of this map.
Ahh, sorry BacklitAvenger. My bad for skimming through the text! I will try the map again :)
EDIT: I tried the map again. The shooting was good, I liked it! :) All I can complain about now is the movement.
Is all good. Right now I'm working on pathing for it, since there's no unit at the camera target position in FPS mode. I've got a function that can detect if the player's trying to move into an area where they shouldn't (like through/over a cliff), but I'm having problems adapting my movement trigger to use that function. The way the movement trigger works is that based on whether or not the keys are down, a point called 'camera location' is moved a certain interval in the direction specified. That trigger's run at .01 second intervals (which is what creates the stuttering you mentioned). Then there's a trigger that runs at 0.0 second intervals when a key is depressed that sets the camera bounds to a circular region centered on 'camera location' with a radius of .01.
So logically, at least to my mind, by running an if/then argument with my pathing function returning a boolean (ie is the point that you're trying to move to a valid point to move to) and then only moving the 'camera location' point if the function returns true, I should have a trigger that only moves 'camera location' when the destination point is valid. The problem is that for some reason even though the function is returning false when it should, the 'camera location' variable is moving anyway. And that I can't seem to explain.
K I'll check out the thing and see what I can figure out. For starters, that Z value seems awfully high. Air units fly at height of approximately 3, so a z value of 25 seems really really high.
IN OTHER NEWS:
PATHING! Hooray! check it out guys, no more walking thru cliffs or units, and it works without a dummy unit.
Next up on the list is either enemy AI or vehicle weapons, I'm not sure which.
So version 0.5 will be posted tomorrow. I implemented a health system, smoothed the movement somewhat although not altogether, implemented a preliminary vehicle shooting system, and I created a proper options menu you can access through hitting the O key where you can select either arrows or WASD for movement, and either spacebar or left mouse click to shoot of your gun. Ammo system will likely be implemented in 0.5 by the time I update it as well.
Anybody else download this map? Surely somebody else must have something to say about it, good or bad! I'd really appreciate the input because anything I can do to make it better is something I absolutely want to do.
I have it at 25 because my camera is above unit, not on the ground with him...but maybe it is too high, Ill take a look. Thanks for the help!
I don't know if you're comfortable with doing it, but if you want you can email me your map and I can take a look at the trigger. I'm not sure I totally grasp what the problem is and so as a result I'm not sure what to recommend to fix it. If I could get a look at the map itself so I can really thoroughly examine the triggers and use the test map thing to see directly what the problem is I think I'll have a much better chance of actually figuring out a fix for it.
If you're indeed interested, PM me and I'll send you my email address.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
This is a beta of my FPS engine.
BacklitAvenger's FPS Engine v 0.4
WHAT IS WORKING
There's four weapon types:
Instant - makes the weapon effect appear at the trace collision point, whether unit or ground Projectile - makes a projectile that flies to the trace collision point, whether unit or ground AOE constant - used for flamethrower, basically adds all the units within the AoE to a unit group and then does the selected weapon damage while the spacebar is held down it will cycle the firing mechanism, so that you continue to spray flames as long as space bar is down Linear Constant - basically runs the projectile op a bunch of times. this is for autocannons, gatling guns, fully automatic weapons, etc.
Each weapon is defined by variables, so to change the range, just alter that one variable for that weapon.
damage is applied by a custom effect that has no graphics, because the traceline handles making the hit graphic appear
There are 4 actual weapons, one to exemplify each type of weapon operator. Rifle, which is instant, rockets, which are projectile, flamethrower, which is AoE constant, and autogun, which is linear constant
movement is with the arrow keys. It would be changed to wasd in about five seconds flat by changing up the key trigger.
this is a beta, meaning that while the vehicle system is there, it's not finished. you can get int and out of them, but the firing triggers aren't different for the vehicles yet, so weapons and vehicles don't work well together.
There's some stuff built into this to keep memory use down. example is the 'set camera bounds' trigger that moves the camera is off when theres no movement taking place, etc. basically turning off triggers that would be called but not complete due to conditions not being fulfilled.
WHAT IS NOT WORKING
vehicles shooting
enemy ai
FPS->TPS and back custom action is messy (camera wise)
multiplayer support (moot point till lag is fixed)
hp, ammo count, UI
but I figure it's decent right now so if the triggers in it help anybody out, coolio.
commands:
spacebar - shoot
arrow keys OR wasd - move
letter O key - switch between arrow keys and wasd movement
mouse - look around
period - cycle forward thru weps
comma - cycle back through weps
letter q key - release the mouse (no trigger to reverse this)
letter v key - get in/out vehicle
teal units are vehicles you can get into, white are non-hostile enemies. once AI is implemented there'll be red, which would be hostile. white units are just there so you can test the weapons on them.
if you want to put units other than marines, goliaths, tanks, or science vessels, you'll need to enter e height value for them in the global data bank first.
you'd do this: save real value . at string "unittypename" where . is the height value of the unit and "unittypename" is the exact string of the unit type's name, because the unit hit detector calls the value from the databank to see if it hits based on a string that is the potentially hit unit's type.
i'm hoping the triggers don't get all messed up name-wise because everything's super clearly labeled and whatnot.
sorry the map is so plain. the idea is to get the guts of the engine working before anything else. there's terrain height and cliff changes to demonstrate the trace taking terrain height into account
Steal the code and make it better!
EDIT: forgot to mention if you drive the tank, the left and right arrow keys aren't strafe anymore, they're to turn the tank. when riding a tank the mouse will be rotating the turret, but that's not working yet.
Hey man, I'd really like to try this - but what's with the download link? Do I have to install this "Free Compressor" thingy?
Hey updated with a rapidshare link. Link
Unfortunately it'll only last ten downloads, so if someone else with a non-free account at rapidshare could upload it that'd be great!
Attach file to post ...
Also make video!
@BacklitAvenger: Go
Hmm, you could use the +Add attachment button to attach the map directly to the thread. Like so...
[stupid] Me [/stupid]
...
Attached. I was gonna do that originaly but I didn't see the attach link and I figured attaching was disabled in this forum. Stupid indeed. Anyway is attached now.
Oh and I forgot to mention that the pathing isn't implemented yet. So you can walk thru units and walk up cliffs. Will implement a pathing trigger in the next version.
Any comments/critiques?
@BacklitAvenger:
I tested your map and I found the movement being very choppy. I was also not able to fire any projectiles.
At the state it is in at the moment, I wouldn't rate it very high.
Sidenote: I'm also curious to why you chose the Arrow keys as movement keys by default ^^ (I'm not saying it's a problem, 'cause it isn't - I'm just being curious :P).
Yeah, I made a map that was in Third person, I based it off a tutorial and when I tested it out the camera was choppy when the unit moved, so I got rid of the custom camera view and it worked like a charm (well, it was a bit farther out that I would have liked, but it was better than the choppy camera until I can figue out a better system).
Uh, why couldn't you fire any projectiles? You weren't trying to use the mouse button were you because I listed the firing key as the spacebar in the post =P
Okay updated the file with WASD instead of arrows. Use the letter O key to switch between WASD and arrow keys for movement.
Did you ever get the unit height thing you were looking for? Ill edit this once Im done testing the map
edit- nice engine. Im going to use the traceline in my map, if thats ok. I didnt realize it was true FPS, I though it would be third person.
@BacklitAvenger:
Ahh, sorry BacklitAvenger. My bad for skimming through the text! I will try the map again :)
EDIT: I tried the map again. The shooting was good, I liked it! :) All I can complain about now is the movement.
Please do, that's the whole point. I started working on this when I looked for a FPS/TPS engine I could borrow (with mapper's permission) that I could use in my campaig I'm working on. None of them were to my liking, so I want people that are having the same problem finding an engine or trace or whatever to have another option in the form of this map.
Is all good. Right now I'm working on pathing for it, since there's no unit at the camera target position in FPS mode. I've got a function that can detect if the player's trying to move into an area where they shouldn't (like through/over a cliff), but I'm having problems adapting my movement trigger to use that function. The way the movement trigger works is that based on whether or not the keys are down, a point called 'camera location' is moved a certain interval in the direction specified. That trigger's run at .01 second intervals (which is what creates the stuttering you mentioned). Then there's a trigger that runs at 0.0 second intervals when a key is depressed that sets the camera bounds to a circular region centered on 'camera location' with a radius of .01.
So logically, at least to my mind, by running an if/then argument with my pathing function returning a boolean (ie is the point that you're trying to move to a valid point to move to) and then only moving the 'camera location' point if the function returns true, I should have a trigger that only moves 'camera location' when the destination point is valid. The problem is that for some reason even though the function is returning false when it should, the 'camera location' variable is moving anyway. And that I can't seem to explain.
Hah! Got that shit down. So now you can't walk over the cliffs.
Will upload in morning, this was too too much triggering for one day!
Ok, Im attaching the picture I mentioned in my PM. Thanks for trying to help me, by the way. =]
K I'll check out the thing and see what I can figure out. For starters, that Z value seems awfully high. Air units fly at height of approximately 3, so a z value of 25 seems really really high.
IN OTHER NEWS: PATHING! Hooray! check it out guys, no more walking thru cliffs or units, and it works without a dummy unit.
Next up on the list is either enemy AI or vehicle weapons, I'm not sure which.
I have it at 25 because my camera is above unit, not on the ground with him...but maybe it is too high, Ill take a look. Thanks for the help!
So version 0.5 will be posted tomorrow. I implemented a health system, smoothed the movement somewhat although not altogether, implemented a preliminary vehicle shooting system, and I created a proper options menu you can access through hitting the O key where you can select either arrows or WASD for movement, and either spacebar or left mouse click to shoot of your gun. Ammo system will likely be implemented in 0.5 by the time I update it as well.
Anybody else download this map? Surely somebody else must have something to say about it, good or bad! I'd really appreciate the input because anything I can do to make it better is something I absolutely want to do.
I don't know if you're comfortable with doing it, but if you want you can email me your map and I can take a look at the trigger. I'm not sure I totally grasp what the problem is and so as a result I'm not sure what to recommend to fix it. If I could get a look at the map itself so I can really thoroughly examine the triggers and use the test map thing to see directly what the problem is I think I'll have a much better chance of actually figuring out a fix for it.
If you're indeed interested, PM me and I'll send you my email address.