Skip to content

Commit

Permalink
Updated TODO and retrospective
Browse files Browse the repository at this point in the history
  • Loading branch information
picosonic committed Sep 15, 2021
1 parent a589d75 commit cee2a49
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ You are a test pilot in the navy and are out on operations testing an experiment

# Stuff I'd have done with more time
- [ ] Intro and cutscene animation sequences
- [ ] Top Gun inspired SVG font
- [ ] Increase the size of the game world
- [ ] Add procgen clouds
- [ ] Add the sun with lens flare
- [ ] Wheels
- [ ] Flaps/ailerons
- [ ] Fix 3D engine, still showing some clipping and Z order issues
Expand Down
14 changes: 14 additions & 0 deletions devdiary/diary.md
Original file line number Diff line number Diff line change
Expand Up @@ -164,3 +164,17 @@ Made some screenshots for submission.
Detect crashes into the sea and successful landings.

Packed everything up and submitted.

Looking back
------------
Having decided to make a 3D flying game I wanted to use a [3D engine](https://github.com/picosonic/js3dengine) which I was writing to use the canvas which was heavily based on [tutorials I'd seen on YouTube](https://www.youtube.com/watch?v=XgMWc6LumG4) by [@Javidx9](https://github.com/OneLoneCoder/videos). However I did run into some issue with the clipping an popping of triangles. I also struggled changing my mindset between a static camera and moving models/world and a static world with moving camera. Ultimately I reverted back to a previous 3D engine I'd written which renders to SVG for a [previous JS13k entry](https://js13kgames.com/entries/backspace-return-to-planet-figadore).

Each of the 3D models I made were done using views I found showing top/left/right/back/front of each object. I then hand crafted the .obj files by measuring coordinates in pixels within GIMP for each vertex (adding a Z component as I went along). These points were numbered on the image so that I could refer back to them when doing the faces. I previewed the .obj files in meshlab to make sure all looked ok and that I'd got the right clockwise winding on each face I made. I created a tiny material file so that I could view the models with some colour on them. This was great fun to do. The only thing which required fixing was moving the origin to the centre of the model (for rotation purposes), I create a [.php script](https://github.com/picosonic/js13k-2021/blob/main/obj2js.php) to do this for me and package each up into a models file. Lastly because I ended up using my old SVG engine, I needed to rotate the models (to have Z go into the screen rather than up) as detailed above.

A part which I would say was the most enjoyable to do was the creation of the [F16](https://en.wikipedia.org/wiki/General_Dynamics_F-16_Fighting_Falcon) style [HUD](https://en.wikipedia.org/wiki/Head-up_display). I'd watched a few videos of these in [flight sim games](https://www.youtube.com/watch?v=jwv0ibUG4lo) and live, and also found various static images in manuals and photos. I wanted to try to recreate this as best I could and link it to the aircraft model in my game. I implement the pitch ladder, altitude, compass, roll indicator and airspeed (including mach conversion). Because I ran out of time to create missions, I didn't implement the waypoint/steerpoint system, and due to the behind the plane view I didn't add the artifical horizon.

One of the things I spent quite a bit of time on before having to move on to something else was a new very small SVG font in the style of Top Gun (well this is all about flying jets from a carrier). I found a [truetype font](https://blogfonts.com/top-gun.font) that somebody had produced and which was released as freeware. I wrote out all the characters of the alphabet into a text layer in inkscape then set about extracting a simplified set of paths for each letter. Also given the angular approach to the lettering I figured I may be able to minify further by using a set of shortcuts, like bottom-left square or bottom-left angled, e.t.c. I managed to get all the characters out but they all had transforms applied and the path coordinates were to multiple decimal places. When I created a writer for the font, it was tantilisingly close to working but I had to drop it and move on to other more pressing dev. Ultimately I re-used a 14-segment SVG font which I'd used in a [previous JS13k entry](https://js13kgames.com/entries/backspace-return-to-planet-figadore). I may well revisit the TG font in a postcomp version to replace the 14-segment one.

Towards the end I wanted to add a bit more realism so added a noise generator. I believe aircraft sound more like pink noise, but I wanted to opt for brown noise as it sounded good too. The gain ramps up and down with the thrust and rolling left/right changes the stereo position of the brown noise to give it a slightly 3D positioning feel since the view is from behind. I felt this worked reasonably well.

I think I lost a lot of time by deciding to make more than one game for JS13k this year, not because it is easy, but because it is hard (I wanted to stretch myself). Given all the difficulties above mostly with debugging and fixing/switching game engines I ultimately ended up concentrating on the game which felt simpler so that I could at least get one of the two games submitted.

0 comments on commit cee2a49

Please sign in to comment.