Jump to content

Don't you just hate it when that happens ...

Marleys Ghost

1,840 views

I started out this morning looking to update a test scene that I used for some first person tests I did in C++ after only having the engine for a few weeks and coding in C++ for even less time. Well, that was the plan. I managed to redesign the layout using 3DWS, and threw a few Dexsoft crates and Barrels in. The plan was then to work on textures but as usual after about an hour I had set sail on the good ship "unrelated" for a voyage across the bay of tangents. Don't you just hate it when that happens? :rolleyes:

 

The scene under modification was for my FPS prototype code in Blitzmax, whilst sorting through my code "archives" I came across my basic code for NPC creation with basic Seek : Pursue : Attack Behaviour (an NPC Type using methods which I wrote about here). Integrating it into my FPS prototype was easy enough and an hour and a few more dozen tweaking "tangents" later I had it all working quite well. The video basically shows 3 "settings" for NPC toughness.

 

 

Best viewed in HD

 

Player Control was a bit "twitchy" as I have yet to tweak the Xbox 360 gamepad functions for smoother action, also the screen capture lag did not help :rolleyes:

 

It all still needs a lot of work but I was happy with the results thus far.

 

I guess tomorrow I will do what I was intending to do today ... or maybe not :D



16 Comments


Recommended Comments

Hello Marleys, nice project, that's good to see some gameplay on the engine :unsure:

Are you using recast for pathfinding ?

Share this comment


Link to comment

@Franck : No not Recast, the bug class is autonomous and contains collision avoidance and a "centre of attention algorithm".

 

@Josh : The bugs a class but the player is still a library of functions that I am still "playing" with. I was going to get on with what I did not do yesterday but I'd like to clean up the bug class and tie it into bug "creation" nodes that I can simple place in the scene via the editor so the positions and number of bugs are read from the .sbx. One problem is instancing, I have to have seperate models and scripts to prevent the "do for one do for all" outcome.

 

@Pixel and Dave : Thanks :unsure: still very much a WIP but slowly coalescing.

Share this comment


Link to comment

Very nice video. I also saw some other videos on your channel. The "AI" is pretty good. You must be proud of it :unsure:

Share this comment


Link to comment

@RVL: Well for what it is and does, yes. But the problem with raycasts is the micro freezing on the initial cast, which is the same for the "bullets".Not so bad on really basic shapes or primitives but really noticeable on the "bug" model when firing at it and the Player HUD gun model when the bugs collision rays hit it for the first time (or indeed if one bug casts onto another) Having to use individual models to over come the instancing "do for one do for all" outcome means thus far too much micro freezing.

Share this comment


Link to comment

You had all those grenades and you were using bullets?!! :unsure:

Very impressive and motivational. Curious as to where this will go.

Share this comment


Link to comment
You had all those grenades and you were using bullets?!!

 

@GameCreator : lol yeah, but the bullets are far more fun, and I was just "looking after" the grenades for someone as I was doing some "visuals" for him, so not really my place to show them off ;) besides .. the bullets worked just fine see!! :unsure:

Share this comment


Link to comment

very impressive MG !

good AI work,

i wish i could do that for my cars...

 

 

Thanks diedir, I guess the principle would work for cars, do you mean on a track? if so waypoints would be needed I think.

Share this comment


Link to comment

yes waypoints are the way to go,

i love your spider kill demo, spiders scare me a lot at that scale...

Share this comment


Link to comment
spiders scare me a lot at that scale

 

 

lol, I think any "creepy crawly" which grew to that size would invoke some degree of trepidation.

Share this comment


Link to comment

Nice demo.

A little suggestion maybe you can try to let your ai predict where player is going, as for now it seem more following the last position where player is.

Share this comment


Link to comment

@Joh: More than likely a value set too low in the playervisible function portion of the class, I see what you mean though, probably did not notice whilst unleashing death on them :unsure: I expect a few variables still need tweeking as they are still set for the 3rd person testing I did.

Share this comment


Link to comment

Very good work MG, now if you could just get that pesky spider to "learn" how you play.... :unsure:

 

Instancing will be a very nice update..

Share this comment


Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Add a comment...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Blog Entries

    • By Josh in Josh's Dev Blog 2
      I've restructured the plugin SDK for our new engine and created a new repository on Github here:
      https://github.com/Leadwerks/PluginSDK
      The GMF2 format will only be used as an internal data transfer protocol for model loader plugins. Our main supported file format will be GLTF.
      As of now, the plugin system can be used to write texture loaders for different file formats, model loaders, or to modify behavior of particles in the new particle system. The FreeImage texture loader has been moved out of the core engine and into a plugin so you no longer have to include the FreeImage DLL unless you want to use it. The main supported texture format will be DDS, but the FreeImage plugin supports many common image file formats.
    • By Admin in Leadwerks Company Blog 0
      The GMF2 file format provides the fastest possible load times for 3D models. A preliminary specification and SDK for loading and saving files in the GMF2 file format is now available on GitHub here:
      A Quake 3 MD3 model loader is included as an example.
    • By Josh in Josh's Dev Blog 2
      The Leadwerks 5 beta will soon be updated with particle emitters and an example particle system plugin. Previously, I showed some impressive results with physically interactive particles that collide with and exert forces on the environment. I decided to use the plugin system for controlling particle behavior, as this offers the best performance and can be run on the physics thread. 
      A particle system plugin uses some predefined structures and functions to modify the behavior of particles when they are emitted or as they are updated. This allows for unlimited features to be added to the particle system, because anything you want can be added with a plugin. A system for sending settings to the plugin will be implemented in the future so you can adjust the plugin settings and see the results. The default particle settings and features will probably stay pretty barebones and I will just use the plugin system to add any advanced functionality since it is so flexible.
      void EmitParticle(ParticleModifier* mod, ParticleSystem* particlesystem, Particle* particle) { if (mod->emissionshape == EMISSION_SHAPE_BOX) { particle->position[0] = Random(-mod->area[0], mod->area[0]); particle->position[1] = Random(-mod->area[1], mod->area[1]); particle->position[2] = Random(-mod->area[2], mod->area[2]); } else if (mod->emissionshape == EMISSION_SHAPE_CYLINDER) { particle->position[0] = Random(-mod->area[0], mod->area[0]); particle->position[1] = Random(-mod->area[1], mod->area[1]); particle->position[2] = Random(-mod->area[2], mod->area[2]); auto l = sqrt(particle->position[0] * particle->position[0] + particle->position[1] * particle->position[1] + particle->position[2] * particle->position[2]); if (l > 0.0f) { particle->position[0] /= l; particle->position[1] /= l; particle->position[2] /= l; } } particle->position[0] += particlesystem->matrix[12]; particle->position[1] += particlesystem->matrix[13]; particle->position[2] += particlesystem->matrix[14]; } There are three other new Lua examples included. Coroutines.lua shows how a sequence of actions can be added to an entity before the game starts, and the actions will be executed in order:
      --Create model local model = CreateBox(world) --Add some behaviors to be executed in order model:AddCoroutine(MoveToPoint, Vec3(3,0,0), 2) model:AddCoroutine(MoveToPoint, Vec3(-3,0,0), 2) model:AddCoroutine(MoveToPoint, Vec3(0,0,0), 2) --Main loop while window:Closed() == false do world:Update() world:Render(framebuffer) end This is great for setting up cut scenes or other sequences of events.
      An example showing how to enable tessellation is also included. Tessellation is now a per-camera setting.
      camera:SetTessellation(10) The number you input is the size in pixels of the tessellated primitives. Use zero to disable tessellation. Tessellation is disabled by default on all cameras.
      Finally, an example showing how to use a texture loader plugin is included. All you have to do is load the plugin and after that textures can be loaded in VTF format:
      local vtfloader = LoadPlugin("Plugins/VTF.dll") local tex = LoadTexture("Materials/wall01.vtf")  
×
×
  • Create New...