00:00:00.480
Hello everyone, I am Enrico Teotti, and I'm excited to be here today.
00:00:09.559
I’m going to talk about a project I worked on, where we built a gaming framework specifically for memory games. We had to address the requirements set by the game designers, who were accustomed to using scripting languages.
00:00:17.340
To facilitate this, we needed to create a system that allowed them to input all the necessary data, which would then be processed by a client-side gaming framework. Initially, we considered structuring this data within database tables, but we then discovered JSON Schema.
00:00:34.980
How many of you have already used JSON Schema? Can you please raise your hand? Not too many. The speaker before me briefly mentioned what JSON Schema is. JSON Schema allows you to define a JSON description of your data format. This meant our game designer could specify their requirements, and we could create an interface to help them enter this data efficiently.
00:01:07.140
For instance, we implemented a simple system where a game mode and frame rate could be set within a form. This is part of the Sinatra application that handled the data via parameters.
00:01:29.880
The game logic utilizes one of the available JSON Schema gems for Ruby, Oxford JSON Schema. There are two prominent options, and while the other is from Google, it lacks sufficient documentation, so I wouldn't recommend using it. Oxford JSON Schema is more current and has recently released updates associated with JSON Schema revisions.
00:01:41.759
Moreover, Open Document General Schema is also implemented client-side, allowing you to use a corresponding JavaScript library to consume the same schema. It’s quite a versatile solution.
00:02:08.300
To conclude, I want to quickly show you a real-world example. This is a JSON Schema that specifies the channels and game modes of the game. The example is called 'Mirror,' and it demonstrates how to create structured documents effectively.
00:02:35.040
Essentially, it provides messages based on the properties you define as constraints. I hope some of you will find this useful in your future projects. That’s all from me.
00:03:08.300
Thank you for your attention.