Page 1 of 4 123 ... LastLast
Results 1 to 10 of 32
  1. #1
    Join Date
    Dec 2002
    Location
    Norway
    Posts
    450

    Learning Game WIP

    Working title: «Book of Knowledge»

    My new year’s resolution was to finish and publish a game, so I’ve started making a (relatively) simple 3D RPG in Unity. I’m primarily targeting the iPad, but I hope to get it working on PC and android as well. The reason I’m writing this it to keep myself motivated, and to get feedback on design and implementation. I don’t expect to make any money on this, even though I’ll try to monetize it using in app purchases, but I also don’t have any expenses. And in that spirit, I might as well share everything, and hopefully get some useful feedback and make a better game

    I have been working on a pretty complex JRPG prototype for the last half year, and this is a continuation of some of the experiences I made from that project. I also made a prototype of this game in a console window.


    GAME DESIGN
    In order for this project to get finished, I’ve cut back on nearly all RPG elements: There will be no serious story (I’ll probably play off RPG clichés instead), no combat strategy elements, no spells or attacks, only one player, few armor pieces and weapons, and simple graphics. So what features will the game have, and why do I still call it a RPG?

    The RPG elements, such as quests, combat and gaining EXP are really only a framework for learning. Combat will consist of answering multiple choice questions; answering right damages the enemy, while a wrong answer will hurt the player. Levels and equipment effectively increase how many questions you can get wrong before dying by increasing HP, defense and attack. I want learning to be the main focus, and therefore the RPG elements can’t be too distracting or demanding. I suspect it will be difficult to balance the fun elements and challenge from a RPG, and still make the game accessible to those that primarily want to learn.

    Answering questions to content you haven’t learned is hard, and you’ll probably die if you dive right into combat. Every town therefor has a master of all knowledge in the area, and by finishing quests, he’ll teach you the answer, give an explanation and teach a mnemonic for a collection of questions. This is stored in the “Book of Knowledge”, where the player can revise difficult subjects.

    All questions have a difficulty rating; lower monsters give easier questions while some questions can only be encountered from tough monsters. I want to entice the player to “collect” all questions by fighting all monsters of every area, sort of like the “collect ‘em all” in pokemon.

    You gain experience from answering questions. Every question gives the same amount of EXP, but for every time it is answered (correctly), its EXP gain will diminish. This will make the player search for new questions by fighting different monsters and thereby learning new material.

    The question topics are not coupled with the game. This is an important point. Every area (town + combat area) in the game can be coupled with any given “learning module”, which may consist of maybe 50 questions and explanations. These can be bought and set within the game. No part of the game needs to have specific dialogue for any topic, only the Book of Knowledge and questions given in combat will be affected by changing learning module.

    This move potentially makes the game appeal to a lot more people than if it was only about learning Japanese, history or neuroscience. And I can pretty easily update the content of the game by uploading an external XML document at a few kilobytes with no changes in code. This also gives the game a lot more replay value, which allows me to cut down game content to a manageable level.

    My main challenge with the game design as I see it, is making the game re-playable without adding more game content. “Simple” games like solitaire, chess, Tetris, puzzlers etc are intrinsically replayable, and my hypothesis is that it’s because of their simplicity and lack of content, while still being challenging. So it might be an idea to add as little typical RPG content (such as story, dialogue, cut scenes and specific quests) as possible. Also, RPG might be a poor choice of framework, but I’m convinced the battles will work pretty well.

    I'm sure the time frame for finishing this game will blow out of proportions, but my goal is to have a playable prototype with combat, quests and art assets (for at least one area) in place to the summer, and add content, polish and test until Christmas.

    TLDR; I’m making a game designed to teach various topics to the player. Hopefully it will be a fun and effective way of learning. I will do my best to keep this thread updated with the latest implementations.

  2. #2
    Join Date
    Dec 2002
    Location
    Norway
    Posts
    450

    Progress – week 1

    After making a simple prototype to test the combat mechanic during the holidays, I started in Unity exactly one week ago. The game will be heavily menu based, and as this is obviously a weak point for Unity, I’ve had to get into NGUI. I’m actually using the free version, because the Asset Store’s 50 % off New Year’s sale was suddenly and unexpectedly over the very day I was planning to buy it. And then 95$ felt like that much more money. But I can wait for the next sale.

    I’ve made a simple test level with default assets and some cubes, and imported the third person controller from 3D Buzz. I think I’ll scale this down, as it’s probably overkill for simple move mechanics. I don't know if it's the model or the camera system/ character controller, but the Unity uses significantly longer to build and run after importing the TP character controller.


    DIALOGUE SYSTEM
    I’m also making good progress on a dialogue system. Dialogue is triggered by standing in a NPC’s trigger box, and pressing the action key. A dialogue window is then parented to the GUI camera. The NPC’s dialogue is set in a separate XML document connected to the game object, and this is parsed in code. Every dialogue contains dialogue screens, which are separate mini dialogues with a single speaker. The text for every screen is in turn word wrapped and cut into parts that will fit in a single UI box. Pressing on the text box or hitting space shows the next part (or the next screen). I’ve also added the ability to skip entire dialogues (without losing potential rewards).

    The dialogue currently uses only the first screen, so I still need to add screen sequencing. I also need to the ability to make choices, and to perform actions (get reward, trigger event etc). I also haven't used much time on the design.

    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	130112 - Dialogue screen shot.png 
Views:	255 
Size:	415.6 KB 
ID:	73360  

  3. #3
    Join Date
    Aug 2007
    Location
    Montreal, Canada
    Posts
    618
    Looking forward to your progress.

    I want/need to give nGUI a try for my game too.

  4. #4
    Join Date
    Dec 2002
    Location
    Norway
    Posts
    450

    Progress – week 2

    I've continued on the dialog system (elected for using American English "dialog" ), and I'm satisfied with how it's working for the time being. It now supports proper dialog trees, and if there is a branch in the dialog, a new menu with buttons animates up behind the main GUI and waits for input. When a button is pressed, it animates down and a new dialog screen is set based on the input. There can be several speakers in a dialog, so the player can also say more than the choice answers. The system still doesn't support any actions or events. Progress/ state of the dialog is also not stored, so the NPC will say the same thing every time.

    I've started on the combat system. The code is actually pretty similar to the dialog system, but a little more complicated. The flow of combat is that the enemy asks a question and a menu bar with answer options animates up. If the answer is correct, the enemy is damaged, and the player is attacked if the answer is wrong. I don't see any added value of implementing player attacks yet (unless I add a lot more depth to the combat, which I might do later), so the cycle is repeated with a new enemy attack. The questions are importing correctly, answers are evaluated, and the enemy performs an attack, but there is still a lot of work to be done.

    I tried to export a demo to the webplayer, but the dialog didn't work. I have a strange bug where the dialog is not imported the first time I run the game, but it works fine the second and third time. I'm not writing to any files when I'm parsing the xml file, I'm just setting properties, which are not stored. Any ideas?

    I'm a bit surprised how little of my prototype (console) code I've been able to reuse in Unity, and I really prefer my old code (I somehow ended up using a lot less interfaces, several controller singletons and a mix of setting things in the inspector and in code). I really dislike not being able to pass arguments, and the extensive use of strings (e.g. GameObject.Find("")). As long as I avoid monobehaviours, I can have decently clean code, but that's not how Unity is set up. I think I will use more coroutines along the way, but I always crash Unity when I experiment (Unity can't handle infinite loops...), and I'll try to get a better hold on NGUI's event system. But that also relies on invoking methods with strings which can be a pain if you misspell or change the method name).

    I'm also doing a lot more trial and error now, and debugging is a pain in Unity. Any tips for debugging other than writing a large number of Debug.Log()'s? I don't know how to do it, but I would like a tool for automatically inserting a Debug.Log("Class.Method()"); on the top of every class, when activating a global debug option.

  5. #5
    Join Date
    Aug 2010
    Location
    In my room.
    Posts
    748
    Hey, keep it up. I'm not very good at code yet, but your problem with the fails first time. I think when I've experienced such bugs, it's due to an if check in the code that skips a step should something fail, but at the same time fixes the cause of the problem problem. Which means the problem is fixed for the second time you run the program.
    I'm so negative, like an electron.

  6. #6
    Join Date
    Dec 2002
    Location
    Norway
    Posts
    450
    Thanks, but then the question becomes: what does Unity automatically fix? I'm getting no errors. I'm thinking it might be that even though the dialog is pretty small, it still takes some time to parse, and it's not ready before the other stuff that depends on it is instantiated. Maybe the result is cached in memory, and is ready the second time I run the game. In that case, maybe a pre-loader can fix the problem.

  7. #7
    Join Date
    Dec 2002
    Location
    Norway
    Posts
    450
    I found a solution to managing debugging statements. I found a tutorial for a Debug wrapper class that lets me use string formatting in my Debug.Log statements. The beauty of it is that I can comment out a single line on the top of the class and all my method name logs are disabled. I still have to manually write "Dbug.LogMethod("Class.MethodName()"); for every significant method though. If you comment out DEBUG_LEVEL_METHODS only the method logs are disabled, while logs, warnings and errors still work. The downside, and this might be a big one, is that double clicking the log message in Unity does not bring you to the Debug statement, but to Dbug.Log() or .LogMethod(). It's saving me for writing a lot of string.Format's, and makes it easy to disable an unlimited number of debug logs, but because of the double clicking functionality, I'm still using Unity's Debug for throwing errors.

    Code:
    #define DEBUG_LEVEL_METHODS
    #define DEBUG_LEVEL_LOG
    #define DEBUG_LEVEL_WARN
    #define DEBUG_LEVEL_ERROR
    
    using UnityEngine;
    
    public class Dbug
    {
        [System.Diagnostics.Conditional("DEBUG_LEVEL_METHODS")]
        public static void LogMethod(string formatString, params object[] paramList)
        {
            Debug.Log(string.Format(formatString, paramList));
        }
    
        [System.Diagnostics.Conditional("DEBUG_LEVEL_METHODS")]
        [System.Diagnostics.Conditional("DEBUG_LEVEL_LOG")]
        public static void Log(string formatString, params object[] paramList)
        {
            Debug.Log(string.Format(formatString, paramList));
        }
    
    // Also Warn and Error method, but trying to keep this short.
    }


    I highly recommend taking a look at prime 31's channel btw, lots of good and free stuff.

  8. #8
    Join Date
    Dec 2002
    Location
    Norway
    Posts
    450

    Progress – week 3

    I'm at the end of week three, and I'm pretty happy with the progress so far.

    I have fixed the XML parser, so that it also works when building out (only worked in editor previously). The trick was to use Resource.Load() instead of a relative path, since the folder structure apparently changes when building out. I use a List<TextAsset> for both dialogs and learning modules (question lists for combat) on my GameController. That makes it easy to drag and drop xml files, and to change names, without having to go into code afterwards.

    The combat system is beginning to resemble what I am looking for. Everything in the combat scene are still just placeholders though. But I have at least the basic functionality in place. The combat system is a state machine that basically cycles between the enemy's turn, and the player's.

    Since I fixed the xml parsing problem, I can finally publish demos here This weeks shows the combat system so far. The questions are given randomly from a pool of four questions, so the same question might come several times in a row. You win by answering correctly, and loose by getting 5 wrong answers. Both winning and loosing currently resets the scene, and the data doesn't persist (so the player's EXP stays at 150).

    I plan on having a neuroscience learning module, but the current questions are pretty random. I generally don't like when tests are given before the explanation, but I haven't made that part yet, so this is an exception.


    Week 3 - Combat demo


    I would appreciate any feedback! Especially on the flow, timing, scene composition (size of UI etc; I also tried having the UI at the bottom btw), and on the game concept generally.

  9. #9
    Join Date
    Aug 2010
    Location
    Vector3.Zero
    Posts
    146
    nice GUIs, but I felt like I was in my biology class in high school(so frightened )
    Noob stuff I've been playing with

    Multiplayer RPG - http://www.youtube.com/user/Stridervan?feature=mhee
    Advanced Minimap Tutorial - http://www.youtube.com/playlist?list...ature=view_all
    Website - http://projectzoso.weebly.com/

  10. #10
    Join Date
    Dec 2002
    Location
    Norway
    Posts
    450
    Thanks Yes, those are probably not easy questions to take on the spot, but I intend to teach them properly before testing. I hate situations when you are just supposed to know something, without being given a chance to learn it. I also hate learning purely by rote memory, so the questions will not stand in isolation.

    Ni no kuni was released here this weekend. That gave me inspiration for some features outside of combat, and I found a lot of don't-dos I'll try to avoid. I'm also playing a lot of Science Illustrated: Quiz Battle on iOS and Android. That kind of resembles the combat part of my game, but is a multiplayer game.

Page 1 of 4 123 ... LastLast

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •