We thought right at the beginning of the project that it would be cool to have a narrator talking to the player, somehow like GLaDOS. He should be explaining the storyline, hinting the player if he's stuck, congratulating him if he succeed and mocking him if he fails. The issue with this is that it's hard to create a game with a randomized content while having a narrator, and we clearly have not enough time to create a narrator that can adapt to this randomness. So, we will have a predefined path and story, and we need the tools for that to be possible. Indeed, creating the biomes from code is not really something fun and having to compile/run each time is annoying. I love creating level editors for games I work on (like on my previous LudumDare game, What To Do When Your Drive Is Full) so I've been working on one for this game as well. Right now, you can only place blocks - no items - but you can rotate them, change the type and change the texture. The files are saved as binary files in the resources folder and are identified by their name.
More items and first narrator
We now have numerous items in the game: a pickaxe, an axe, a barrel, a flower, some rocks, a rope, a wooden plank… Some can be combined, some cannot. For the sake of the demo, we hard-coded the fact that the bridge to go from one island to the other is spawned and placed correctly. It still felt natural for the testers. The first version of the narrator is here! It's an intro pitch that starts when you get into the game and tells you why the world is split into biomes. It was recorded by another member of the group who then tweaked his voice to get a lower pitch to sound like an ambient god.
Oh, and we have a main menu! Gives a more professional look to our game!
PS: I just realized I never told the name of the game or its logo even if it was decided/made right at the beginning! It's Soar & Fall!
If you recall correctly, I previously managed to only get simple blocks but with different colors (supposedly corresponding to different materials like stone, grass, water, sand…). I've been working on having multiple shapes and got something working even if a little bit messy. I had an enumeration called BlockType defining the material that should be loaded from the resources and I added another one called BlockShape. It contains values such as "Block", "Slope" or "Tree" that are mapped to a prefab. Then, one or no material from BlockType is applied. This allows shapes to be customized (or not) and avoid having to create a lot of blocks combining all shapes and materials possible. Oh, we can rotate the blocks by the way now.
The first shapes:
The desert biome with the new shapes:
Saving and loading
I've designed the world and the biomes to be able to be generated procedurally. Therefore, we needed a way to save the generated stuff. I'm using the BinaryWriter and Reader classes with some handy extension methods (a new functionality of C# I've just discovered) for easy writing and reading of Unity types like Vector3 and Quaternion. The BiomeManager opens the file and store the biomes, storing only its coordinates and its type then asking it to store itself the blocks that it contains. For each blocks, the local biome coordinates, the type, the shape and the rotation are saved. Reading is the same process but is a bit more complicated as I have to create the game objects without knowing what type of biome or what type of block it is.
Other updates on the project
We have items in the world that can be grabbed and used on others by the player, but everything is done manually, both the placement and what interaction can be done (there's a giant if-else-if chain somewhere in a script). There is no centralized system to handle that with some abstraction for crafting ingredients for example. We also have a custom fancy skybox, a background music and a few sounds that are already giving the relaxing feeling we wanted.
Diving into more technical details
So we're using Unity, and I'm designing the biome system. I'll consider that you know Unity enough so I won't be explaining its concepts. This is the script architecture I have right now to get the last screenshot working:
- BiomeManager : MonoBehavior
- BiomeController : MonoBehavior
- Biome (abstract)
- BiomeType (enum)
- BlockType (enum)
As for the assets, I realized I don't want to be setting each blocks in a list somewhere in the inspector. Therefore, everything block-related will be in the Resources folder and loaded dynamically (see Unity Docs. To know what to load, I'm looping through the BlockType enumeration and loading a prefab for each. Right now, they are only materials, but I can guess that in the future we'll need more complex blocks and therefore prefabs.
So, the way it works is the following: the biome manager is first in charge of initializing the list of blocks and loading them. It then register all the available biomes, keeping the mapping between a BiomeType and an instance of a class inherited from Biome in a dictionary. Theses classes contains two methods, Generate and Update, and always take the same parameter, a biome controller, so that it can interact with Unity while staying as abstract as possible. Then, it creates biomes at specific positions by cloning a biome prefab with a BiomeController component, positioning them and using the Generate method from the corresponding biome on that component.
As we can see in the screenshot in the previous article, the ocean biome is generated by putting water blocks everywhere, the desert blocks are somehow like pyramids and the forest are a flat surface with random blocks under it. This is all done by code using the SetBlock method of a biome controller, three for loops and some conditions.
There is a lot of different coordinates systems involved in the system:
- The global one from Unity and the local one of each GameObject
- The global biome coordinates, where the central biome is in (0, 0, 0) and the one on top of it is in (0, 1, 0)
- The local blocks coordinates, where the block on the bottom left of one biome is in (0, 0, 0) and the top right in (4, 4, 4)
To be able to fetch biomes and blocks easily while avoiding manually keeping lists and dictionaries of the current world state, I decided to use the name of the game objects as references. Each biome has the BiomeManager transform as its parent and is named after its coordinates. For example, the biome in (4, -2, 1) is called "4--2-1". It works exactly the same for blocks but with they biome as a parent and their local coordinates.
One last thing before I leave you with all these information to digest: the abstract Biome class keeps static variables about the biomes sizes (in number of blocks and in all 3 dimensions), the size of one block (in Unity units, used to scale the block prefab when instantiating it) and the space between biomes (in number of blocks, which means it is also scaled when modifying the size of one block).
So, we met again!
We continued in the direction of having a character, exploring a world made of what we're going to call "biomes". Each biome has a theme (forest, desert, ocean…) and is made of blocks. The maximum size for a biome is 5x5x5. We're not sure yet how the player is going to interact with the world though: can he destroy blocks to gather resources? If we decide to go this way, I'm afraid we'll end up with something like Minecraft, after all we're talking about blocks, biomes and resources. Here is a simple draft of what we imagined:
A way of making this work is having items in the world, like a tree, a ladder or a rope, and making the player interact with them by combining them. This way, the mechanic is really simple, you grab something, you go interact with something else, and you have something happening (or not). Example: you have an axe, you have a tree, you interact and you get a plank. This is like crafting but keep the interface to the bare minimum (to nothing actually). We would also like to have a very relaxing look and feel. The graphics must be smooth, the ambient music but be relaxing and the whole game should be threat-less (or every threat should be without any permanent consequences).
For the project management tools, we'll be using Trello, GitHub and Slack (and Facebook, I mean, we're still students). Oh, and Unity x)
I started working on getting the biomes to exists and to be made of blocks. I'll leave you with a screenshot and give more details about how I designed the system in a future post.
Well, here I am, back after a session of brainstorming about what our game will be about.
We discussed the idea of having a game where resources management played a big part and we wanted to make these resources limited. The idea of having a small world made of blocks fit that concept pretty well. We therefore imagined having a character evolving in a 5x5x5 world where you had to manage your resources. The possibility of having something about ecology is cool as well, but implies to focus on the meaning of the game as well, which is probably too difficult for the small amount of time we have.
As it is now, we're going more into a exploration direction, with a character wandering around, using objects to solve puzzles to be able to go further into the game. More to come with our next meeting!
As I said, a post before the next week… !
On Monday (the fifth), we had our first guest lecture with Tommy Palm from Resolution Games. He is a game designer and an entrepreneur, this company being his fifth :o He has been working in the gaming industry for more than 20 years and contributed to some projects as huge as Candy Crush Saga - even if I don't like this game or King at all, I must say I was really impressed when I realized it. Anyway, he was there to talk about his actual company which creates VR/XR/AR mobile games, the last one being Angry Birds FPS: First Person Slingshot, a collaboration between Rovio (creators of the Angry Birds franchise) and Magic Leap. He talked a bit about his history, his activity and then focused about how the VR-mobile-games market should not be treated the same way as the standard mobile-games market.
I can't really do the same presentation here (and probably shouldn't) but I noted a few points that were particularly interesting.
First, the "Timing"
Tommy said he believed now is the right time to get into the VR market as this technology is rising and there's a revolution approaching. This was something I could relate a lot as I always felt like I was born too late to participate in either the computer revolution or the internet revolution or the smartphone revolution and obviously people always told me: "There will always be a next revolution, just be patient and be ready when it comes" and I guess these people were telling the truth. There will always be a next revolution. I don't really know if VR is the next one, but I surely hope so! I would love for VR to become mainstream and a new way both to work and to play video games.
Retention in games
Second point was retention of players in mobile games. That was an interesting point that I think doesn't only apply to mobile games. Sure, it's way easier to uninstall and start playing another game on mobile than on PC and you have a huge ton of apps concentrated on one unique platform - Apple's AppStore or Google's PlayStore - but free-to-play is free-to-play, no matter if it's on PC or on a smartphone - you can have this problem of retention in non-free games but when you already payed for something you will play longer before uninstalling (I guess?). So he discussed many ways of doing that: recurrent events, social features such as having friends and groups and adding new content.
VR issues with mobile (or even with PC)
First issue is with the hardware: it changes a lot. With every company in the world wanting to make their headset the world leading headset, we're lucky to have the OpenVR standard. In fact we're lucky to have any standard at all. Hopefully this won't be an issue in the future as either a too strong standard or the absence of standard can be an issue for innovation. Right now, we have competition and a lot of innovation going on which means to develop for VR you have to choose a platform, a platform that may disappear or be replaced in the few months that follows your game release - RIP Daydream, a platform that will also limit the audience you may be able to grow! Indeed, VR is not very widely used (something about 5% of the gamers around the world?) and the fact that everybody has different phones or different computers with different capabilities makes it even harder. I'm still thinking it has great days ahead of it as the number of users is quickly growing and devices such as the Oculus Go could make it grow even faster!
That's all for tonight, next week we'll focus more on my group's work and everything we're planning for our game. Have a nice restful sleep readers!
As you may know, I'm doing an exchange semester at KTH in Stockholm, Sweden. One of my courses is "Computer Game Design" (which I will probably abbreviate CGD later) and I have to maintain an individual (dev-like) blog as part of the evaluation. These posts will obviously be in English but I may do a translation in French if people are interested enough. Now that I'm done with the introduction, let's head to actual content!
This morning we had the presentation of the other groups game ideas, and it's been mostly super interesting stuff. I'll sure be playing all of them (and maybe writing about them as well, if it's okay) but I am especially interested in one VR horror game. I've never been able to try any game of this type and they're aiming at something - probably the only thing - I really like in horror games: deathless fear. So, no running in small hallways with a hideous monster behind, no being killed by a poorly done screamer… "Layers of Fear"-style! This game was amazing by the way, go play it. It achieves horror not by putting pressure on you but by putting you in an old almost normal house and as you explore the place, weird things starts to happen with painting fading away, doors disappearing while you're not looking, apples rotting in front of you, that kind of stuff. I wish their would be more like that for people like me who wants to get scared but not too much :)
We also had a guest lecture on monday by the founder of Resolution Games which was really interesting, but I haven't had time to write something about it yet. I will before next week, I promise!
Oh, and about my group idea, we started working on the first demo (due next Friday, everything will go really fast) and I will show some screenshots and explanation about what we're doing, but not right now. Now is the time to eat!
Incroyable, la 2547ème tentative de blog de NoNiMaaaaad ! Mais… il n'y a aucune fonctionnalité ? OUI. C'est beau hein cette fluidité liée à l'absence de possibilités ?
Du coup je vais me servir de ça pour poster des pensées probablement assez courtes mais au fur et à mesure que des fonctions seront ajoutées, le contenu s'étoffera aussi :) (Note : pouvoir écrire en Markdown et mettre des émojis)