![]() Then I need to place another structure close to that structure. Then I place the structure and call that my new start point. So I need to start at the spawn and work outwards in a circle until I find a free square that is more than 1 square away. Today I intend to create a basic algorithm to create efficient building placement to minimize travel time. To give an example I started with my AI placing structures in a random free square within 10 squares of my creep(minion) spawning point. High level players go so far as to write their own pathing and search functions but to start with there's so much to do that you'll just want to get the basics in place and improve on it later. You can make do with very inefficient code to begin with but as your AI empire grows you can find your CPU usage increasing exponentially. The beauty of Screeps is that your CPU and memory are limited. Ok so it's a scripting game? New languages aside, how does it make me a better software developer if the difficult functions like path-finding and searching are already implemented? If you have never developed software before you will want to do a day or two of Javascript practice before starting to work on the game, there is a tutorial at which is recommended on the Screeps page to get you started The online tutorial is available at !/sim/tutorial You can complete the (free) online tutorial and then dive straight into the game with the AI you have developed up to that point. Many of the necessities like path-finding are available in the API so it doesn't take you weeks of work to get going. This means that you can switch languages at will, giving you full freedom to practice that new language you're learning on real problems. A list of these languages can be found at (not my page ). The language used is NodeJS-like Javascript with the lodash library included, however you can use any language which compiles to Javascript in order to write your code. Screeps is a strategic MMO where you write your own AI. Screeps is a game, but it also tricks you into spending hours on computer science problems without realizing it should be considered work. In the last week I have put in 25 hours of self development and I'm still looking forward to doing more. Towards the end of the holidays I found Screeps ( in the Steam sale. I usually manage to force myself to do an average of three or four hours a week of self development which I felt was pretty good considering how long I've been in the job. It can be very difficult to keep this up when most of these languages sink back into obscurity several months later. ![]() ![]() In order to stay relevant we need to put in the time outside of work to try out these new languages. ![]() Every year there seem to be more and more "Java killers", "Java killer-killers" and revolutionary paradigm shifts( Usually from Object-oriented to functional and back again ). ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
February 2023
Categories |