Sektor 2

Marko Bjelac
2 min readOct 22, 2018

--

I’m done with the second micro-feature of Sektor. Rudimentary cell selection works!

This feature also brought to you by test-driven development! Although in my own style — check it out on Gitlab.

Graphica no bueno

I tried to do some graphics (basically just the image for the Hub — the initial building now represented by a +), but have decided that it is too hard. OSX Paintbrush doesn’t give me what I want and is buggy. The MacBook Pro touchpad, while really nicely done, doesn’t give me the handling of a mouse. Also, I have lost much of my mad bitmap skillz from my MS Paint days. :( All in all, I would spend huge amounts of time and time is my most limited resource.

If any (bitmap) graphics enthusiast is reading this, you are more than welcome to contact me and offer your services for free! ;)

For now, I will stick to textual representation. Who knows, maybe I’ll get it to look cool like that. :)

Lessons learned

Object literals in Javascript (a.k.a. JSONs) have an internal reference (e.g. like objects in Java), and === works uniquely. Which is yaaay! because I didn’t have to introduce cell ids.

My mangled horror-show sorry excuse of React UI works but I mustn’t forget to call refresh() when I want to see a change on the screen. :)

Spec-by-example works (no surprise there). When I forgot to refresh React, the spec stubbornly passed. The behaviour layer worked like a charm — it’s the presentation (UI) layer that I’ll probably have to improve when I get to it. But its not a priority now.

Up next: Info panel for the selected cell. Slowly moving towards the player actually building something on her own…

--

--