<script>
    import Content from '@/components/Content.vue'
    import Header from '@/components/Header.vue'
    import TextFrame from '@/components/TextFrame.vue'
    export default {
        name: 'About',
        components: {
            Content,
            Header,
            TextFrame
        }
    }
</script>
<template>
    <TextFrame>
        <Header>
            Background
        </Header>
        <Content>
            <article class="prose mx-auto">
                <section>
                    <h2>What Exactly Is This?</h2>
                    <p>
                        This web app is a personality quiz to see what <em class="uncial-antiqua">Wanderhome</em> playbook you are.
                        I have previously made a smilar <a href="https://masks.vsnt.uk/" target="_blank" rel="noopener noreferrer" class="hover:bg-orange-200">character quiz for Brendan Conway&rsquo;s <em>Masks: a New Generation</em></a>.
                        I have also made a digital version of the <a href="https://reftest.vsnt.uk/" target="_blank" rel="noopener noreferrer" class="hover:bg-orange-200">Scottish Korfball refereeing exam</a>.
                    </p>
                    <p>
                        This was a fun programming exercise I set myself.
                        But quizzes like this are also really enjoyable to do, and not to mention compare our results with others.
                        And I would love to make this quiz if it gives me a reason to talk to people I know about my favourite TTRPGs.
                    </p>
                    <p>
                        If you want to read more about <em class="uncial-antiqua">Wanderhome</em>, you can do so in the <router-link to="/about/wanderhome" class="hover:bg-orange-200">relevant section</router-link>.
                        I wholeheartedly recommend playing it!
                    </p>
                </section>
                <hr class="border-gray-400 w-2/3 mx-auto"/>
                <section>
                    <h2>
                        Technobabble
                    </h2>
                    <p>
                        It has been a long time since I made the <em>Masks</em> quiz, and this quiz has been proportionately over-engineered!
                    </p>
                    <h3>
                        Dividing Client/Server Side
                    </h3>
                    <p>
                        In my last upgrade to the <em>Masks</em> quiz, I made the quiz run on a server which renders the questions and evaluates the restuls.
                        The app runs on Python and Flask, and its pages are rendered primarily through Jinja.
                        This means that the Python server handles the quiz and also serves the web site, which is not the most robust.
                    </p>
                    <p>
                        The <em class="uncial-antiqua">Wanderhome</em> quiz in contrast separates the server (running on Python) that renders the quiz and evaluates the results, and the client (running on JavaScript and HTML) that provides the interface.
                        The server is a proper system-agnostic API.
                    </p>
                    <h3>
                        Storing Results
                    </h3>
                    <p>
                        One of the things I have added to the quiz is that it will store the results people get.
                        It will not collect anybody&rsquo;s name or any identifying information.
                        But it will record how people answered, and what results people got, so users can compare how they did with other users anonymously, and so I can evaluate whether or not the questions are biased or skewing results.
                        It will store all of this in a database: originally an SQLite database, but I can configure the app to use a MySQL database if I wanted.
                    </p>
                    <p>
                        One of the biggest challenges of these personality quiz projects, funnily enough, is the mathematical quandary that writing the questions entails: ensuring that all outcomes are equally possible in the quiz overall, but also that there are sufficiently varied permutations of questions and answers that score for different outcomes to avoid some playbooks collapsing into each other.
                    </p>
                    <h3>
                        Different Frameworks
                    </h3>
                    <p>
                        I made the regrettable decision of teaching myself a new framework for this project.
                        I built the UI using Vue with the Tailwind CSS framework, and it was an experience I found really frustrating because of how I threw myself in the deep end.
                        It is unbelievably fiddly, with even some of the most intuitive features being an utter pain to set up, needing detective work of finding compatible libraries and plug-ins.
                        What was even worse is that the JQuery library that I normally use for API calls is not compatible with Vue, so I will need to learn how to use Axios.
                    </p>
                    <p>
                        On the whole, despite how much of a hassle it was, I preferred the outcome of using Vue and Tailwind because the result looks a lot less samey to my Flask/Bootstrap projects.
                        The result here is one that has much more polish.
                    </p>
                </section>
                <hr class="border-gray-400 w-2/3 mx-auto"/>
                <section>
                    <h2>
                        What Next?
                    </h2>
                    <p>
                        I am running out of geeky TTRPG-related programming projects.
                        I was thinking of making a web app to play a game of <a href="https://www.lamemage.com/microscope/" target="_blank" rel="noopener noreferrer" class="hover:bg-orange-200"><em>Microscope</em> by Ben Robbins</a>, published by Lame Mage Productions.
                        There is an app that exists, but every time I tried using it I struggled to get it to work properly.
                        The developer has not responded to my issues on GitHub, so I am tempted to reverse engineer it and make one from the ground up.
                        The original app was written in programming languages that I have no clue about, so I would rather just build it from sratch in Python and, unfortunately, Vue.
                        That might be the next project I tinker with.
                        It will apply all the things I currently know, and also add websockets and state synchronisation to the mix.
                    </p>
                </section>
            </article>
        </Content>
    </TextFrame>
</template>
<style scoped>
</style>