Blog 3

Weekly Roundup – Made with

This week was the final week away from the Designers, it is going to be great working with the Designers again starting next week, I bet the Designers miss the Programmers too! We are coming back with new programmer-y knowledge, therefore more technical ability, which the Designers can take advantage of when we choose what group we would like to join after the Designers pitch to us. I am assuming two things here: that the Designers have their briefs already, and that they are pitching to us, for us to decide who we would like to work with. I am going to re-guess and say that Monday the Programmers will be separate and the Designers will receive their brief, and then on Wednesday they pitch it to us. I am saying this as previous times we have received briefs, we have had one day in between that day we receive the brief and the pitch presentation day, the whole weekend would be too long for the Designers to have had the brief.

We were supposed to have finished with our KillBots last week Wednesday, but as stated in the previous blog, no-one had a functional pathfinding bot, so we delayed it till this week, or at least it was planned for this week…

Both Monday and Wednesday were spent working on our bots, we had all come back from the weekend with semi-functional bots, but Ryan’s bot would do unnecessarily long and complex paths as well as sometimes wanting to go inside a wall, Eli’s bot was bugging out a lot, and my pathfinding was all in console and my bot didn’t have instructions of the path. Monday was spent mostly working out Ryan’s problems. On the side I fixed a couple of my bugs I was having, as well as started building a system to get my bot to move along the generated path. Greg showed us the theory behind his pathfinding system creation, and it sounded really cool, definitely easier to implement, it was just a tad slower, but it looked easier to work with.

Wednesday came around and again, none of our bots were working exactly how we wanted them to, Ryan’s bot was now pathing over locations a few times before coming to the finish point, my bot was only moving between the first and second node of the path, and Eli’s pathfinding code needed to be rewritten again.

My problem arose through the way I was switching nodes, it was in a for loop and would only temporarily change the node wanted for that iteration, and would totally discard it for the next iteration, bringing it back to the current node the bot was on (when it reached node 1, it would say to go to node 2 next time the for loop was hit, but next time it would say you wanted node 1 so now that you are on it, go to node 2). It was a simple fix, Greg just deleted the for loop and instead put an if statement in checking the location and incrementing a variable and then another if statement (not nested) would move to the location of the node[incrementedVariable].

With Eli’s bot, we implemented Greg’s pathfinding solution, and man, it was simple to implement, it was great! I wish we all knew about it sooner, but I guess Greg wanted to give us the challenge of trying to do an industry-standard pathfinding solution like A*, D*, Dijkstra or Breadth-First. I don’t know if Ryan’s bot was fixed up a bit, there was so much code changed in everyone’s bot, I have forgotten.

We all ran into an issue which Greg intentionally put in to trick us. There were some 1-width diagonal walls on the map, which all our bots would attempt to pathfind through because of the 0-pixel width between the two diagonal walls (to our bots it looks like a valid solution to path-find through as there is nothing it has to go through, but our bots are wider than 0-pixels). Ryan had left by the time Eli and I had started implementing a solution, when Greg came along and told us we were tackling it slightly wrong. Greg’s solution made sense, checking if there is a wall to the left 1 square AND up 1 square when the map creator is in action, if so, make the square the map creator is currently on, a phantom wall. We added this solution to Eli’s bot before we left as we had gone an hour over the assigned lesson time, luckily no classes were in need of the room we were in for that time as we achieved a lot in that extra hour.

Over this weekend I worked on my bot a bit more, adding the diagonal-wall solution to my bot, adding some new features. One feature would plot out the path the bot wants to follow with ‘*’s, flashing ‘*’s, really cool (to me anyway). The second was closely related, being that I added an ‘*’ to the end location, the finish of the path, still flashing like the path node ‘*’s, but this time, a font size of 20 more.

I also fixed some bugs I have had for a while. The bugs I fixed included:

  • When I get hit or run into a wall, a text message pops up saying “Welcome to Hell”, but when I would get hit once, this message would continuously show until a new round started. I was checking if healthMax > current health, which if I would get hit once, would then always be true until my health was reset. Easily fixed.
  • The top wall, when the map would be scanned over and created, would always have a couple of holes in it, in random locations, meaning my bot had a chance of trying to path-find through a wall if the path was created going through this wall. I thought I could just force walkability to ‘unwalkable’ (meaning it is a wall) if the y position was 0, but that didn’t work, so instead I had to do if it the y position was at 1, so my bot thinks that there is only a one-high space to path through at the top of the map, instead of two-high, but it now doesn’t have an holes, so it will have to do.
  • My bot would find an enemy and then shoot between 90 and 180 degrees away from it, very weird as when doing the first tournament, it worked correctly, and I made sure I didn’t change my formula. I had to create a simpler formula and that works alright, not great, but alright, at least it aims and fires near or at the enemy all the time now, not randomly shooting off into the distance.

This Monday will be the bot tournament for sure, I know Ryan and Eli only had a few little things to do to their bots still, which could have easily been achieved over the three-day weekend.

Tomorrow’s plan is to fill in my KPI form as we have our KPI meetings in Week 7. If you have been reading my blog since last trimester, you may remember me talking about KPI meetings, they are pretty important, and will help me realise what I am doing wrong and what I am doing right, as well as helping me plan out the rest of the trimester. I will not make the same mistake as I did last trimester, and write 1000 words for each KPI, totalling a whopping 10k words as there were 10 KPIs to write about. That was very unnecessary as I learnt pretty quickly when I came to class the day after finishing writing them as no one had done close to that, everyone averaging 2000 words total. I did have the best KPI meeting experience last trimester though, as my facilitators did have a lot of insight into how I think I am going and what I want to achieve, as I went into heavy detail, so it is tempting to do the same again, but I have set myself 8 hours to do all the KPIs this trimester instead of the 20 hours it took me to write the 10,000 words last trimester.

It is time to sign out again, I am very excited to be back with the Designers this week coming, excited to be back in a game development environment, back working with fellow Designer friends.

This is Daniel Jochem, signing out.