Category Archives: Game Development

Crea’s Vision Part 3 – Worlds

In my last two posts I have been covering our vision for Crea. The first was on Crea and the community. The second post I talked about gameplay in Crea. In this final part I will be sharing our vision for the worlds in Crea.

Worlds in Crea will be randomly generated. Worlds will be constructed out of many different “biomes,” which can be true biomes (such as a tundra) or constructed areas (such as the aforementioned casino). We want players to be able to have complete control over the world generation and are planning advanced options that will allow players to pick which biomes the world will consist of and their frequency.

World generation is just the beginning. We are working towards having Crea worlds be organic. Plants have complete freedom in how they can grow and spread. At first weather will be purely for looks, but eventually we want weather to actually affect the world – for example, a forest could get caught in a lightning storm and burn to the ground. (Dynamic weather will be a post-release feature.)

In addition to being organic, Crea worlds will be dynamic. Events will happen randomly or after certain conditions have been met. Such as new NPCs appearing, monster swarms attacking, and bosses emerging. Possible quests will come and go and can affect the world on a more permanent level.

The last thing I’ll mention is connecting worlds together. At the moment each world is self-contained. Eventually I would love to make it possible to connect worlds together making it possible for players to go between them. This could be used to make instanced dungeons or lots of small worlds that could act like zones (towns and dungeons) in standard RPGs.

I hope you enjoyed reading this series of posts. It feels good to get this all out. I should have done it sooner!

Advanced Modding Video

Before getting to the video, someone has created a page on reddit for Crea. Help us spread the word. Thanks! http://redd.it/x22mt

Moving on, this is my follow up video to the modding video I posted last week. This is some advanced modding and consequently is much more involved but don’t worry about that. We will be writing lots of documentation and tutorials which will explain everything in full detail. Enjoy!

Modding Video and Development Update

I forgot to post the modding video I put together the other day. It only covers some very simple modding but it really shows just how easy it is to mod Crea. I have another video planned that I will be putting together within the next few days (maybe even today!). This follow up video will have showcase some advanced modding.

Aside from putting together videos and keeping up with the Kickstarter campaign, I have been doing my best to keep pushing forward with development. Lately I have been implementing the real inventory system. Once I finish it and get some screenshots I will go over the details. I will say that it will be a lot less like Terraria and Minecraft and more like Torchlight.

Progress Overview

We have been working on Crea heads down for the last few months and have made great progress. Now we are beginning to share Crea with others and are getting some attention. Many new people are coming here and likely are wondering a few things such as “What is Crea?”, “What platforms will it be on?” or “When will it be released?” See the Crea, FAQ and Team pages for answers to these questions and more.

One thing these pages do not cover is our current progress on Crea. Here is a quick summary of what we have accomplished thus far and what features are coming up soon. Links are to the related blog posts.

Implemented:

Coming Soon:
  • Lighting
    • Not much to be said here. Lighting to add to the atmosphere and exploration.
  • Leveling
    • Unique proficiency leveling system where you gain experience according to your actions
  • Equipment
    • Equipment system that can have consistent stats or randomly assigned stats.
  • Monsters
    • Monsters are spawned from monster spawners that will spread if not destroyed.
  • NPCs
    • Start with basic NPC interactions such as dialog and item trading (for stores and the likes). More involved NPCs will come a little later – such as quests.
  • We have many more features we will implement but these are the highest priority features at the moment. If you want to see our timeline be sure to check out the project plan.

We will be continuing to update regularly. Be sure not to miss any and subscribe to the blog!

Creating Placement Items

First of all, this builds on top of my previous blog update so you should read that now if you have yet to. This post will go a little more in-depth into what it takes to create an item that can be placed in the world.

Starting out lets say you are an amazing artist or have one on hand – like I do! Said artist has created an ingenious llama statue.

Hello, I am a Llama.

Now you want to place it into the game… but how do you do that? Inside of your item mod directory you need to create a content script so Crea knows about your statue. Here is what the script would look like.

name = 'Llama Statue'

#Render Component
render = Render('mods/base/item/llama_statue.png')
add(render)

#Item Component
item = Item()
item.stack = 999
item.delay = 200
add(item)

#Craft Component
craft = Craft('Home', 'Decoration', '') #Category, Subcategory, Surface
craft.add('mods/base/tile/stone.py', 50) #Materials needed
craft.quantity = 1 #Quantity made from a single craft
add(craft)

#Placement Component
placement = Placement()
placement.addAxis(PlacementAxis(AxisType.AXIS_FLOOR), Vector(5, 32))
add(placement)

I added in some comments for the crafting since I have not covered that before, but what we are really looking at is the placement component at the bottom. Items are composed off a list of possible axes that the item can be placed on.

The item can be placed on any axis but only one at a time. The types are floor, ceiling, left, right, backwall and wall. Backwall is the a tile in the wall layer. Wall is the combination of left and right. In addition to the axis type, each axis has a range, an area, and a list of supports.

The range of an axis defines where and how much support is needed to place the item down. This is the second parameter for PlacementAxis. In this case we have Vector(5, 32), which translates to start at pixel 5 on the bottom of the image (since it is floor) and go for 32 pixels. This will default to starting at 0 and using the entire axis length. The reason for this feature is to enable items to have a skinny base and only require support for the base and not the entire width of the item.

Area for an axis is the game’s physical representation of the item relative to upper left corner of the image. This area is used to reserve space for items in the world. This area defaults to the size of the image.

The last part of an axis is the list of support it can provide. It is defined very similarly to an axis with a support type and a range of where and how much support to provide. The type can be on any one of the four sides; top, bottom, left or right. Here is an example of a table placement with support on the top.

placement = Placement()
floorAxis = PlacementAxis(AxisType.AXIS_FLOOR)
floorAxis.addSupport(PlacementSupport(SupportType.SUPPORT_TOP, Vector(3, 57)))
placement.addAxis(floorAxis)
add(placement)

And now we have a llama standing on a table!

Here are a few cool features about the placement system.

  • Item placement is on a per pixel – not a grid.
  • Item placement is smart and provides some tolerance to moving to unavailable spaces.
  • When you have a placeable item as your active item you will see a semi-transparent hint of where it will be placed.
  • An item can have an animation component added to it with animations named to the different axes. The game will automagically use the correct animation when the item is placed.
  • An axis can have any number of supports, which means that you can do something like a Menorah.

Overall this system is really flexible and provides an extreme amount of power to both modders and world construction. Currently its biggest limitation is that items cannot be placed inside of another item. This limits some items such as a bookcase and placing individual books in it. It is probably still possible – just have to be creative! If the demand is high in the future I may revisit this limitation but for now it is something I am willing to live with.

Feel free to ask any questions or give constructive feedback. This is my first attempt at writing a more in-depth guide to modding.

Crafting in Crea

When I first started brainstorming Crea and how I would do things differently from current sandbox games, crafting was the second thing that came to mind (after modding of course). The positional crafting system in Minecraft is an interesting approach but it, like other crafting systems, share a common problem: The player has no idea what can be crafted and/or what materials are needed for an item. Nearly everyone (if not everyone), loads up Minecraft, plays around a little bit and then opens up a wiki to find what items to craft and what is needed. The same goes for Terraria for the most part. In the end, players become wiki dependent and consequently the game does as well. This stops in Crea.

A player must first aquire the recipe for an item before being able to craft it.There are several means to acquiring recipes: monster loot; treasure chests; quests; and, most importantly, the Researcher NPC.

The Researcher is specifically for discovering new recipes. First you provide the researcher with materials. Upon returning to him after some time, you gain any recipes his research turned up. We are also considering a hint system that will help steer players into being able to discover more recipes.

This should help give new players direction and also keep them in the game. Basically, crafting will feel like a natural and intuitive aspect of the game rather than a mystery that requires switching in between the game and a wiki. Another exciting aspect of this crafting system is that it lends itself to the ever-expanding content Crea will see.

Back from Vacation

Over the last week and a half we have been on vacation. We went to the East Coast and had a great time with some friends. During the trip I did my best to sneak in Crea development whenever possible. I got two big things did get done during vacation with the help of a friend.

First of all, the blog is finally being hosted at siegegames.com. I have owned this domain for over a year now but never got my own hosting – even now it is a friend hosting it! All that remains is to finish setting the site up.

The other news is that the item toolbar is fully functional. It displays how many you have of each item and the currently selected items for your left/right click. You can change the selected items with the number keys. Moving items around is simple – just click on an item to grab it and then click another item or empty space to drop the grabbed item. The UI needs some work, such as the item’s icon position, but it is good enough for an initial version.

I’ll be returning to my posting schedule starting Monday. So more updates are on their way!

Development Update – Lighting and Saving

I am doing my best to avoid reinventing the wheel. This is quite obvious with my extensive use of third party libraries to help with nearly all aspects of the game engine – from rendering using SFML to randomly generating worlds using ANL. This backfired on me this past week.

At first I set out to work on the world lighting. After doing some research I stumbled upon Let There Be Light (LTBL), which helps with basic lighting and shadows. I began incorporating it into my game engine and quickly found that it had some fundamental bugs. I posted to the linked forum post above in hopes that the developer would fix these issues. I was pleasantly surprised at how quickly the developer fixed the issues. Not long after resuming I once again got caught up on something and had to wait for the developer’s response. The developer was great about replying and I’m really appreciative about it but I do doubt that this was the right path.

I know what I want for the game’s lighting. LBTL gets me about 70% of the way there with minimal effort but I have to tweak and bend the code to my design. This is going to take a great deal of time and in the end it may have been faster to just throw together my own lighting system. I may still do this using LTBL as an example.

There was progress made for lighting though. I setup a light and hull (shadow casting) components. This means that entities can have a light source attached to them and/or have a shadow casting convex hull attached to them. Here is an example with a hull attached to the player, which needs much work.

During my downtimes between the lighting, I would work on the world saving. I am using boost for much of my game engine and decided to use the boost serialization library to do all saving/loading. This library has some really cool features but these features come with a heavy cost in code complexity. Before too long I realized that I did not need these features and so I was back to square one. I decided to do my own and within no time I had the basics working.

I started doing some testing. First I tried a small world of 100×100 tiles was saved to a 73kb file; this worried me. I want to have huge 8000×2000 worlds at least. So I tried a world at this size… 120MB! Additionally it took about 4-5 seconds to save. This is good for a first run but it is unacceptable and needs some serious optimization.

First I’m going to do compression on the data before saving it to disk. Fortunately this data is very compressible given that it is extremely repetitive. I tested this by zipping the small world save file. It went from 73kb to 1kb. This is promising! This helps with disk size but it is going to hurt the time. My plans for fixing the time is to reduce saving data that hasn’t changed. Right now the entire world is saved every time but the reality is that only a small portion of the world is going to change in a minute. One of the cheapest ways to do this is the same way Minecraft does it – split the world up into separate files.

This week I’m going to work on finishing up the saving/loading, which is going to take a little longer than I initially thought. What doesn’t though? If things go well then I will get back to working on the lighting. Before too long I’ll be able to have some visual to show off!

Development Update – Take One

As promised, here is my first development update on Crea. We’ve made tremendous progress over the past month but to keep things short I’ll just cover what I worked on this last week. The majority of my time was spent working on water simulation. At first I was not sure what the best approach was, but after some research I discovered the joys of cellular automata. For research I found these articles to be quite useful: Gamasutra articleCompressing Space and Time and Cellular Automata for Physical Modelling.

Simulating fluids with cellular automata is reasonably cheap, which is needed with worlds as large as the ones in Crea. A bonus to implementing a cellular automata system is that it can be used to simulate other things – fire! I am rather pleased with what I have written thus far and would eventually like to write a more technical blog post about it, but that will have to wait. It is time to break up my wall of text posts with some actual content. So without further ado, here is the first look at the game and its water simulation.

In other news, while I was watching last week’s Indie Chatter, he mentioned a website that he uses for project management, Pivotal Tracker. I looked into this and it has some cool features such as automatically calculating what tasks you will be able to complete over the next iteration (typically a week). The thing that really stuck out to me is that projects can be public, which means that anyone can see what is currently being developed along with when releases are set and basically everything else.

Last week I said I want to try to be as transparent as possible, well here is the Crea Pivotal Tracker. It is a little bare at the moment because I just started it up on Friday, but I will be doing my best to keep it updated and filled with all of the stuff I am working on. Perhaps I will even be able to convince Aaron and Kelley to join in on it.

Terraforming in Crea

Randomly generated content can be great and sometimes not so much. If the input is too constrained, then the result is something that is different and yet all too familiar. I think this can be seen in the Terraria world generation. Terraria has a fairly limited number of biomes and how they are used is restricted. Such as a large world will always have 6 floating islands and there is always one dungeon. After a few worlds patterns quickly become apparent. Don’t get me wrong though. Terraria can provide dozens of hours of exciting exploration, but the novelty does eventually wear off.

World images created with MoreTerra

When I set out designing the world generation for Crea, I knew I wanted to enable players to be able to have unique experiences with every world. The answer was quite obvious – moddable biomes. If players could easily create their own biomes or play with other player’s biomes then the possibilities are endless. Here is an example of what a biome content looks like.

biome.name = "Plains"
#How often this biome should be used
biome.frequency = 50

#The minimum and maximum dimensions of the biome
biome.minWidth = 80
biome.maxWidth = 300
biome.minHeight = 80
biome.maxHeight = 300

#Specifies that this biome only occurs on the surface
biome.surface = True

#The elevation of the biome
biome.elevation = 100

#The amount of elevation changes (hills) in the biome
biome.hilly = 10.0

#How much the lowest and highest elevation can differ
biome.relief = 2.0

#A list of biomes that cannot neighbor this biome
biome.blacklist = ['Volcano']

#List of actions to apply to the world
#This part is still being worked on.
biome.placeTiles('stone', frequency=20, pattern)
biome.placeTiles('mud', frequency=10, pattern)
biome.plant('grass', frequency=40)
biome.plant('tree', frequency=5)

Some of these details will change but this gives a good idea of what a biome looks like. Most of the contents are explained. You can do simple things like increase the ‘hilly’ and ‘relief’ properties and have mountains. For the real power we have the actions section at the bottom.

After the basic terrain has been generated, each biome has it’s list of actions applied to it. In this case all Plains biomes will have stone randomly placed, then some mud, then lots of grass will be planted, and finally a few trees. I plan to include several basic actions that players can use to make creating biomes as simple as possible, but what if you want to do something completely different? Lets say you want to build a crazy dungeon. For advanced modders, I have added a special action that takes a callback function which provides you ample power to twist the world to your desires.

Now that we know how biomes are made, the next logical question is “How are they used”? Players will have the option to create a world with simple or advanced options. With simple the player chooses a name and the world size and is good to go. From the advanced options the player is also able to adjust the frequency of biomes. Want a world consisting purely of bunny warrens? Kelley, our artist, does!

Not only will players never have to see the same world twice, but they will be able to explore the worlds that they want.