Things like filtering/sorting screeps by type and hitpoints was hard when I started.Īnother improvement for newbies would be to make RoomPositions serialize into Memory out of the box.Īnother improvement would be to document the edge cases/make explicit when elements get added to Game.creeps (as a noob I expected it to happen after spawning, but it happens at the start). In particular, lodash has a fairly idiomatic usage pattern and having more examples of that with a screeps context would have been really helpful.
One improvement that could be made is adding more code examples to the wiki. So I guess in summary, if Screeps were using C# instead of JS, I would have found it a lot easier.
I still don't know how to write nice OOP code in JS. Maybe some sort of object viewer could be useful for newbies. Most of my early bugs were fixed once I learned how to do JSON.stringify() in the console. Since JS is typeless, as a newbie I was often using the wrong fields and getting memory errors. I will also second Dilbe's comments around debugging. I can look at the code and figure out which actions will occur. It would be cool if this part of the API were more self-documenting in some way - i.e. I'm not sure I understand all the tricks of the simultaneous actions system even today.
The simultanius actions was a bit unintuitive at the start, but there is a good article about how it works, that helped a lot.īackground: software engineer with 26 years of experience. I still see a lot of room for improvement in what i have now, but it works good enough. I had a lot of fun getting to understand the source keeper rooms. My move to other room code does it in 4 different ways one after the other until the creep stays in the room i want it to (-: This seems to work, so i'll keep it like this for now. The creeps very often do not what i expect when moving to other rooms. At the start console logs are good enough, but now i have a few rooms it's hard to get debug logging for the small bits that go wrong.Īs for gameplay, I still don't understand pathing. I also miss being able to step through code when debugging. Furthermore navigating through the files is very difficult and i still can't get the files/folders set up in a way that i find clear. The biggest problem i had was that i can not code object oriented but only procedural. I found the tutorial very helpful and that got me started with the basics. Kiting can go wrong awfully quickly around swamps or room edges.īy the way, I am currently moving into your neighborhood (though a portal).I started this game a bit more than a month ago. I don't see how this in particular makes a difference. Remember the Source Keeper gets damaged reflected from your creep as well. But the creep I had designed is working quite well. If the damage would have been reflected it would be 700 damage (400 ranged and attack, 300 reflected) per tick, which my creep would not have been able to survive. My creep had exactly the attack power to kill the source keeper within these 9 ticks.
I assumed 400 HP/t (ranged and close) attack power by the source keeper. That means an enemy creep would be able to do 9 times the damage of its ATTACK parts, if it is attacked by eight creeps?ĭoes this apply to NPCs, too? I had calculated a fight with a Source Keeper, for a specialized creep. I have seen creeps of you creeping around me It might be more expensive, but just to think about the needed healing for attacking other attack creeps makes me shiver.īy the way, I am currently moving into your neighborhood (though a portal). Or does this not apply if the creep I am attacking is attacking me, too?Īnd a last question: doesn't this give a ranged attack massive advantage over close range attack? You can easily create a creep which is able to kite.
If the damage would have been reflected it would be 700 damage (400 ranged and attack, 300 reflected) per tick, which my creep would not have been able to survive.īut the creep I had designed is working quite well. I had calculated a fight with a Source Keeper, for a specialized creep. That means an enemy creep would be able to do 9 times the damage of its ATTACK parts, if it is attacked by eight creeps?