OpenTechEngine / OpenTechBFG

Engine based on (RB) Doom 3 BFG aiming to allow the creation of standalone games
Other
84 stars 11 forks source link

script for the base and the demo #63

Open BielBdeLuna opened 8 years ago

BielBdeLuna commented 8 years ago

what ideas would you guys like to implement in the scripting?

as it is right now I've implemented effects at the start and controllable effects midway

things I'm not sure I will be able to implement:

things that cannot be implemented:

Last lines: I propose check stuff in idTechX script and once they work and work well, then let's ad them in c++ (always as an option of course)

ghost commented 8 years ago

Really love what you've implemented, can't wait to see it in action. I'm not sure if a faction and behaviour system for enemies can be added through scripts, but it would be cool if they pair up and use some tactics/strategies to work together to get the player. Maybe some info can be added to AAS which triggers animations as the enemy climbs something. Only thing I feel a lot of FPS games lack is learning/thinking AI that changes strategy and attacks based on the players actions/playstyle and weapon type in use.

BielBdeLuna commented 8 years ago

the only thing implemented in the actual code is the first thing, the rest is implemented in testing code, midway implementation, or to be implemented.

the faction is a group action, so not possible, there is the rank and the team, but more than that I won't get the player to switch teams or something like that.

on the AI changing strategy, this is what GOAP is perfect for, it implements planing, and that's the needed thing for strategy. but this will be in the future, as it needs to replace the FSM (Finite State System) that currently idTechX implements (the states in the AI ) so this is some work in c++ and then rethink the AI of the animated meshes. we could sustain FSM for machines but have the enemies use GOAP, and fins a way to make the two systems interact, the cool thing would be GOAP for the player, and make the player entity/avatar read the inputs of the user and react within the environment using GOAP, planing and selecting the best plan for the player. Somewhat how the users angrily felt that the avatar of Prince of Persia 2008 was playing the game for themselves. But as it is right now this is the future and we are at the present with our current tools.

DanielGibson commented 8 years ago

Quake4 had a much improved AI over Doom3 (incl. NPCs that fight with you), but afaik they moved a lot of AI-code from the scripts to C++

BielBdeLuna commented 8 years ago

yes but unfortunately the quake4 source is not GPL, so we can only open it and study it, it's is great because they implemented a thing that it's called the tether that hooks the enemies to fixed entities in the map which allows them to get a direction of the fight while using cover. Quake 4 code is cool. but unfortunately it's not GPL.

anyway c++ code can be mostly interchanged with idTechX scripting, unless they use lists.

ghost commented 8 years ago

Another request, walljumps, wall dodges, wall backflips and double jumps. Would be interesting if the camera realistically moved with the player when doing flips.

DanielGibson commented 8 years ago

I know that the Q4 SDK is not GPL. But it tells us that for more sophisticated AI it makes sense to use C++ instead of scripts.

Would be interesting if the camera realistically moved with the player when doing flips.

As far as I know id experimented with that for Quake3 and then didn't do it because it makes people sick. Also, I'm not sure how to interpret "realistically" in that context :P

BielBdeLuna commented 8 years ago

@Yetta1 all interactions with the player point of view are better handled within c++ (I tried this when implemented the portal sky stuff (that it follows the player position))

Mirror's Edge implemented stuff like this and didn't make anyone sick, so I guess we could do it. Anyways, any Mirror's Edge movement stuff will be better handled within c++.

@DanielGibson as I said all that implemented in c++ can be implemented in scripting whenever there are not lists going on. Quake4 has not really sophisticated AI, at least not more sophisticated than doom3's. it's just a FSM implementation plain and simple, and not overly complicated.

DanielGibson commented 8 years ago

Quake4 has NPCs that follow you and fight with you. And C++ has much better performance. And lists, trees and other data structures

Not sure if that movement stuff is even within the scope of OTE, or more likely to be something games that actually need it implement themselves

ghost commented 8 years ago

I remember Far Cry 1 had AI that worked together to use strategies, I think they used LUA scripting for it.

If the player model has the full body model, the camera can be appended to the eye area. So if the facing direction of the eyes changes with the body animation sequences/actions, so will the camera. Maybe create an option to disable something like that.

I just think it would be cool when using VR headsets, especially if the FPS has martial art combat involved. For example when you lean back to kick or the camera swings with the head when doing a butterfly twist kick.

BielBdeLuna commented 8 years ago

@DanielGibson doom3 has a following script too, and it can be implemented alongside a combat state, so you get a npc that fight alongside with you.

what "movement stuff" are you referring to?

@Yetta1 LUA might have lists if there are groups involved, but in Far Cry there were groups of enemies acting together? there were in the boats where on character drove the boat and the other shot with it's machine-gun, but this isn't a group action. I mean, to have a pyramidal structure where one character gave orders to the others, or that an action needed to be completed with two characters (and those decided to act in conjunction) I remember the attack to the Freedom camp in S.T.A.L.K.E.R. by the Duty forces, those are a group of 5-6 soldiers, and one of them is the chief, they attack the camp, and if the chief dies, then one of surviving team member takes the lead. the leader keeps barking orders, I don't know if they follow him or it's just for shows but the pyramidal structure is there.

a full body model could be implemented, and has been implemented in other mods in the past, the thing with VR is that you need another device to track the body, maybe a Kinect. and deactivate the body track in those special animations. this is all outside the scope of the idTechX scripting, only with c++ informing the scripting can this be implemented.

ghost commented 8 years ago

I remember in Far Cry in some situations when sneaking around the jungle, that if a enemy spotted you, he would signal another enemy, then they would try circle around to flank from the side or behind, other times they would just fire or signal a jeep close by.

I guess using the Kinect one could use it as the controller for the action types, almost like using a kind of sign language to trigger moves. I've seen some people creating glove devices making use of sensors and actuators to control player hands and actions in VR environments, maybe combine that with a Kinect. There is another device which looks more like a baby walking trainer that straps the person in so they don't slip while running on the slippery surface, it also reads jumps from the user.

ghost commented 8 years ago

A script that switches from first person to third person would be nice too through a key or possibly the mouse wheel or when switching between melee and ranged attacks.

DanielGibson commented 8 years ago

isn't there a CVar for that?

kortemik commented 8 years ago

pm_thirdperson 1 if i recall

On Fri, Jul 31, 2015 at 10:53 PM, Daniel Gibson notifications@github.com wrote:

isn't there a CVar for that?

— Reply to this email directly or view it on GitHub https://github.com/OpenTechEngine/OpenTechBFG/issues/63#issuecomment-126797061 .

ghost commented 8 years ago

Yes D3 does have that cvar, the Ruiner mod for D3 did a good job at using the third person view, there is a offset for the player character as well through a cvar, however there is a lack of control for the positioning. The third person cvar however removes the crosshair if I recall correctly.

BielBdeLuna commented 8 years ago

even if I consider cvar changes via scripts a no no, it could be done. I'll add a sub for this

you can toggle cvars too

you can:

bind p toggle pm_Thirdperson

or

bind o toggle r_showtris 3

it would be great to add a "sys.thirdperson" function just like "sys.firstperson"

ghost commented 8 years ago

I'll have to take a look at the code and see how it controls the models and camera, even though I wouldn't know what half of it means. Luckily I still need to rig a player model, so we could discuss how the rig should be handled in game. An updated bone handling system would be great as id tech has a very basic system, leaving little room for advanced rigs controlling facial muscle and body muscles.

I recently watched the Witcher 3 trailer and noticed they used a cloth simulation on the witches skin to create a realistic skin twist as the torso bends away from the hips, of course that could also be faked by blending normal maps in a sequence depending on the movement.

I was wondering about patches earlier and landscapes, if it would be possible to manipulate the landscape mesh realtime, like creating cuts, for example a earthquake spell tearing the landscape and knocking rock slabs up, or blowing holes into surface with explosives.

BielBdeLuna commented 8 years ago

I was thinking something more akin to what valve did, vertex shapes controlled by percentages.

but let's first get to id level then we think with additional tech

for lanscapes we should first be able to make them, I', not saying make the actual 3d model of the lanscape, but to be able to render it efficiently and with some sort of LOD system.

ghost commented 8 years ago

Never really played around with their editor, i'm guessing it is similar to how Sauerbraten carves cubes in percentages. Just played Kkrieger, 96kb 3D shooter, mind blown.