Progress towards v0.02

Post Reply
Gwa2100
Site Admin
Posts: 7
Joined: Tue Jan 29, 2019 3:41 am

Progress towards v0.02

Post by Gwa2100 » Tue Jan 29, 2019 7:14 am

Well I have added a ton more functionality. I have added:
  • the ability of the chicken to remember more than one source of water and food
  • Revamped the looking around abilities of the chicken
  • Restructured the code into proper classes (some of it, about 50% done)
  • Created a parent class for objects called GameObject, to allow for better management later.
I also fixed the rendering bug
The reason it was crashing had to do with the visited tile memory. The memory is held in an array, that should be the same size as the dimensions of the map. We had statically assigned dimensions to the array. So when the chicken traveled outside of the bounds of that array, the data was written outside of the buffer. The object next door was the map vector, which is why it would get corrupted over time.

....but....

By doing all of these changes, the Animal::AI() is now broken, and gets stuck iterating on itself. I will fix that tomorrow.

Gwa2100
Site Admin
Posts: 7
Joined: Tue Jan 29, 2019 3:41 am

Re: Progress towards v0.02

Post by Gwa2100 » Wed Jan 30, 2019 4:22 am

Good news...fixed the AI Issue...so now we have any size maps!

Furthermore, I wanted to get a few more features integrated, so I added the ability for memory of locations to be more than just one location. Right now water and food points are stored in separate vectors. However, after fixing that up, I decided to make the point type a child class of gameobject. This means that through some pointer magic, I will be able to manage all objects in the game under one managing system. I will add that soon.

Hoping to add more functionality later. But this feels like a step in the right direction.

More details below for the fixes:

AI Issue:
Fixed the AI Issue. Chicken now moves.

Issue was in the RandomWalk() function. If it was the first round, it could never advance, and the tile to move to needed to be 5 rounds older. My solution works, but a cheaper solution will be to set the default tile memory to -6 or something. My fix puts two calls to the memory function...may need to return to this.

Cheerio
Posts: 2
Joined: Fri Feb 01, 2019 12:13 am

Re: Progress towards v0.02

Post by Cheerio » Fri Feb 01, 2019 12:18 am

You should include animal husbandry/lineage, that would be great.

Cheerio
Posts: 2
Joined: Fri Feb 01, 2019 12:13 am

Re: Progress towards v0.02

Post by Cheerio » Fri Feb 01, 2019 12:23 am

Could I get a copy of the source code, I would love to see it.

Gwa2100
Site Admin
Posts: 7
Joined: Tue Jan 29, 2019 3:41 am

Re: Progress towards v0.02

Post by Gwa2100 » Fri Feb 01, 2019 6:26 am

Cheerio wrote:
Fri Feb 01, 2019 12:18 am
You should include animal husbandry/lineage, that would be great.
I agree, I am looking into how to lay that out exactly. I am going to start a new forum for ideas and a topic on this. Awesome idea!

Gwa2100
Site Admin
Posts: 7
Joined: Tue Jan 29, 2019 3:41 am

Re: Progress towards v0.02

Post by Gwa2100 » Fri Feb 01, 2019 6:26 am

Cheerio wrote:
Fri Feb 01, 2019 12:23 am
Could I get a copy of the source code, I would love to see it.
I will give you the link via email or private message.

Gwa2100
Site Admin
Posts: 7
Joined: Tue Jan 29, 2019 3:41 am

Re: Progress towards v0.02

Post by Gwa2100 » Mon Feb 04, 2019 7:02 am

Working on the 2D Engine implementation now. Trying to have this out over the next few days.

The first implementation will be completely software rendered. However, for us to reach the goal of rendering over 100 creatures and 200-500 objects on screen, we will likely have to utilize hardware acceleration. That will come a bit later.

Still finalizing the feature requirements for the project. Hoping that this becomes something.

Post Reply