Stargazing

Well, more work on the space game, and it’s now in a state ready for AIs. Anyone willing to give writing a simple AI a go?

Today between classes I reworked the ship and bullet list management. Previously I had written up a nice generic linked list manager, which worked quite well – and expanded as needed to fit into the available memory of the host machine. However, speedy it was not, due to all the object creation and removal required to manage the list, and as a result caused quite a drop in performance for large games (a 5,000 ship random battle took several minutes just to populate the list on my machine). Replacing it with basic, static lists reduces some of the functionality and increases the memory requirements, but results in a massive performance increase.

Space Game running with a large amount of ships

Above is a screenshot of the engine running a battle of initially 5000 ships (with each ship’s movement and firing being completely random).

As for my USB stack, this week I’ll finally have some time to work on it again. In the meantime, I’ve updated both the basic library zip on my site, and the USB Mouse demonstration firmware to the latest library code.

 

Comments

No comments so far.

Leave a Reply

 
(will not be published)
 
 
Comment
 
 

 

Vital Stats

  • 35 Years Old
  • Australian
  • Lover of embedded systems
  • Firmware engineer
  • Self-Proclaimed Geek

Latest Blog Posts

RSS