Skip to content

Adventures in Game Development

Insights, tutorials and discussion of game development

  • Home
  • About
  • Contact
  • Play Witch Game
Posted on 20th November 2018 by nick

Message Mircoformat and Serialisation

Leave a comment

In my last post I talked a little bit about my ideas for encoding my messages, so I thought I’d elaborate a little bit. Basic Premise To encode an object I’m going to start with converting the object into a proxy object which is simply a map of string -> string. So for example an
Continue reading Message Mircoformat and Serialisation

Posted on 18th November 201818th November 2018 by nick

Message Passing in Web Workers

Leave a comment

Once I’d implemented the Web Worker split, I had a new problem: How do I pass the messages back and forth? The main issues here is that I have to send the game state from the worker and the web page, and send requests for player interaction to the worker. Message Object The first thing
Continue reading Message Passing in Web Workers

Posted on 10th November 2018 by nick

Web Workers in Kotlin

Leave a comment

Something I’ve known is useful for a web game is using Web Workers – the reason for this is that we need something to run in the background when the page isn’t active, and a page’s timer runs much more slowly when the page isn’t in focus (eg if you go to another tab) Kotlin does
Continue reading Web Workers in Kotlin

Posted on 6th November 2018 by nick

Back to where I was!

Leave a comment

I’m back to where I was with Elm now, but this time with Kotlin. I’ve got: A game loop Actions including gather and forage A player action that can be set and that takes time to complete Buildings that cost and produce using the action system Random pumpkins It was considerably easier than it was
Continue reading Back to where I was!

Posted on 3rd November 2018 by nick

Game loop in Kotlin

Leave a comment

To start the game, the first thing I need is a game loop. Kotlin’s timers, unfortunately, lack some clear documentation. The first thing I noticed was that the timer functionality is, once again, just a wrapper of Java timer and not available for Javascript. This really makes me think I’m using a second-class version of
Continue reading Game loop in Kotlin

Posted on 3rd November 2018 by nick

A First Look at Kotlin

Leave a comment

Next on the things that keep cropping up in my searches is Kotlin. This appears to be a Java derivative that can compile to a few different targets, one of which is Javascript, so I thought this might be a good idea. Installation It appears that Kotlin comes free with IntelliJ IDEA which is an editor
Continue reading A First Look at Kotlin

Posted on 30th October 201830th October 2018 by nick

Is Elm Right for this?

Leave a comment

I’ve been working with Elm a bit now, and I’ve begun to have a feeling for how it works, as well as starting to hit a few problems. It’s perhaps time to consider if I’m going the right way. Good things It has been a lot better than I expected to be honest. As an
Continue reading Is Elm Right for this?

Posted on 27th October 2018 by nick

More Randomness in Elm

Leave a comment

I found my first real bug in the game recently. When looking at my random forage results I realised that they were always getting the same results every time the action completes, unless I restarted forage. It’s a pretty stupid mistake really – because the random forage results are generated in advance, of course they’ll
Continue reading More Randomness in Elm

Posted on 23rd October 201823rd October 2018 by nick

Probability for Drop Rates

Leave a comment

I had a few minutes today, so I thought perhaps it was a chance to think about pumpkins. I added pumpkins as a placeholder originally, so that my resource type had more than just herbs. But it would be nice if I introduce them as a rare resource. You’re not going to find them often
Continue reading Probability for Drop Rates

Posted on 22nd October 201822nd October 2018 by nick

Randomness in Elm

Leave a comment

Buildings as Actors In working towards making buildings work, I realised I already have in place the structure I need for them. Fundamentally, a building is just another actor, and it produces resources in the same way as the player does. I already have a loop for that – in this case almost all building
Continue reading Randomness in Elm

Posts navigation

Previous Page 1 … Page 3 Page 4 Page 5 Next

Search

Tags

actions actor stats balance build tools clojurescript css design elm examples explore game loop icons kotlin language maths modifiers nim npm off topic planning probability programming progress report random react release resources review rituals serialisation setInterval setTimeout spells storage story string parsing style technical testing theme tutorial ui unlocks upgrades web worker

© Adventures in Game Development 2023
Theme: creativefocus by Mladjo.