# Quiz Demo

**URL:** https://forum.makecode.com/t/quiz-demo/12088
**Category:** Show & Tell
**Created:** [February 8, 2022, 6:37pm UTC](https://forum.makecode.com/t/quiz-demo/12088 "2022-02-08T18:37:59Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![AlexK](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/alexk/32/33339_2.png) [@AlexK](https://forum.makecode.com/u/AlexK)
#### Post date: [February 8, 2022, 6:37pm UTC](https://forum.makecode.com/t/quiz-demo/12088/1 "2022-02-08T18:37:59Z")

</div>

In the thread for my _Wordle_ clone, I mentioned that I have been thinking about data files. I figured I’d share a proof of concept and a teaser of my next project.

> **[Quiz Demo](https://arcade.makecode.com/35965-17573-71784-89500)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

I don’t have an editor for the data file yet. I basically exported the contents of a database that I created for a different project and then massaged the CSV file into a JSON file. The “important” data is encoded so that you don’t accidentally view the questions and answers. I also hacked together an “extension of an extension,” allowing the excellent Text Sprite extension to handle long strings by wrapping lines.

This one is going to take a bit of time yet, but I thought the basis of the project might inspire some of you to take the core of it and use the ideas in your own JavaScript projects.

Have fun!

---

<div class="post-metadata">

### Author: ![AlexK](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/alexk/32/33339_2.png) [@AlexK](https://forum.makecode.com/u/AlexK)
#### Post date: [February 9, 2022, 11:09pm UTC](https://forum.makecode.com/t/quiz-demo/12088/2 "2022-02-09T23:09:55Z")

</div>

Just in case any of you want to dig deeper into this idea, I cleaned this up a bit last night and fixed the hilarious typo in the question that randomly appeared in the original screenshot. 😆

> **[Data Files Core](https://arcade.makecode.com/83743-01920-56860-96644)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

The `data1.ts` file is closer to what I’m envisioning for the output of some sort of data file generator. Here’s my leading candidate for a design:

1. Use a generic tool to create a SQLite database with the data. There are many really good, cross-platform tools out there, like _DBeaver_ and _SQLite Studio_. Why reinvent the wheel!
2. Create a translation app.
  1. Read the tables from the database.
  2. Present a simple UI to the user to select tables, columns, and which columns to encrypt.
  3. Generate TypeScript files that can be copied and pasted into a MakeCode project.

I’m thinking C# to build a web app that can be tossed into Azure Static Pages. Easy enough to build native apps, too, with .NET.

I can think of at least two use cases.

- The obvious use case is to store questions and answers for a quiz game.
- Another really cool use case would be for interactive fiction.

Happy to entertain any thoughts or ideas that y’all have. Just felt like doing a brain dump to sort and clarify some of my thoughts.

Happy Wednesday! Hope you’ve all had a great start to the week!
