Ship Ohoy! Narrows is a strategy game inspried by games like FTL, but with it’s own spin on it… and on the high seas of course!
I was on the project from the very start, prototyping, production, polish. I worked mainly on the ship view/sea combat. I was the only programmer during prototyping and the fencing mini game, but was involved in almost every part of the game.
This game is very close to my heart. Near the end the game was so much fun to play that development took forever since every time I needed to test something I got stuck playing…
Unfortunately the game is not very easy to get a hold of. At the time of writing this it only exists on Google’s (now discontinued) mobile VR headset Daydream, or Oculus GO. I hope it will get ported onto more platforms!
Finally started on something I’ve been wanting to do for a very long time. A serious try to port Ripple Dot Zero to haxe, so I can compile it to c++, run it on Windows with full gamepad support and full, smooth framerate!
This is after a few hours of experimenting with openFLs new Tilemap API, and one day of porting (well… mostly rewriting) the tile rendering part of my old engine. Now it runs on a solid 60 fps after compiling to C++, even though there are tons of optimizations to be done.
Right now it renders all static tiles (no animated tiles, and no sprites) from an existing level, and lets the camera move in a huge sine wave over it.
I always forget or mix up how to extract variables from a formula when division is involved, which always slows me down as I have to sit with pen and paper to get it straight. So lets just get it straight and simple here, so I can look it up whenever I need it!
(Note: the one furthest down is the interesting one. Not even sure why I have addition in there, but I let it stay.)
Three months after the initial release we added Pass and Play functionality to Wonderglade, and at the same time added a new mini-game.
I think it is worth mentioning this update in its own post as Hamster Hoops is (in my own humble oppinion) the very best of all the mini games. In this game the greatness of our team really shined through!
I spent over two weeks just prototyping the controls (turns out throwing basket balls using a 3-DOF Daydream controller is not only more difficult than you can imagine, it’s pretty much impossible), and also working very close with our new, and extremely talented game designer to make the challenge interesting enough. Not to forget the awesome 3d-artists who implemented most of the art during the two days I was home sick with the flu.
Wonderglade is the second game from Resolution Games I worked on (also the second game they released). It’s a collection of mini games in a theme park setting, and it was released for Google Daydream, their mobile vr project. The game was released for free, and has really good ratings!
Screenshot from Google Play Store, taken 25 sept 2017
A while back I found all the raw material for a game me and Simon were working on a long time ago (actually before both Ripple and Metro Siberia, so somewhere around 2006 – whoa, thats TEN YEARS ago!!) called Kingsmountain, and I’ve been playing with the idea to try and recreate one of the minigames.
My first attempt was with Haxe, and a 2d skeletal animation tool called Spine. However, the Haxe runtime implementation for Spine was buggy as hell, and I spent many hours trying to animate the running little dude, but finally the bugs made me give up.
Instead I restarted the project in Unity, and here you can see the result after just about 2-3 hours.
Today is the last day of my parental leave. For 6 months I’ve been home with my twin daughters (they were almost 9 months old when I started, and soon 16 months).
I’ve spent a lot of time with them, but I have managed to stay creative in the few hours every now and then when they were taking naps. I have to say I’m a bit impressed in retrospect!
Warning: lengthy post ahead! But lots of really cool stuff!
Been a while since I posted now. There are a couple of reasons for this:
First of all, I decided to write my own software triangle rasterizer (I’ll get to explain what that is in a bit)
It’s a lot of math involved. And a lot of diagrams with pen and paper. I has spent several hours to get it to its current working state
My parental leave is getting close to the end. My kids are now almost 16 months and require a lot of attention! Have not gotten any computer time at all for the past three weeks
But now I finally have something to show, so lets show it!
A few days ago I came across Markdeep. A simple way to write formatted documents using markdown syntax.
I think markdown syntax is nice, and I’m already using it for all content on this site.
The idea is that you only need a small snippet of javascript text in the bottom of the document. You edit it in your regular notepad app, and view it through a browser. It will fall back to unformatted markdown text (still pretty readable) if it cannot fetch the javascript file.
However the original markdeep.js has a big flaw. At least for me!
It cannot detect single line breaks!
Like this one.
So I modified it a bit.
If you want to use it, just copy and paste the following snippet in the bottom of a text document, and make sure the file ending is .html.
Up to this point I’ve only drawn wireframes. To create colored 3d objects I need two things. Backface Culling and Z Sorting.
Time to start with the first: Backface Culling.
First of all I changed to using triangles instead of just points/lines.
Then I calculate the cross product on two of the sides to get a normal vector.
Compare the normal with your viewing vector (a line from the camera to the middle of the triangle) to see if the triangle is facing towards you or away from you
Don’t draw if the triangle is facing away from you
Now you no longer see any lines “behind” the cubes.
I also draw the normal vectors for each triangle.
Spinning cube with normals
From this point I just filled the triangles with a single color.
Red spinning cub
With the normal vectors already calculated on each triangle, I tried to implement some directional lighting as well.
It went much smoother than I would ever have thought.
Yay, lighting!
Pretty interesting! I made a spinning cube with lighting almost exactly ten years ago. However I did not understand much of it, and going back to that tutorial it seems to be full of weird tricks. This time however I did it all by myself =D.
Next up is Z-Sorting so we can have more than just one cube at once
I’m doing serious progress! Today I managed to get the camera matrix working!
The coolest thing about this is that just a few months ago I would have thought that this was too much math for me to ever be able to understand! Remember that I have written everything from scratch - except for the line render code, which is basically just a lineTo(x,y) function. Even the matrix implementation.
There’s no frustum culling in there yet (except for any z-values behind the camera) so pretty much everything gets drawn all the time.
In our last blog post we used matrices to translate, rotate and scale vectors, but so far only in 2D.
Transforming vectors in 3D is pretty much the same thing. The only difference is that we cannot directly plot those vectors out on the screen since each vector will come in a triplet of {x,y,z} and the screen only consists of {x,y}.
We could just ignore the Z-coordinate, but that would look weird!
No Perspective
To get it to look right we need to apply perspective. Perspective means that an object that is further away from our eye will appear smaller than an object that is closer!
Perspective
Applying perspective to 3D-points is something I’ve been able to do for a long time, but now we’re working with matrices, and of course there is something called a perspective projection matrix!
In the past when I’ve been playing with 3D, I’ve used trigonometry for all transformations. It works, but has several drawbacks!
More computation heavy! Needs to do Sine and Cosine lookup for each point!
Much more complex to nest parent/child-relationship!!
Viewing from a camera… I don’t think so!
3D with trigonometry (and fancy blur), made 2006
Using matrices is superior by far. The image below is just a couple of matrices combined, using vectors forming a cube and a pyramid. This would not have been possible using my old 2006 methods!
3D with matrices
If you want to read up on this too, then check out: