So I got the agent to move towards food/water when it see it. Which is progress. However it doesn't switch back and forth, it just finds one and sticks to it. I also cheated a bit to make it happen. Well I broke how I want the agent to be able to interact with the world so I'm going to go back and fix it up, but it should be reasonably simple to change it. Basically I just turned the agent towards the food/water instead of having the agent use forces in the physics engine to turn. I hope, HOPE, it doesn't take much to make it work with forces. But right now I need sleep!
0 Comments
So Joshua convinced me to try out Unity instead of using Panda3D. So far I must say it is going very well. Unity has been a very clean interface and the gui has been relatively easy to use. It did require me to watch tutorials for basically an entire day before really getting started but the learning curve was well worth it. I also am having to learn C# but thus far no serious issues with that.
I'm well past where I had gotten to in Panda3D on this things I'm actually worried about. I haven't try to do anything with animation nor have I worried about the camera clipping through the ground. Right now the agent (the green ball) moves without any intelligence. Its hydration and satiation slowly decrease, it is removed from the scene when either hits zero. I have placed a water source and a food source into the scene, when the agent is near them it refills its hydration and satiation. I hope to have the agent working as a simple reflex agent by the end of the week. It should, in theory, be relatively simple. I'm pretty excited about it! So I am being stumped completely by what should be a incredibly simple issue to resolve. I am trying to make a simple third person camera. Everything was working great until I tried to have the camera not pass through the terrain. For some reason that completely screwed up the whole bloody system! My WTF/minute have hit the roof! Seriously I searched my entire code base and I never move the camera directly and yet, and YET!, its position doesn't stay (0,0,0)! Sigh.... I'll figure it out, I think I'm going to rewrite the entire GameCamera class that I've been working on. You'd think that there would be a forum post some where about a Third Person Camera using the Bullet Physics engine with Panda3D but either I'm completely worthless at googling issues (which I kinda am, lets be honest) or one doesn't exist.
I'm also thinking about just going to a FPS style camera for now so that I can continue working on getting a world created for some computer controlled agents since that is after all the whole point of this exercise. Wish me luck! EDIT: Okay so, as is always the case with these issues, I now feel stupid :). I some how deleted the line of code that turned off the native mouse control that Panda3D comes with... Sigh. Its cool it only took me 3 days to notice. I got some more work done on the basic Panda3D frame work. Basically I just put what I had together although getting a player controlled actor into the world that used the Bullet engine was more complicated than I expected. In the end I did get everything to play nicely together thanks to a third party class by coppertop. So basically its a world with working physics where the controller can move the character useing wasd controls, move the camera around the character with the mouse and turn the character with the mouse (depending on mouse buttons being pushed down. Also you can zoom the camera with the mouse wheel. Nothing impressive just yet but I am unfortunately lacking on free time the next few days, hopefully sunday I'll be able to get some good work done again!
I've started experimenting with the Panda3D engine. I spent all of yesterday working on it and here's what I've got so far! First I worked on getting a basic scene created. I extended the tutorial that they have as an introduction. The camera follows the character and you can rotate the camera around the character. You can move the character with wasd controls. Oh, and you can push the button in the upper left hand corner and it prints something to the console, serious stuff there! Once I got a basic understanding of the underlying engine I decided to have a look at some of the physics options that they have working with it. I choose the Bullet physics engine. No idea if that was the right choice but it looked to have the most documentation with it. The ball falls and then rolls around the terrain, nothing too exciting and all I did was take an example and rewrite it to make it more OOP. All in all I'm pretty happy with that for one days work trying to get an understanding of the basics of the engine. The documentation with Panda3D is occasionally spotty but it does seem to be a fairly simple engine to use.
|