1.8 Technical Release

Today I released version 1.8. This is 100% backend release (meaning code changes but no new features) so you won’t notice anything when you’re using it. The aim for this update was to address several architectural issues which would allow future updates to be better implemented.

Warning: Because there aren’t any functional changes in this release, this post may be quite technical but I try to explain things the best I can.

So what has changed?

Game Architecture

This may be the complete wrong word but I’m going to use it anyway. Game architecture, what I’m calling the way games are stored, was done previously in a bit of a weird way. For whatever reason, I had decided to store some data on the database and some data in a separate file, called “gametitle-layout.json” (where gametitle is the actual title of the game). JSON is a format for storing key/value pairs a bit like a table.

I had stored the coordinates for the spaces in the game in the file as well as information about how many spaces forwards/backwards players move, the size of the spaces, shape of the spaces, the size of the screen the game was built on so it can be scaled properly and the URL to the background image. Everything else was stored on the database.

This isn’t ideal. There are several problems with this:

  1. The source files for Quiznetic are getting very large as the amount of users increases. Currently every user has their own directory on the server so this may become a problem as more and more directories are created.
  2. Because the game title is stored in the filename (which was a really terrible idea), it means that the title can’t contain certain characters because they are not permitted in a UNIX filename. For instance, you can’t have a dot in it which was kind of annoying.
  3. Really, everything for the game should be stored in one place (the database).

This release addresses issues 2 and 3. Unfortunately I can’t fix issue 1 quite yet because there is other stuff stored in the user directories (media uploads and colour files- I’ll get to this later).

I wrote some code which would transfer the data from the game file to the database whenever a game preview was loaded. I thought this would be better than trying to transfer all the games made on the site all at once as this would take a long time and may timeout eventually.

This means that when a game preview is loaded for the first time since version 1.7, it will take a while longer than usual because it is transferring the data from the file to the  database. After this process is done however, it will be back to normal speed. So when you login to the game manager for the first time since 1.7, you may be greeted with a loading icon for a while depending on how many games you’ve made.

Once the transfer process is done, the game file is deleted. This fixes issue 3, however there is one other file which uses the game title in its name- the colour file. This file is created every time you launch a game and contains the possible colours for players joining the game so no player gets the same one. For now, I’ve just changed it so it uses the game ID in the filename rather than the title to fix issue 2. However, this approach with using a file to do this isn’t the best, so I’ll probably add an update in the future which will remove the need for this file entirely.

My goal is to remove the need for user directories so I don’t need to worry about making sure they’re backed up and getting some error about too many directories. It’s not a very scalable approach.

For the media uploads, I am thinking about using Amazon S3 which is a file storage service. This will completely offload the serving of image files from the server which could mean a performance boost, however it will add some complexity and I still need to look into what the options are so it may be a while before this is done.

The future

What’s in store for future updates? I have been experimenting with teleport spaces but I’m not definitive about adding them yet because I have no idea if people actually want them! I will be putting out a poll on twitter for suggestions on this. I will also be working on the following things:

  • Import questions from a CSV file
  • Toggle whether to show the question explanation when a player submits their answer

I haven’t been getting a lot of suggestions lately so I am mainly working on non functional changes. If you have a suggestion for something you’d like added or improved, then please let me know!

Quiznetic 1.7

Hey there! You may have noticed that there hasn’t been much activity around Quiznetic lately and I apologize for that! I’ve been working super hard on version 1.7. There’s a lot of changes! If you don’t know already, Quiznetic isn’t actually a company. It’s a business (well it wasn’t before but it technically will be after this update) operated by one person – me! That’s right, my name’s Tim and I’m a passionate programmer just trying to build awesome stuff. So being a one-man team is tricky. There’s a LOT of stuff to do. Which is why 1.7 has taken so long to make. In fact, I’m in the process of rewriting the entire codebase because its turned into a bit of a mess which makes it a nightmare to maintain. This is a common problem in software engineering and I’m pretty new to the whole software maintenance thing. Originally I was going to do this all before I released 1.7 but I didn’t realize how much time it would take. Quiznetic is ~27000 lines of code now which is crazy! So for now I’m just gonna rewrite stuff as I make changes to it- i.e. if I need to add a feature to the player script, I’ll try and clean that up a bit, and then I’ll deploy it to the live version.

At a glance

So what’s in version 1.7? Here’s a list if you’re in a hurry:

  • Improved Game Manager and Active Games screens to now show previews of the games like on the public games page- active game previews even shows the player avatars in it!
  • Replaced the dice with a random number generator thingy
  • Team mode
  • Player avatars
  • Quiznetic Plus
    • Avatar Collections
    • Game timer
    • Increased capacity to 50 players per game

I’m planning on adding more features to Quiznetic Plus in the future (thinking about teleportation spaces?) so it certainly won’t stop there. I’ll also be adding more to normal Quiznetic, such as options to prevent the correct answer showing as soon as a player submits their answer, which was requested by someone. If there’s something you want added, please don’t hesitate to contact me via support@quiznetic.com

Improved UIs

I’ve improved the Game Manager and Active Games UIs so they now show previews of the games. When you go on active games it will show where all the players are as if you’d taken a screenshot of your current game state.

Game Manager screen
The new game manager screen
Active games screen
The new active games screen

Random Generator

I thought this would be a pretty cool feature to add which would make students feel they had more control over how many spaces they’d move. (It doesn’t really, unless you can see things in slow motion or have extremely fast reaction times). Tap the generator once to start the numbers spinning, tap it again to stop at a number! No doubt players will always be trying to hit that six!

 

Team mode

Team mode was originally going to be a Plus feature but I decided against it because it’s a big feature and I’d rather have lots of people using it so the effort felt more worth it. It is designed to encourage collaboration among students by getting them to work together answering the questions. The questions are moved through at a pace set by the teacher rather than each student. Each question is like a round where either team can win and move their avatar forwards on the game board. I really wanted this to be able to work with current games so its still the same premise of a game board.

Quiznetic Team Mode
Progress bars showing the percentages of correct answers

team mode winner

You can read more about how team mode works here.

Player avatars

I’ve wanted to add something like this for so long now! Even at the very beginning when I first started Quiznetic, there was a feature where students would sign up and the teacher would designate pictures to each student as their avatar by searching for their username. I eventually removed this to keep it simple so students didn’t need an account. The player avatars feature is similar but instead of uploading a picture for each student, the teacher can choose between 10 different avatar images. These will be a different color for each player.

Player Avatars

Quiznetic Plus

Why did I make Quiznetic Plus you ask? Why not give it all for free? Well I considered adding all this stuff to normal Quiznetic, but when would things stop and I move on to something else? I’m no longer at sixth form so I don’t get to use Quiznetic myself in classroom environments anymore, so I could easily just stop working on it and let it gather dust. There’s a lot of work and time commitment involved and I’ve been doing it all for no gain on my side (other than the learning and satisfaction of creating something people are actually using). However I have often been thinking about turning it into a small side business as then I’d have a more compelling reason to keep working on it and I’d learn new skills in other areas.

Anyway here’s the features I’ve added (and more to come!):

Avatar collections

I thought maybe the 10 avatars was a bit too restrictive and I wanted to offer some sort of uploading functionality. Originally I let the user upload a single image as the avatar and different players would be distinguished by their colored border around it. But that didn’t feel very good. I then had an awesome idea of avatar collections (I may change the name in the future). Here’s how they work:

  • User can create an avatar collection before launching the game and upload a bunch of images to it which will be the avatars
  • Then when they come to launch the game they can choose a collection
  • When a player joins the game they are shown all the avatars in the collection and can choose which one they want to be
  • There is also advanced options to choose whether to automatically assign avatars to players and whether players should be able to have the same avatar or not
Avatar Collection
View of your collections

You can click on a collection to see the avatars you’ve uploaded to it. Here you can delete avatars or add more:

View of the avatars in a collection
View of the avatars in a collection

When you launch a game you can choose a collection and decide whether you want students to be able to choose their avatars or not and whether they can have the same avatar as other students.

Launch options

On the players screen they will see their avatar at the top:

Avatar player view

Avatars can be used on both team mode and classic mode. They add a whole new element of fun to both game modes!

The whole idea is it allows you to theme your game even further by making things like a star wars themed collection where each player is a particular ship or a collection for your class where each student gets their photo as their avatar. It opens up so many possibilities!

Custom avatars in team mode
Custom avatars in team mode

Game timer

I think I did a pretty good job of this feature as it seems to work well and cope with different scenarios like adding and removing 30 seconds, pausing and stopping, etc. This is only for classic games (the traditional single player ones) as it doesn’t make sense in team mode. The teacher can set the timer from the control panel at the side of the screen and can adjust it at any point. Once it gets to 3 seconds, an overlay will appear on the game screen counting down 3…2…1…Time’s up! and will stop all students from answering. If you need to add more time then you can through the control panel and students will be able to continue with the questions.

Game timer

 

Increased capacity to 50 players

I once received an email from someone asking about this so I know that at least one person wants it! It does look pretty crowded when you have 50 players on one space but in most cases it evens out quite quickly. This capacity also applies to team mode; each team will have a capacity of 50÷n members where n is the number of teams.

How much will Plus cost?

For the first month of release, prices will be $9.99 for a year of Plus and then $19.99/year after that. After the 10th April it will stay at $19.99/year.

Hope you like it!

This update is by far the biggest I have done since launch with about 4 months work. It’s been pretty fun and sometimes kind of nightmarish though (team mode being very tedious to test). I’ve been trying to improve my coding ability by integrating certain JavaScript design patterns to keep my codebase under more control so it’s been a good learning exercise! How much I work on Quiznetic in the future will  be very much determined by the success of this update because I’m starting to look into some other projects. However I’m sure no matter what the outcome, I still have about a months work of bug fixes ahead of me as being a one person team it’s very difficult to test everything!

Anyway, if you’re a fan of Quiznetic then please do consider upgrading to Plus! It would help me out a lot and I bet you’ll enjoy the extra features!

Thanks,

Tim @ Quiznetic

Quiznetic 1.7 will be released on the 10th March 2018