Jump to content

problems with LE


Chiblue
 Share

Recommended Posts

I have now found myself back working with Dark GDK, which really is disappointing for me as I really like the LE tools especially the integration of the Editor and LUA. But I though it important that I post why I went back to comething that is for the most part less functional...

 

There are primarily 2 issues I have with LE, the first is the lack of any AI functionality, yes there are several AI libraries you can get but the ones I have used really do not integrate very well and I find my AI functionality struggling mainly due to inconsistencies between LE and the AI engine... strange enough the one I have most success with was Dark AI, but the collision and movement mechanisms took a lot of effort to get working and still had glitches...

 

Secondaly, I had significant problems with the raycasting which continually hung my game loop.. this was basically providing an ingame range finder which continually casted to find distance to objects and displayed them on the scope...

 

I would ask that LE adopts an AI and provides some support for it, or develop thier own... I am not sure what to do about the raycast problem, and maybe the latest version fixed it, I will have to try...

 

Anyway just wanted to post my thoughts... this is not intended as a criticism more a wish to use the engine..

If it's not Tactical realism then you are just playing..

Link to comment
Share on other sites

When you talk about AI, you mean pathfinding. AI has nothing to do with pathfinding, for example a good AI could be that if enemy see player, he would do nothing. That's how most people act in the real world.

 

You must be doing something wrong with raycasting, because I have made a realtime raycasting rain with no significant FPS loss. So you can do thousands of raycasts per second and your FPS won't go down a bit. Of course you need to use EntityPick() for raycasting, since all other raycastig functions are **** and not working correctly, and LE is a entity based engine anyway, so you don't need any other raycasts.

Ryzen 9 RX 6800M ■ 16GB XF8 Windows 11 ■
Ultra ■ LE 2.53DWS 5.6  Reaper ■ C/C++ C# ■ Fortran 2008 ■ Story ■
■ Homepage: https://canardia.com ■

Link to comment
Share on other sites

So you can do thousands of raycasts per second and your FPS won't go down a bit.

 

 

Really? not one bit?

AMD Bulldozer FX-4 Quad Core 4100 Black Edition

2 x 4GB DDR3 1333Mhz Memory

Gigabyte GeForce GTX 550 Ti OC 1024MB GDDR5

Windows 7 Home 64 bit

 

BlitzMax 1.50 • Lua 5.1 MaxGUI 1.41 • UU3D Pro • MessiahStudio Pro • Silo Pro

3D Coat • ShaderMap Pro • Hexagon 2 • Photoshop, Gimp & Paint.NET

 

LE 2.5/3.4 • Skyline UE4 • CE3 SDK • Unity 5 • Esenthel Engine 2.0

 

Marleys Ghost's YouTube Channel Marleys Ghost's Blog

 

"I used to be alive like you .... then I took an arrow to the head"

Link to comment
Share on other sites

not with a 1000 but with more you will? well you said thousands, plural, so a minimum of 2000 would not ..

 

Make up your mind :)

AMD Bulldozer FX-4 Quad Core 4100 Black Edition

2 x 4GB DDR3 1333Mhz Memory

Gigabyte GeForce GTX 550 Ti OC 1024MB GDDR5

Windows 7 Home 64 bit

 

BlitzMax 1.50 • Lua 5.1 MaxGUI 1.41 • UU3D Pro • MessiahStudio Pro • Silo Pro

3D Coat • ShaderMap Pro • Hexagon 2 • Photoshop, Gimp & Paint.NET

 

LE 2.5/3.4 • Skyline UE4 • CE3 SDK • Unity 5 • Esenthel Engine 2.0

 

Marleys Ghost's YouTube Channel Marleys Ghost's Blog

 

"I used to be alive like you .... then I took an arrow to the head"

Link to comment
Share on other sites

you dont half talk fluff mika :)

AMD Bulldozer FX-4 Quad Core 4100 Black Edition

2 x 4GB DDR3 1333Mhz Memory

Gigabyte GeForce GTX 550 Ti OC 1024MB GDDR5

Windows 7 Home 64 bit

 

BlitzMax 1.50 • Lua 5.1 MaxGUI 1.41 • UU3D Pro • MessiahStudio Pro • Silo Pro

3D Coat • ShaderMap Pro • Hexagon 2 • Photoshop, Gimp & Paint.NET

 

LE 2.5/3.4 • Skyline UE4 • CE3 SDK • Unity 5 • Esenthel Engine 2.0

 

Marleys Ghost's YouTube Channel Marleys Ghost's Blog

 

"I used to be alive like you .... then I took an arrow to the head"

Link to comment
Share on other sites

what macklebee said, infact the problem was specific to transitioning between hitting an object and then nothing or distant terrain...

 

Also I am not talking simply path finding, although this is part of it... what I need is a single stateAL that will can be switching into differed behavours based on sounds, hits or other events...

 

Dark AI provides much of this, but using it in LE is very messy...

 

But this said I can work around this messy AI integration, if only, if only the raycast di not hang... :)

If it's not Tactical realism then you are just playing..

Link to comment
Share on other sites

and as long as none of those 1000 raycasts hit an object with a high poly count... well, it doesn't affect the fps, it just completely pauses the game for a second... :)

Ah, that might be the reason why it works for me, and not for others.

I tested it on a huge building, which was made out of many small instanced models.

I think that's how buildings should be made anyway, since at some point you want to demolish them in the game.

Ryzen 9 RX 6800M ■ 16GB XF8 Windows 11 ■
Ultra ■ LE 2.53DWS 5.6  Reaper ■ C/C++ C# ■ Fortran 2008 ■ Story ■
■ Homepage: https://canardia.com ■

Link to comment
Share on other sites

I was interested to see how you got on with the DarkAI library when you previously indicated you were using it. My personal feeling is that you are better just settling down to writing your own AI routines. AI tends to be fairly well tailored in most games to the games needs and you will never get better results for 'your' game than by designing it yourself. Path finding is a separate thing, but just as necessary and could be provided (and in my opinion should) by the game engine SDK. But personally I'd not wait for that either, just roll your own! I can't see Josh ever providing AI other than maybe some very simplistic functions which would be unlikely to be sufficient for any serious game.

 

With regard to the raycast pause problem, I believe the current workaround is to raycast all objects after loading them (presumably on a per level basis) which then avoids this initial first time pause issue in gameplay, but I've not tried it myself.

Intel Core i5 2.66 GHz, Asus P7P55D, 8Gb DDR3 RAM, GTX460 1Gb DDR5, Windows 7 (x64), LE Editor, GMax, 3DWS, UU3D Pro, Texture Maker Pro, Shader Map Pro. Development language: C/C++

Link to comment
Share on other sites

With regard to the raycast pause problem, I believe the current workaround is to raycast all objects after loading them (presumably on a per level basis) which then avoids this initial first time pause issue in gameplay, but I've not tried it myself

 

Can you explain what you mean by this, are you saying that you need to do a ray cast at all objects before you enter your game?

 

If so I am confused, because your player is moving would the raycast origin continually change and make any pre-raycast worhtless, or is there something about the raycast engine that I am missing?

 

Also on the Dark AI, I did get it working and it worked pretty well, I had some problems integrating it with LE but I got around that, the main thing I found was becuase the AI is not directly controlling your characters you have to ensure that the AI does not get to far ahead of the characters animated movement... also getting the AI obstacles registered was fun but again I got this once I understood the clockwise/anti clockwise BS, as usual the doc sucks and the forums are about as helpfull as a knife at a gun fight...

 

Anyway, if you are interested I would be happy to put together some doc on how I integrated it for you?

If it's not Tactical realism then you are just playing..

Link to comment
Share on other sites

Can you explain what you mean by this, are you saying that you need to do a ray cast at all objects before you enter your game?

My understanding is minimal, Josh would be better explaining this, but I believe the engine creates an internal structure presumably for each object which is associated with picking. Large objects with lots of surfaces seem to take a while to construct and I believe Josh suggested he might do this internally at the time the model was loaded but for now we have to do it ourselves by triggering this with a raycast. It only occures the first time the model is raycast.

 

If I'm way off the mark I'm sure someone will correct me on this or fill in the detail.

 

as usual the doc sucks and the forums are about as helpfull as a knife at a gun fight...

lol

 

Anyway, if you are interested I would be happy to put together some doc on how I integrated it for you?

Yes and thanks, this would be of interest. I'm part way through my own AI implementation but I'd be interested in seeing how this performs!

Intel Core i5 2.66 GHz, Asus P7P55D, 8Gb DDR3 RAM, GTX460 1Gb DDR5, Windows 7 (x64), LE Editor, GMax, 3DWS, UU3D Pro, Texture Maker Pro, Shader Map Pro. Development language: C/C++

Link to comment
Share on other sites

Maybe we should start a LE community project to build a AI engine which is intergrated to LE.

 

I would be interested in working with anyone who would like to build something, let me know and I will post my test code for dark ai, which uses open gl not LE but the concepts are the same.

If it's not Tactical realism then you are just playing..

Link to comment
Share on other sites

Maybe we should start a LE community project to build a AI engine which is intergrated to LE.

It's a nice idea but unfortunately my experience of community projects in general has not been a good one, they tend to collapse long before they produce anything useful and that's if they even get that far!

 

I looked at Dark AI initially and although I could see the possibility of it integrating into Leadwerks it didn't look immediately obvious how easy that integration might be and would involve registering entities rather than DarkBasic objects with it and reading back their positions rather than have it directly control the movement. Plus it looked like you needed to register all of the geometry vertices for the path finding side. On top of this it didn't appear on the face of it to offer the level of AI I wanted and wasn't really capable of any degree of customization coming as a DLL encapsulated plugin or lib file. Whilst it may have represented a quicker route of getting something up and running it was never going to substitute for a custom designed AI system. As I never actually purchased it to play with it I may be completely off the mark again here so feel free to correct me if any of those assumptions are incorrect.

 

It's great to hear that you have it integrated though and I'd certainly be interested in seeing a working demo at some point but my interest in it is more out of curiosity than a real need.

Intel Core i5 2.66 GHz, Asus P7P55D, 8Gb DDR3 RAM, GTX460 1Gb DDR5, Windows 7 (x64), LE Editor, GMax, 3DWS, UU3D Pro, Texture Maker Pro, Shader Map Pro. Development language: C/C++

Link to comment
Share on other sites

I have attached a couple of classes and some code I used within my project to use the dark AI engine with LE.

 

You will need to add the usual AIStart and AIUpdate calls in your game loop..

 

sorry the code is not very clean I did this really as an experiment to see if it worked, you do have to play around with the settings for the AI to get the behaviour you wish to have...

 

I used this with Gamelib this is why you see TSCene everywhere....

 

I have tried to document within the files what they do and that the functions do for you...

 

I hope you can get this working...

Dark AI for LE.zip

If it's not Tactical realism then you are just playing..

Link to comment
Share on other sites

Whilst it may have represented a quicker route of getting something up and running it was never going to substitute for a custom designed AI system. As I never actually purchased it to play with it I may be completely off the mark again here so feel free to correct me if any of those assumptions are incorrect.

 

I understand why you say this, but in my experience with Dark AI it is pretty extensive and can be used to do many things.. I had the AI players responding to sounds the FPS player made like walking and firing.. you can set the AI to stay within areas, follow paths or free roam, or a combination of all 3... you can also trigger investigation to specific locations... or patrols etc...

 

I have attached the Dark AI help file, this will assist in understand some of the capabilities...

Dark AI.zip

If it's not Tactical realism then you are just playing..

Link to comment
Share on other sites

Maybe we should start a LE community project to build a AI engine which is intergrated to LE.

 

Lumooja already started one, and of all people, I was having a go at the AI. My 2.0 didn't mix well with the 2.3 everyone else was using (different GameLib versions). Really, it's not a task I should have taken up in the first place. I'm more likely to get it working for myself, and then teach everyone based on my own system that works. Building it with the idea of integrating it to other people's programs wasn't the way to do it. Really I needed to get something working at all before adding in the flexibility of making it work.

 

I haven't given up on this at all, and I still do fully intend sharing the theories and algorithms once I believe it to be in a finished state. But it's by no means a quick thing especially nNot with my recent attempts at learning how to integrate newton separately (which I believe is now more or less done). But I did state on my only blog entry so far, that I would be going for network support before going for pathfinding and intelligent behaviour of computer controlled players. Because I believe networking (as difficult as it is) is quicker to get up and running than any type of computer intelligence.

LE Version: 2.50 (Eventually)

Link to comment
Share on other sites

Because I believe networking (as difficult as it is) is quicker to get up and running than any type of computer intelligence.

 

I agree with this completely and there is much more demand for Multiplayer, especially if you can build a dedicated server for your game. But having an AI in my opinion is a must, becuase very few people will initially jump into MP environment without having the option to play in the environment first to get a feel for the controls, look and feel and playability of the game... Take games like BF2 and BF2142, they had no true single player option in the trditional sense, but they gave you enough of an AI challenge to play the maps and get a feel for the game... just my opinion for as much as it's worth :)

If it's not Tactical realism then you are just playing..

Link to comment
Share on other sites

I have attached a couple of classes and some code I used within my project to use the dark AI engine with LE.

Cheers Chiblue, that's really good of you. I'll definitely have a look at this.

 

 

I understand why you say this, but in my experience with Dark AI it is pretty extensive and can be used to do many things.. I had the AI players responding to sounds the FPS player made like walking and firing.. you can set the AI to stay within areas, follow paths or free roam, or a combination of all 3... you can also trigger investigation to specific locations... or patrols etc...

 

I have attached the Dark AI help file, this will assist in understand some of the capabilities...

Yeah, now you have attached the help file I'll be able to see it's capabilities in more detail hopefully. It's not that I don't think it's quite impressive because I actually do. My main concern is the fact that you have no access to the code to amend or extend it. One of the things I want to develop is fairly detailed interaction between individual members of patrol groups whilst under fire where they will cover individuals whilst they move to cover points in a co-ordinated and realistic way and this is just a single example. From what I'd seen of Dark AI I got the impression that this level of control was probably not possible. But I'd like to be proved wrong. The other thing is by writing my own AI routines I get experience in doing this which is also invaluable.

 

Lumooja already started one, and of all people, I was having a go at the AI.

Mumbles has a very good point here, I was forgetting about GameLib. I've not really got involved in that due to mainly lack of time with what little time I have being ploughed into my own game engine design but also because I found the initial GameLib very unstructured (I've not looked at it in quite some time though to be honest) which is just a reflection of my own game code design and not meant as a direct criticism of Lumooja and other contributors. We all have our own ideas on things and design methodologies! But if you wanted to get involved in some joint AI design then that may well be a good place to start. Might be worth a quick word with Mumbles on that one.

 

If you ever want to discuss ideas on AI by the way, or anything else game related for that matter, don’t hesitate to PM me.

Intel Core i5 2.66 GHz, Asus P7P55D, 8Gb DDR3 RAM, GTX460 1Gb DDR5, Windows 7 (x64), LE Editor, GMax, 3DWS, UU3D Pro, Texture Maker Pro, Shader Map Pro. Development language: C/C++

Link to comment
Share on other sites

I used gamelib to get started but found that although it is useful to get started, if you are more critical of your own content then it does get somewhat combersome, and please not rebukes, gamelib is great for what it is intended for...

 

Anyway... take a look at AIEntityFollowPlayer, AISetEntityDefending, AITeamFollowPlayer, AITeamSeparate whic allows you to get multiple AI entities working as a team...

 

I have a little test program that does not use AI but allows you easily change the code to test out the different AI and add multiple AI entities of any type, plus play with the controls..

If it's not Tactical realism then you are just playing..

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   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.

 Share

×
×
  • Create New...