UT2K4 Bot Dev Blog

February 9, 2010

Learned the value of initializing your variables today. Apparently, when creating a char* the data could be miss read as a break point. So, one has to use memset to set all the memory for the char* to 0. This keeps the memory clean and certain combinations cannot occur. Anyway, finished creating the message parser so I now have a class that parses the messages coming from UT2K4's bot interface and puts the data into a structure. Now I need to decide what to do with this information. I'm debating on either creating a list of classes to manage the data and remove the intermediate structure or just parsing the structure and pulling out that valid data. I'm sure I don't need all this information. I might have a memory leak as well. char* are a pain in the A##.

Yeah, fixed the memory leak.

January 22, 2010

So I started this project about two weeks ago. I'm using libs from the Distrbuted Processing project (I've finally learned to make more re-usable code). Through making this I've had to update the comms lib to better handle receiving larger amounts of data. The issue was I would grab only 512b then it would check to send stuff then go back to recv. I just changed it to stay in recv until it finished recv'ing. It shouldn't have to send in the middle of a recv. Also, I created the message parsing code. There maybe some memory leak in this code? I do news a lot but when I try to delete them I get an error. I watched the memory usage and it didn't go up at all. I'm assuming that because it's a class var the class some how manages it. But when the app is more functional I'll have to revisit this code to make sure it's not leaking.

wiki/projects/games/botprize/devblog.txt · Last modified: 2020/11/19 14:21 by 127.0.0.1
Back to top
CC Attribution-Share Alike 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0