diff --git a/website/static/CNAME b/indigo/docs/CNAME similarity index 100% rename from website/static/CNAME rename to indigo/docs/CNAME diff --git a/website/README.md b/website/README.md deleted file mode 100644 index 6477a55a5..000000000 --- a/website/README.md +++ /dev/null @@ -1,198 +0,0 @@ -This website was created with [Docusaurus](https://docusaurus.io/). - -# What's In This Document - -- [Get Started in 5 Minutes](#get-started-in-5-minutes) -- [Directory Structure](#directory-structure) -- [Editing Content](#editing-content) -- [Adding Content](#adding-content) -- [Full Documentation](#full-documentation) - -# Get Started in 5 Minutes - -1. Make sure all the dependencies for the website are installed: - -```sh -# Install dependencies -$ yarn -``` - -2. Run your dev server: - -```sh -# Start the site -$ yarn start -``` - -## Directory Structure - -Your project file structure should look something like this - -``` -my-docusaurus/ - docs/ - doc-1.md - doc-2.md - doc-3.md - website/ - blog/ - 2016-3-11-oldest-post.md - 2017-10-24-newest-post.md - core/ - node_modules/ - pages/ - static/ - css/ - img/ - package.json - sidebars.json - siteConfig.js -``` - -# Editing Content - -## Editing an existing docs page - -Edit docs by navigating to `docs/` and editing the corresponding document: - -`docs/doc-to-be-edited.md` - -```markdown ---- -id: page-needs-edit -title: This Doc Needs To Be Edited ---- - -Edit me... -``` - -For more information about docs, click [here](https://docusaurus.io/docs/en/navigation) - -## Editing an existing blog post - -Edit blog posts by navigating to `website/blog` and editing the corresponding post: - -`website/blog/post-to-be-edited.md` - -```markdown ---- -id: post-needs-edit -title: This Blog Post Needs To Be Edited ---- - -Edit me... -``` - -For more information about blog posts, click [here](https://docusaurus.io/docs/en/adding-blog) - -# Adding Content - -## Adding a new docs page to an existing sidebar - -1. Create the doc as a new markdown file in `/docs`, example `docs/newly-created-doc.md`: - -```md ---- -id: newly-created-doc -title: This Doc Needs To Be Edited ---- - -My new content here.. -``` - -1. Refer to that doc's ID in an existing sidebar in `website/sidebars.json`: - -```javascript -// Add newly-created-doc to the Getting Started category of docs -{ - "docs": { - "Getting Started": [ - "quick-start", - "newly-created-doc" // new doc here - ], - ... - }, - ... -} -``` - -For more information about adding new docs, click [here](https://docusaurus.io/docs/en/navigation) - -## Adding a new blog post - -1. Make sure there is a header link to your blog in `website/siteConfig.js`: - -`website/siteConfig.js` - -```javascript -headerLinks: [ - ... - { blog: true, label: 'Blog' }, - ... -] -``` - -2. Create the blog post with the format `YYYY-MM-DD-My-Blog-Post-Title.md` in `website/blog`: - -`website/blog/2018-05-21-New-Blog-Post.md` - -```markdown ---- -author: Frank Li -authorURL: https://twitter.com/foobarbaz -authorFBID: 503283835 -title: New Blog Post ---- - -Lorem Ipsum... -``` - -For more information about blog posts, click [here](https://docusaurus.io/docs/en/adding-blog) - -## Adding items to your site's top navigation bar - -1. Add links to docs, custom pages or external links by editing the headerLinks field of `website/siteConfig.js`: - -`website/siteConfig.js` - -```javascript -{ - headerLinks: [ - ... - /* you can add docs */ - { doc: 'my-examples', label: 'Examples' }, - /* you can add custom pages */ - { page: 'help', label: 'Help' }, - /* you can add external links */ - { href: 'https://github.com/facebook/docusaurus', label: 'GitHub' }, - ... - ], - ... -} -``` - -For more information about the navigation bar, click [here](https://docusaurus.io/docs/en/navigation) - -## Adding custom pages - -1. Docusaurus uses React components to build pages. The components are saved as .js files in `website/pages/en`: -1. If you want your page to show up in your navigation header, you will need to update `website/siteConfig.js` to add to the `headerLinks` element: - -`website/siteConfig.js` - -```javascript -{ - headerLinks: [ - ... - { page: 'my-new-custom-page', label: 'My New Custom Page' }, - ... - ], - ... -} -``` - -For more information about custom pages, click [here](https://docusaurus.io/docs/en/custom-pages). - -# Full Documentation - -Full documentation can be found on the [website](https://docusaurus.io/). diff --git a/website/blog/2021-02-18-devlog-1.md b/website/blog/2021-02-18-devlog-1.md deleted file mode 100644 index df6026b02..000000000 --- a/website/blog/2021-02-18-devlog-1.md +++ /dev/null @@ -1,82 +0,0 @@ ---- -title: Indigo Dev Log 1: Rethinking Indigo's Renderer -author: Dave Smith -authorURL: http://twitter.com/davidjamessmith ---- - -The current work in progress is to re-think Indigo’s rendering pipeline. This isn’t the first time I’ve gone back to the drawing board, but it is the first time since Indigo’s launch. Since this is going to mean a bit of a longer wait between releases than usual, I thought I ought to explain what’s happening and report on my progress so far.. - - - -## A brief history of Indigo’s renderer - -I don’t know how interesting this is but I feel like the context is important. - -Back in 2016 I wasn’t even sure if it was possible to make a usable game engine in Scala, but I was confident that there was a minimal feature set that I would enjoy that might be achievable, as long as I kept it small. Really small. - -Pixel-art only, something that approximated [blitting](https://en.wikipedia.org/wiki/Bit_blit) operations. No arbitrary shapes, scenes, real fonts, special effects or shaders or anything, not even rotation. Something you could just about build the original Mario with. - -Graphics rendering is complicated, but the great thing about a super minimal set of rendering requirements is that the pipeline can be specialised and focused, which is easier than building something more general purpose. Indigo was not as fast as it could have been I’m sure, but it was/is able to draw decent numbers of on screen elements while retaining a pretty solid performance profile. - -Reliable performance for low effort felt important to me because, I reasoned, most people coming from Scala were likely to be new to game building, and I didn’t want them to be too worried about performance tuning. - -The problem is that at the point of Indigo’s initial launch, this renderer design was basically maxed out in terms of how many graphical features I had the ability (as an amateur) to push through such a constrained pipeline. - -## Indigo’s roadmap - -I don’t like to nail down roadmaps too firmly as a rule. I work on the principle of having a mirage on the horizon that I can use to give me a bearing in case I think I’m losing my way, but I don’t worry too much about the exact destination or the route I‘m going to take to get there. The only real detail in the plan is of the work I’m doing right now, the next step on the journey. - -I try not to look up from my feet too often in case I find the length of the road ahead off-putting. - -What does the vague impression in the distance look like at the moment? Well, I think it looks a bit like a GUI editor for Indigo. What kind of editor? What features will it have? How will it work? Will we ever reach that goal? Who knows! ...and it doesn’t matter, it’s just a direction to head in. - -To move in the direction of that goal there are a few obvious and chunky things that Indigo needs, like the ability to draw arbitrary shapes, a more flexible layers system, and possibly better/real font support to name but a few. - -To do any of those things means having a more sophisticated rendering pipeline that can cope with things like custom shaders, and that in turn means a rethink of the renderer. - -So that’s what I’m doing. - -## Progress report - -What I have already is the foundations: - -- An infinite number of non-specialised layers (no more fixed named layers) -- New syntax to describe layer blend modes -- The ability to write completely custom scene entities -- The ability to write custom shaders -- Some prebuilt entities and shaders that work similarly to the existing primitives -- The tentative beginnings of work on shape primitives - -Safe to say that the next release will feature many breaking changes, but I’m planning to write migration notes of some kind. - -One of the major philosophical differences that the next release will introduce, is that the game developer will be much more in control of performance. Fewer rendering requirements will result in faster performance, but if you wish, you’ll also be able to trade off raw speed for much more sophisticated rendering. - -My aim is to keep the new renderer as beginner friendly as I can, but also to allow people to explore more advanced rendering techniques. - -## Questions without answers (yet) - -1. The next release will include new features Indigo has never had before, will it also have all of the features of the previous versions? - -Undecided. I think I shall aim for feature parity but some things may not make the cut. - -2. Will Indigo continue to support Scala 2? - -Scala 2 is still important because the dev tooling around Scala 3 hasn’t (unsurprisingly since it hasn’t been released yet) caught up with the Scala 2 experience yet. But once the tooling is better, could Scala 2 just be dropped? Since there is no-one depending on Indigo for their business or livelihood, the usual library support / backwards compatibility considerations don’t really apply here, so it might be reasonable. - -However unless Scala 3’s tooling is much better before the next release (possible...), it’s likely that the next release will support Scala 2, just not guaranteed. - -3. Will Indigo continue to support WebGL 1.0? - -Maintaining WebGL 1.0 and 2.0 is effectively maintaining two completely different renderers, which is a lot of work for one person. Also worth noting that sooner or later I’ll need to look into supporting WebGPU too. - -At the time of writing all the new work is happening in the WebGL 2.0 renderer, and I don’t know how feasible back porting it will be. - -The performance of WebGL 1.0 is far worse than WebGL 2.0, but it’s market/browser penetration is near 100%, where WebGL 2.0 is closer to 75% with big names like Safari conspicuously missing (Safari tech preview version does add support). However, WebGL 2.0 is probably available everywhere that you’re likely to find a gamer that wants to play your game, so does the other 25% matter? Hard to say. - -One option, rather than removing WebGL 1.0 support altogether is to reduce it to a bare minimum, so that it’s just about good enough to inform your players to try a different browser or platform. Would that be acceptable? Your guess is as good as mine. - -## Thanks! - -Thanks for taking the time to read this update. If you have any questions or would like to discuss any of it I can usually be found on our Discord channel. - -Dave diff --git a/website/blog/2021-03-24-devlog-2.md b/website/blog/2021-03-24-devlog-2.md deleted file mode 100644 index f9eabbe45..000000000 --- a/website/blog/2021-03-24-devlog-2.md +++ /dev/null @@ -1,53 +0,0 @@ ---- -title: Indigo Dev Log 2: It's all about the shaders... -author: Dave Smith -authorURL: http://twitter.com/davidjamessmith ---- - -!["pixel art being refracted through a normal map to give the illusion of a lens."](/img/refractions.png) - -Thought I’d try a different format this time to see if I can make it easier to write these things. Hopefully it will encourage me to do it more often. Aiming for a sort of agile / stand-up / update format. - -## TL;DR - -Next version is coming along nicely, lots of new exciting stuff going into it. The only technical hurdle ahead of me is to reimplement dynamic lighting, and hopefully make it better! After that I’ll begin prepping the next release. - - - -### What has happened since the last update? - -**Scala 3.0.0-RC1 & Scala 2.13.5** - Many thanks to [auman](https://github.com/aumann) for upgrading Indigo to the latest Scala 3 version! - -**Shapes!** - A first version of shapes is now included as standard. There’s A LOT you can do with shapes conceptually, this first version is a limited functionality release to test the water. It contains Circles, Boxes, and Polygon’s that support borders of arbitrary thickness and can be filled with solid colours or linear / radial gradients. Worth noting that these shapes were initially implemented with the new custom shader mechanism - so if you know GLSL there’s nothing stopping you going the [full Freya](https://acegikmo.com/shapes/)! (Note: If you do, I’d love a PR!! :-)) - -**Custom Shader Data** - Ability to supply custom data to your shaders. - -**Blending and BlendMaterials** - As well as entity shaders, you can now write shaders that control how layers blend together, enabling things like simple post processing effects. You can also control hardware blend functions. This arrangement has been used in combination with entity shaders to re-implement the old image based lighting layer functionality, but now you can have as many lighting layers as you like. - -**Reimplemented screen effects as layer effects** - The current Indigo version allows you some basic fixed post-processing effects. This has been reimplemented and expanded using the BlendMaterials mentioned above. One big difference is that the effects are layer level, as opposed to screen level, and you can optionally apply the effects to only the current layer or to the merged layer stack (below the current layer). - -**Reimplemented legacy effects** - The old border and glow effects, which are quite cheap and I suspect of limited use, have been reimplemented just in case anyone is depending on them. However they aren’t built into Indigo by default any more, you need to add them from the extras library. - -**Reimplemented Distortion layers as Refractions** - Not only reimplemented but also slightly improved. In the same vein as effects, I’m not convinced this is up to scratch quality wise and so I’ve moved it into the extras project. The implementation is achieved using entity and blend materials. - -### What is being worked on at the moment? - -The current work in progress is to reimplement and improve dynamic lighting. The two improvements specifically are (hopefully): - -1. Rethink how specular lighting is handled, a mistake was made during the original implementation that I’d like to correct. - -2. Ambient lighting will no longer rely on image based ambient lighting. - -There is also an unresolved question about whether lights will be global, layer based, or both. As it’s a forward renderer, there will be a light count limit in the next version (which shouldn’t be a problem for most use cases), so if you had global + layer lights that went over the limit, which should take priority? I’m sure I’ll think of something. - -It’s unclear how much effort this will be as Indigo has moved from being an inflexible [deferred renderer](https://en.wikipedia.org/wiki/Deferred_shading) to a programmable forward renderer. But I’m hopeful it will be in the order of days rather than weeks. - -### What is expected to happen next? - -Essentially release prep, however, a lot has changed in terms of the APIs and how Indigo works. So the plan is the work through the various demos and example projects, and while I upgrade them, take down migration notes, and re-assess the API choices I’ve made to see if I can make them clearer or reduce the impact of change. - -## Thanks! - -Thanks for taking the time to read this little update. Looking forward to getting the next version out and seeing what people make of it. I'd also like to say thank you the expanding cast of people supporting the project. Whether you are helping financially, contributing code and documentation improvements, or just being around to help discuss ideas: It's all very much appreciated! - -Dave diff --git a/website/blog/2021-04-11-indigo-0-7-0-released.md b/website/blog/2021-04-11-indigo-0-7-0-released.md deleted file mode 100644 index f8caddc0b..000000000 --- a/website/blog/2021-04-11-indigo-0-7-0-released.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -title: Indigo 0.7.0 Released -author: Dave Smith -authorURL: http://twitter.com/davidjamessmith ---- - -This release is a total rewrite of Indigo’s rendering process to make it flexible and customisable. - -[Full details of this release with migration notes can be found on github.](https://github.com/PurpleKingdomGames/indigo/releases/tag/v0.7.0) - -!["Comparison of the old and new rendering pipelines."](/img/renderer-comparison.png) - -*(The diagram above attempts to show how this release has changed the rendering process.)* diff --git a/website/blog/2021-05-17-indigo-0-8-0-released.md b/website/blog/2021-05-17-indigo-0-8-0-released.md deleted file mode 100644 index 687339058..000000000 --- a/website/blog/2021-05-17-indigo-0-8-0-released.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -title: Indigo 0.8.0 Released -author: Dave Smith -authorURL: http://twitter.com/davidjamessmith ---- - -This release is the first Scala 3.0.0 release, and drops support for Scala 2. - -Aside from a number of important bug fixes, this release also includes an early version of a new `TextBox` primitive and support for font assets. - -[Full details of this release can be found on github.](https://github.com/PurpleKingdomGames/indigo/releases/tag/v0.8.0) diff --git a/website/blog/2021-05-20-indigo-0-8-1-released.md b/website/blog/2021-05-20-indigo-0-8-1-released.md deleted file mode 100644 index 9dc7308d8..000000000 --- a/website/blog/2021-05-20-indigo-0-8-1-released.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -title: Indigo 0.8.1 Released -author: Dave Smith -authorURL: http://twitter.com/davidjamessmith ---- - -This is an important bug fix release that resolves rendering problems on Windows machines (including browsers on Windows). - -[Full details of this release can be found on github.](https://github.com/PurpleKingdomGames/indigo/releases/tag/v0.8.1) diff --git a/website/blog/2021-05-30-indigo-0-8-2-released.md b/website/blog/2021-05-30-indigo-0-8-2-released.md deleted file mode 100644 index 16c125199..000000000 --- a/website/blog/2021-05-30-indigo-0-8-2-released.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -title: Indigo 0.8.2 Released -author: Dave Smith -authorURL: http://twitter.com/davidjamessmith ---- - -This is a bug fix release that resolves an issue with entity nodes incorrectly rendering textures. - -[Full details of this release can be found on github.](https://github.com/PurpleKingdomGames/indigo/releases/tag/v0.8.2) diff --git a/website/blog/2021-07-06-indigo-0-9-0-released.md b/website/blog/2021-07-06-indigo-0-9-0-released.md deleted file mode 100644 index 79217685d..000000000 --- a/website/blog/2021-07-06-indigo-0-9-0-released.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: Indigo 0.9.0 Released -author: Dave Smith -authorURL: http://twitter.com/davidjamessmith ---- - -Details of the major changes found in Indigo 0.9.0: - -- New! Scene Camera (Early preview, feedback welcome) -- Dynamic shader loading -- Improved texture support in shaders -- Built-in primitives have Material type parameter -- Caching of custom packed UBO data - -[Full details of this release can be found on github.](https://github.com/PurpleKingdomGames/indigo/releases/tag/v0.9.0) diff --git a/website/blog/2021-08-17-roguelike-post-mortem.md b/website/blog/2021-08-17-roguelike-post-mortem.md deleted file mode 100644 index 3a9db33d1..000000000 --- a/website/blog/2021-08-17-roguelike-post-mortem.md +++ /dev/null @@ -1,132 +0,0 @@ ---- -title: Post-Mortem: "RoguelikeDev Does The Complete Roguelike Tutorial" in Scala -author: Dave Smith -authorURL: http://twitter.com/davidjamessmith ---- - -!["A early screenshot of a roguelike made with Indigo"](https://raw.githubusercontent.com/davesmith00000/roguelike-tutorial/main/part3/roguelike-part3_2.gif) - -**This is a brief post-mortem of my attempt to do the ["RoguelikeDev Does The Complete Roguelike Tutorial"](https://www.reddit.com/r/roguelikedev/comments/o5x585/roguelikedev_does_the_complete_roguelike_tutorial/) in Scala.** - -I've been asked on several occasions if it would be possible to build a roguelike using Indigo? - -My answer has always been that it should be possible, but that it would probably be challenging because Indigo isn't built for rendering lots of text. - -About a month before this year's annual "RoguelikeDev Does The Complete Roguelike Tutorial" I was asked again, and decided it was time to find out if it really was possible or not! - - - -## What are roguelikes? - -[Roguelike](https://en.wikipedia.org/wiki/Roguelike)'s are a type of game that get their name because they are ...wait for it ..._like_ an 80s game called _Rogue_! - -They typically use ASCII art for graphics, generated levels / dungeons and feature things like perma-death. - -## Starting at the finish - -### Where can I play it? - -[All completed parts of the roguelike tutorials](http://rogueliketutorials.com/tutorials/tcod/v2/) can be found in the following repo, along with playable links so that you can try out it's progression for yourself: - -[https://github.com/davesmith00000/roguelike-tutorial](https://github.com/davesmith00000/roguelike-tutorial) - -### What should I expect? - -[The final playable version of the "game"](https://davesmith00000.github.io/roguelike-tutorial/part13/) is surprisingly playable.. for a while at least. :-) - -Sure, the lack of game balance is quickly apparent and after about level 6 or 7 you'll run out of new things to do, but I'm really quite pleased with it. There's exploration, discovery, spells, potions, equipment, monsters, levels, an inventory, and menus - all the things in the tutorial, in fact! And considering I spent _no time at all_ selecting colors or which tileset to go with, it actually looks quite nice! - -The code quality is ok. - -When I began the project I had some lofty ideas about writing lovely clean code that would be easy to follow, but as you can see if you look at the later stages of the code base, by the end I was just pleased to be crossing the finishing line at the end of the marathon. - -Maybe I'll refactor it next year.. - -## The tutorial - -The tutorial is very well written and the "RoguelikeDev Does The Complete Roguelike Tutorial" follow-along is well paced, taking me two to three evenings a week. - -The difficulty with the tutorial is that it is aimed at Python developers, and as they say in the follow-along's description, if you're not using Python the expectation is that you'll blaze your own trail. - -There are two problems with not using Python. - -The first is simply distilling the tutorial parts into the intended deliverables. The tutorials are written for Python developers, and they have a lovely conversational style, building a narrative as they go along. The authors take great care to go over code from previous chapters - refactoring code to be ready for the next section. Of course, if you're not a Python developer then the result is - in places - _a lot_ of text / code to sift through to find the information you need. Luckily, the screenshots the authors included were a massive help. In the chapter on saving and loading I basically just looked at the screenshots and reverse engineered suitable requirements. This was because most of the tutorial chapter was involved in disk IO while my solution ran in a browser, and is side effect free! - -The second problem is the lack of ready-made tooling. - -## DIY Tooling - -The Python version uses a library called [tcod](https://python-tcod.readthedocs.io/en/latest/) which essentially gives you all of the functionality you need to build a roguelike, and your job in the tutorial is to build the game logic and data structures. - -Choosing to follow along in another language means that you need to fend for yourself. In my case I ended up building a [roguelike starter kit](https://github.com/PurpleKingdomGames/indigo-roguelike-starterkit) to fill in some of the critical gaps. - -The [README](https://github.com/PurpleKingdomGames/indigo-roguelike-starterkit/blob/main/README.md) on the starter kit's repo explains most of the functionality that the starter kit provides in a fair amount of detail, but the main things it does is: - -1. Give you easy access to Dwarf Fortress assets. -2. Provide two ways of rendering coloured terminal-like text. - -Dwarf Fortress is a very famous roguelike with [many different tilesets available](https://dwarffortresswiki.org/Tileset_repository). They are all based on the "IBM Code Page 437" or "Extended ASCII" table, and what you get is an image of a grid of characters and symbols. The starter kit uses a little compile time script to convert the tileset of your choice, into pre-baked classes containing all of the character information for use with either Indigo's `Text` primitive using the `TerminalText` material, or the `TerminalEntity`/`TerminalEmulator`. - -It wasn't terribly difficult, but this little bit of tool sharpening was very satisfying to do and made the rest of the build much more fun. - -## Lessons Learned - -### What went well? - -Taking the time to build the starter kit paid itself back many times over. Once I got into the game building proper, I basically never had to think about how to do the rendering again. - -Converting the tutorial to pure functions and Indigo's uni-directional data flow was challenging at times, but made following the code easy, and in the few places where I really needed tests it was easy to set them up. I didn't write very many tests however, because most of the game was just plumbing that required little checking beyond making the compiler happy. Testing came into it's own wherever something non-trivial needed to be verified, such as the path finding code. - -The tutorial descriptions of topics like procedural dungeon generation were really great and easy to follow. - -### Where did I get lucky? - -For reasons best known to someone else, early in the development of the starter kit I set it up to work with [Parcel.js](https://parceljs.org/). This turned out to be a great idea because it made publishing the playable tutorial parts to github pages a piece of cake! - -### What went wrong? - -I repeatedly underestimated the size of the tutorial! - -Each chapter often does more than one thing and I was regularly halfway through a section when I realised I was going to have to do something much more complicated than I anticipated, or that I was fundamentally missing some piece of functionality / tooling. - -Another unexpected problem was that the tutorials rely on a feature of game engines that Indigo considers a defect, and fixes by default. In Indigo you cannot (easily / idiomatically) modify the state of another actor / entity during the current frame. To put it another way, there is no "first mover" advantage to having the good fortune of being the first entity updated. Consider the following: - -1. The Player attacks an Orc -2. The Orc is killed -3. The Orc cannot attack the Player because it is dead. - -Seems reasonable. - -In Python this translates easily: - -1. On update, the Player attacks an Orc, directly calling it's damage method. -2. The Orc's health is reduced below zero and it is killed. -3. ... that's it. - -This works because the Player's actions are always evaluated first and carried out immediately. In a fair fight with two evenly matched players, the first player would always win. - -In Indigo things are not so simple because Indigo hugely discourages first-mover advantage by decoupling action from outcome. In reality the combatants effectively both attacked at the same time in the same instant! Like this: - -1. On update, the Player attacks the Orc, _emitting an event with the amount of damage to be inflicted_. -2. The Orc's health has not yet been reduced, so the Orc is still alive during this update. -3. The Orc attacks! It doesn't know it's dead yet! It gets one last gasping attempt at killing the Player! _The Orc also emits an event saying the Player has been damaged_. -4. On the next frame, the relevant damage is inflicted on both parties. -5. The Orc is killed as before... but the Player has been unexpectedly injured or killed too! - -The solution is to separate the players turn from the enemies turn, creating a turn based game. This effectively mimics the original behavior but it's now part of the game's design rather than a happy accident. - -### What would I do differently next time? - -My main regret is that the terminal emulator is rather heavy and can't be refreshed at 60 fps. For the purposes of the tutorial this isn't a problem since you only have to update on key press, but if you wanted to do any smoother effects it wouldn't be able to keep up. The other way this problem rears it's head is if someone is running a low power system of some kind, since it requires the ability to allocate some fairly chunky arrays on to the GPU as UBO data (uniform buffer object). - -There are lots of ways to resolve this problem, I would have liked to have had the time to make it better, maybe next time. - -Additionally I'd like to have wrapped up the starter kit into a library of some sort for ease of use by others. - -Finally, a small thing, but I wish I'd spent a little bit longer on the build process. When you build for web you have to emit a different module kind than if you're running locally, and that's a manual change in the `build.sbt` file. It would have been nice to do that properly. ([The process is described in the starter kit's README.](https://github.com/PurpleKingdomGames/indigo-roguelike-starterkit#how-to-run-and-package-up-this-game)) - -## Final thoughts - -Following the tutorial in a language other than Python added a lot of complexity. Converting the tutorial to a purely functional language / approach on top of that often meant completely ignoring what the tutorial was saying, and trying to achieve the same outcome by totally different means. This would be very difficult if you didn't know your engine well in advance. - -That said, following the tutorial was great fun and I would highly recommend it. Hopefully I'll be able to have another crack at it next year! In the meantime, perhaps the version I've pulled together (along with the starter kit) will help the next adventurous Scala soul that decides to delve into the depths of a roguelike! diff --git a/website/blog/2021-09-07-indigo-0-9-1-released.md b/website/blog/2021-09-07-indigo-0-9-1-released.md deleted file mode 100644 index fb0bed443..000000000 --- a/website/blog/2021-09-07-indigo-0-9-1-released.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: Indigo 0.9.1 Released -author: Dave Smith -authorURL: http://twitter.com/davidjamessmith ---- - -Details of the major changes found in Indigo 0.9.1: - -- Updated! Cameras... -- New `HitArea` UI Component -- Standard Materials can tile and stretch to fit -- `ShaderPrimitive` Improvements - -[Full details of this release can be found on github.](https://github.com/PurpleKingdomGames/indigo/releases/tag/v0.9.1) diff --git a/website/blog/2021-09-09-indigo-0-9-2-released.md b/website/blog/2021-09-09-indigo-0-9-2-released.md deleted file mode 100644 index f4877439b..000000000 --- a/website/blog/2021-09-09-indigo-0-9-2-released.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -title: Indigo 0.9.2 Released -author: Dave Smith -authorURL: http://twitter.com/davidjamessmith ---- - -This release contains two seemingly small bug fixes / corrections that could significantly change the look of your game. As luck would have it, they have been around for several versions and have gone unnoticed until the day _after_ the previous release. - -- Loaded images are now correctly unpacked with premultiplied alpha. -- Shape fill colours have had premultiplication removed. - -[Full details of this release can be found on github.](https://github.com/PurpleKingdomGames/indigo/releases/tag/v0.9.2) diff --git a/website/build.sbt b/website/build.sbt deleted file mode 100644 index f6de46289..000000000 --- a/website/build.sbt +++ /dev/null @@ -1,26 +0,0 @@ -Global / onChangedBuildSource := ReloadOnSourceChanges - -val scala3Version = "3.3.0" - -lazy val indigoSite = - (project in file(".")) - .enablePlugins(GhpagesPlugin) - .settings( - name := "indigo site publisher", - version := "0.0.1", - scalaVersion := scala3Version, - organization := "io.indigo", - siteSourceDirectory := target.value / ".." / "build" / "indigo-site", - makeSite / includeFilter := "*", - makeSite / excludeFilter := ".DS_Store", - git.remoteRepo := "git@github.com:PurpleKingdomGames/indigo.git", - ghpagesNoJekyll := true - ) - -addCommandAlias( - "publishIndigoSite", - List( - "makeSite", - "ghpagesPushSite" - ).mkString(";", ";", "") -) diff --git a/website/build.sh b/website/build.sh deleted file mode 100644 index afbb4a14a..000000000 --- a/website/build.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/bash - -# TODO -# Auto update the demos? - -set -e - -WEBSITE_DIR=$(pwd) -PROJECT_DIR=$WEBSITE_DIR/.. -INDIGO_ENGINE_DIR=$PROJECT_DIR/indigo/ - -# ----- -# generate / check docs -# - "indigo/doc" // Docs in ./indigo/target/scala-3.3.0/unidoc/ -# - "docs/mdoc" // Docs in ./indigo/indigo-docs/target/mdoc -cd $INDIGO_ENGINE_DIR -sbt gendocs -cd $WEBSITE_DIR - -# ----- -# build the site -yarn run build - -# ----- -# Publish -cp -R $INDIGO_ENGINE_DIR/target/scala-3.*/unidoc/. $WEBSITE_DIR/build/indigo-site/api/ -sbt clean makeSite ghpagesPushSite diff --git a/website/core/Copyright.js b/website/core/Copyright.js deleted file mode 100644 index 91b4e5b90..000000000 --- a/website/core/Copyright.js +++ /dev/null @@ -1,33 +0,0 @@ -/** - * Copyright (c) 2017-present, Facebook, Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -const React = require('react'); - -class Copyright extends React.Component { - docUrl(doc, language) { - const baseUrl = this.props.config.baseUrl; - const docsUrl = this.props.config.docsUrl; - const docsPart = `${docsUrl ? `${docsUrl}/` : ''}`; - const langPart = `${language ? `${language}/` : ''}`; - return `${baseUrl}${docsPart}${langPart}${doc}`; - } - - pageUrl(doc, language) { - const baseUrl = this.props.config.baseUrl; - return baseUrl + (language ? `${language}/` : '') + doc; - } - - render() { - return ( - - ); - } -} - -module.exports = Copyright; diff --git a/website/core/Footer.js b/website/core/Footer.js deleted file mode 100644 index 4e9c9d4e5..000000000 --- a/website/core/Footer.js +++ /dev/null @@ -1,122 +0,0 @@ -/** - * Copyright (c) 2017-present, Facebook, Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -const React = require('react'); - -class Footer extends React.Component { - docUrl(doc, language) { - const baseUrl = this.props.config.baseUrl; - const docsUrl = this.props.config.docsUrl; - const docsPart = `${docsUrl ? `${docsUrl}/` : ''}`; - const langPart = `${language ? `${language}/` : ''}`; - return `${baseUrl}${docsPart}${langPart}${doc}`; - } - - pageUrl(doc, language) { - const baseUrl = this.props.config.baseUrl; - return baseUrl + (language ? `${language}/` : '') + doc; - } - - render() { - return ( - - ); - } -} - -module.exports = Footer; diff --git a/website/i18n/en.json b/website/i18n/en.json deleted file mode 100644 index 7ad2cee78..000000000 --- a/website/i18n/en.json +++ /dev/null @@ -1,214 +0,0 @@ -{ - "_comment": "This file is auto-generated by write-translations.js", - "localized-strings": { - "next": "Next", - "previous": "Previous", - "tagline": "A game engine for functional programmers.", - "docs": { - "development-status": { - "title": "Indigo's Development Status" - }, - "gameloop/events": { - "title": "Events" - }, - "gameloop/frame-context": { - "title": "Frame context" - }, - "gameloop/outcome": { - "title": "Outcome Type" - }, - "guides": { - "title": "About these guides" - }, - "guides/howto-custom-entity": { - "title": "How to make a custom entity" - }, - "guides/howto-fire-shader": { - "title": "How to write a fire shader" - }, - "guides/howto-responsive-ui-with-tyrian": { - "title": "How to make a responsive UI using Tyrian" - }, - "guides/howto-indigo-game": { - "title": "Converting `IndigoSandbox` to `IndigoGame`" - }, - "information/alternatives": { - "title": "Alternatives to Indigo" - }, - "information/antipatterns": { - "title": "Anti-Patterns" - }, - "information/glossary": { - "title": "Glossary" - }, - "information/key-concepts": { - "title": "Key Concepts" - }, - "information/model-viewmodel-view": { - "title": "Model, ViewModel, & View" - }, - "information/motivation-and-constraints": { - "title": "Motivation & Constraints" - }, - "information/performance": { - "title": "Performance" - }, - "information/prior-art": { - "title": "Prior Art" - }, - "information/rendering-technology": { - "title": "Rendering Technology" - }, - "organisation/boot-and-start-up": { - "title": "Boot & Start Up" - }, - "organisation/game-entry-points": { - "title": "Game Entry Points" - }, - "organisation/scene-management": { - "title": "Scenes & Scene Management" - }, - "organisation/subsystems": { - "title": "SubSystems" - }, - "platform/assets": { - "title": "Assets & Asset Loading" - }, - "platform/cross-platform-publishing": { - "title": "Cross Platform Publishing" - }, - "platform/importers": { - "title": "File Format Importers" - }, - "platform/input-handling": { - "title": "User Input Handling" - }, - "platform/loading-and-saving-data": { - "title": "Loading & Saving Data" - }, - "platform/logging": { - "title": "Logging" - }, - "platform/networking": { - "title": "Networking" - }, - "presentation/animation": { - "title": "Animation" - }, - "presentation/audio": { - "title": "Audio" - }, - "presentation/boundaries": { - "title": "Boundaries" - }, - "presentation/cameras": { - "title": "Cameras" - }, - "presentation/clones-and-mutants": { - "title": "Clones & Mutants" - }, - "presentation/depth": { - "title": "Depth" - }, - "presentation/layers": { - "title": "Layers" - }, - "presentation/lighting": { - "title": "Lighting" - }, - "presentation/materials": { - "title": "Materials" - }, - "presentation/primitives": { - "title": "Primitives & Building Blocks" - }, - "presentation/scene-update-fragment": { - "title": "SceneUpdateFragment" - }, - "presentation/shapes": { - "title": "Shapes" - }, - "presentation/text-and-fonts": { - "title": "Text & Fonts" - }, - "quickstart/examples": { - "title": "Examples" - }, - "quickstart/hello-indigo": { - "title": "Hello, Indigo!" - }, - "quickstart/project-templates": { - "title": "Mill & SBT Game Templates" - }, - "quickstart/setup-and-configuration": { - "title": "Setup & Configuration" - }, - "shaders/blending": { - "title": "Blending" - }, - "shaders/constants": { - "title": "Shader Constants, Variables, and Outputs" - }, - "shaders/premultiplied-alpha": { - "title": "Premultiplied Alpha" - }, - "shaders/shader-overview": { - "title": "Shaders Overview" - }, - "time/signals": { - "title": "Signals & Signal Functions" - }, - "time/time-varying-values": { - "title": "Time Varying Values" - }, - "uicomponents/button": { - "title": "Buttons" - }, - "uicomponents/hit-area": { - "title": "Hit Area" - }, - "uicomponents/input-field": { - "title": "Input Field" - }, - "uicomponents/radio-button": { - "title": "Radio Button" - }, - "uicomponents/ui-components": { - "title": "Overview" - }, - "unused/computations": { - "title": "unused/computations" - }, - "unused/jobs": { - "title": "unused/jobs" - } - }, - "links": { - "Blog": "Blog", - "Guides": "Guides", - "Docs": "Docs", - "APIs": "APIs", - "Tools": "Tools", - "GitHub": "GitHub" - }, - "categories": { - "How To's": "How To's", - "Gamedev": "Gamedev", - "Indigo": "Indigo", - "Getting started": "Getting started", - "Organising your game": "Organising your game", - "The game loop": "The game loop", - "Presentation": "Presentation", - "UI Components": "UI Components", - "Shaders": "Shaders", - "Working with Time": "Working with Time", - "Platform & Publishing": "Platform & Publishing", - "Other information": "Other information" - } - }, - "pages-strings": { - "Help Translate|recruit community translators for your project": "Help Translate", - "Edit this Doc|recruitment message asking to edit the doc source": "Edit", - "Translate this Doc|recruitment message asking to translate the docs": "Translate" - } -} diff --git a/website/package.json b/website/package.json deleted file mode 100644 index 28c38e758..000000000 --- a/website/package.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "scripts": { - "examples": "docusaurus-examples", - "start": "docusaurus-start", - "build": "docusaurus-build", - "publish-gh-pages": "docusaurus-publish", - "write-translations": "docusaurus-write-translations", - "version": "docusaurus-version", - "rename-version": "docusaurus-rename-version" - }, - "devDependencies": { - "docusaurus": "^1.14.7" - } -} diff --git a/website/pages/en/index.js b/website/pages/en/index.js deleted file mode 100644 index c941ebe33..000000000 --- a/website/pages/en/index.js +++ /dev/null @@ -1,205 +0,0 @@ -/** - * Copyright (c) 2017-present, Facebook, Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ -const React = require('react'); - -const CompLibrary = require('../../core/CompLibrary.js'); - -const MarkdownBlock = CompLibrary.MarkdownBlock; /* Used to read markdown */ -const Container = CompLibrary.Container; -const GridBlock = CompLibrary.GridBlock; - -class HomeSplash extends React.Component { - render() { - const {siteConfig, language = ''} = this.props; - const {baseUrl, docsUrl} = siteConfig; - const docsPart = `${docsUrl ? `${docsUrl}/` : ''}`; - const langPart = `${language ? `${language}/` : ''}`; - const docUrl = doc => `${baseUrl}${docsPart}${langPart}${doc}`; - - const SplashContainer = props => ( -
This project is maintained by a dedicated group of people.
-//This project is used by many folks
-//Are you using this project?
-// -// Add your company -// -//