Category Archives: Game Design

Feature – Crafting

Overview

In Crea the majority of items are obtained through crafting them. Crafting is a simple process but in order to craft an item you first must obtain that item’s recipe. 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. Upon request the research can provide hints as to what items he may need to discover more recipes.

After obtaining an item recipe, you must obtain the materials needed to craft the item. Additionally, many items will require you to be near “crafting surfaces” such as an anvil or furnace. To make crafter lives easier, materials in nearby containers will be accessible during crafting. This means you can stash all of your ingots in a treasure chest next to your anvil. Then you do not have to move them from the chest to your inventory before crafting.

Modding

Creating new items to craft is quite simple. All it requires is to add a craft component to the item. Through this you can specify the item’s category, subcategory, surface requirement (if any), list of materials and quantity required, and the quantity produced.

#Example for Copper Ingot
craft = Craft('Recipes', 'Smelting', 'anvil')
craft.add('mods/base/tile/copper_ore.ce', 3)
craft.quantity = 1

The surface requirement can be left empty to designate that the item can be crafted anywhere. If it is specified, the surface requirement does not refer to a crafting surface item but to a crafting surface service. There is a “Surface” component which enables entities to provide any number of crafting services.

Most items requiring an anvil can be crafted with any anvil; however, some special items may need an upgraded anvil. This upgraded anvil would provide the services needed for both the special items and any other items requiring an anvil. Any item can provide any surface service, so it is entirely possible to create uber surface items. It is of course possible to create entirely new crafting surface services that new items can require.

#Iron Anvil
surface = Surface(["anvil"])
#Uber Anvil
surface = Surface(["anvil", “uber anvil”])

Links

Feature – Character Customization

Overview

The character creation provides a great amount of customization. The first and most important choice the player has is choosing the type of body to use. The body type defines the majority of the aspects for the character – appearance, customizations, equipment, stats, and so on. A body type can be “human male”, “human female” or even some completely different race such as a Robot. Body customizations are a part of the rendered body that can be changed such as hair, shirt, pants, shoes, and accessories.

Aside from customizations, a body type also defines which equipment slots the character will have, the base stats for the character, and the proficiencies. Each of these will be expanded upon in their own respective feature posts. With these character aspects being associated to the body type means that entire unique characters can be created. Such as a Robot race that has its own unique pieces of equipment, customizations, stats, and proficiencies.

Modding

Every aspect of character customization is moddable: body types, customizations, equipment slots, stats, and proficiencies. I will cover all of this by going over the human male body script, which is quite lengthy. Some explanation is embedded in the code – Look for lines starting with ‘#’.

name = "Human Male"
body = Body('hm')

body.render = ModularRender('mods/base/body/hm/human.scml')

#Character's are rendered with a ModularRender.
#This means that the character is broken up into small sprites
#such as head, arms, hands, torso, legs, clothing, hair and so on.
#Each of these sprites can be replaced with another sprite.
#These mappings below associate a name with a sprite or group of sprites.
#This makes it possible to do things like recolor all body sprites or hide them.

body.render.addMapping('body', 'arm/arm_lower_0.png')
body.render.addMapping('body', 'arm/arm_upper_0.png')
body.render.addMapping('body', 'arm/hand_0.png')
body.render.addMapping('body', 'leg/leg_lower_0.png')
body.render.addMapping('body', 'leg/leg_upper_0.png')
body.render.addMapping('body', 'leg/foot.png')
body.render.addMapping('body', 'head/head.png')

#Lots more mapping removed for brevity...

#Sets the animation render ordering.
body.render.setOrder(['arm_back', '', 'arm_front'])

#Set up the body animations
body.animation = Animation("idle")
body.animation.bind('arm_back', 'run_arm_back', 'run')
body.animation.bind('arm_back', 'walk_arm_back', 'walk')
body.animation.bind('arm_back', 'idle_arm_back', 'idle')
body.animation.bind('arm_back', 'jump_arm_back', 'jump')
body.animation.bind('arm_back', 'fall_arm_back', 'fall')
body.animation.bind('arm_back', 'use_arm_back', 'use')
body.animation.bind('arm_front', 'run_arm_front', 'run')
body.animation.bind('arm_front', 'walk_arm_front', 'walk')
body.animation.bind('arm_front', 'idle_arm_front', 'idle')
body.animation.bind('arm_front', 'jump_arm_front', 'jump')
body.animation.bind('arm_front', 'fall_arm_front', 'fall')
body.animation.bind('arm_front', 'use_arm_front', 'use')
body.animation.setLooping('idle_arm_front', False)
body.animation.setLooping('jump_arm_front', False)
body.animation.setLooping('fall_arm_front', False)
body.animation.setLooping('use_arm_front', False)
body.animation.setLooping('use', False)
body.animation.setLooping("death", False)

#Here we add the customizations this body supports
#These show up in the Character Creation UI when this body is selected
hair = Customization('Hair', True)
hair.isOptional = True
body.addCustom(hair)

accessory1 = Customization('Accessory 1', True)
accessory1.isOptional = True
body.addCustom(accessory1)

accessory2 = Customization('Accessory 2', True)
accessory2.isOptional = True
body.addCustom(accessory2)

body.addCustom(Customization('Shirt', True))
body.addCustom(Customization('Pants', True))
body.addCustom(Customization('Shoes', True))

#Import this file and make substitions to body
#body.addSub('torso/torso.png', 'mods/base/body/hf/torso/torso.png')

body.hide('customizations/gloves.png')
body.hide('customizations/helmet.png')

#Define which gear slots this body supports
#These show up in the character equipment UI in game
body.gear = Gear()
body.gear.slots.append(GearSlot("head", "mods/base/body/hm/gear/head.png"))
body.gear.slots.append(GearSlot("chest", "mods/base/body/hm/gear/chest.png"))
body.gear.slots.append(GearSlot("hand", "mods/base/body/hm/gear/hand.png"))
body.gear.slots.append(GearSlot("leg", "mods/base/body/hm/gear/leg.png"))
body.gear.slots.append(GearSlot("feet", "mods/base/body/hm/gear/feet.png"))

#Define which stats characters with this body get
body.stats = Stats()
body.stats.stats.append(Stat('HP', 'HP', 300, 9999, True, True))
body.stats.stats.append(Stat('AP', 'AP', 100, 9999, True, True))
body.stats.stats.append(Stat('ATK', 'Attack', 100, 999, False, True))
body.stats.stats.append(Stat('DEF', 'Defense', 100, 999, False, True))
body.stats.stats.append(Stat('MATK', 'M Attack', 100, 999, False, True))
body.stats.stats.append(Stat('MDEF', 'M Defense', 100, 999, False, True))
body.stats.stats.append(Stat('AGI', 'Agility', 100, 999, False, True))
body.stats.stats.append(Stat('DEX', 'Dexterity', 100, 999, False, True))

#Define which proficiencies characters with this body get
execfile('mods/base/proficiency/craft/craft.py')
execfile('mods/base/proficiency/explore/explore.py')
execfile('mods/base/proficiency/fight/fight.py')
execfile('mods/base/proficiency/gather/gather.py')
body.proficiencies = Proficiencies()
body.proficiencies.proficiencies.append(craftProficiency)
body.proficiencies.proficiencies.append(exploreProficiency)
body.proficiencies.proficiencies.append(fightProficiency)
body.proficiencies.proficiencies.append(gatherProficiency)

add(body)

We are using Spriter for our character animations. Consequently, in order to create new animations or an entirely new body type then you must use Spriter. You can easily setup new sprite mappings, mentioned above at the top of the code.

A body script, such as the one above, defines the supported customizations; however, the actual customizations are defined elsewhere in their own scripts. Creating new customizations is reasonably straightforward. A customization is a very simple entity. It contains a “Custom” component which takes two parameters. The first is the name of the customization this is for and the second is if it supports recoloring or not. After that a Custom component can define any number of sprite substitutions that take place if this customization is used. Here we change what the top hair looks like and hide the bottom hair since it is unused.

name = "Guy Hair"
custom = Custom("Hair", True)
custom.addSub('head/hair_top.png', 'mods/base/custom/hair/hm_hair.png')
custom.hide('head/hair_bottom.png')
add(custom)

As you can see, creating new hair styles, clothing and any other customizations is very easy!

Links

Feature – Component-based Engine

This feature is fundamental to the game design and consequently all of the features. That is why it is being covered first. The next feature I plan to cover will be much more interesting – promise!

Overview

The engine that powers Crea is known as a Component-based engine. For anyone interested in modding Crea, this is a crucial aspect of the game to understand. Everything in Crea is made up of entities, and an entity is a container for holding multiple components. A component is common logic encapsulated.

Lets say we want to represent a table in Crea. We would start with a blank entity, then add a render component and direct it to use the table sprite. Having a render component enables the entity to be rendered – in other words, now the table will show up in the game. Next we add an item component which enables the table to be carried in a character’s inventory. Finally we want to add a craft component, which enables the table to be crafted.

Modding

As you can see, an entity is the sum of its contained components. It’s a pretty simple process of using components like building blocks to create something new.
A component-based engine is by nature very modular. There are currently 30 different components and growing. Here are some component examples.
  • Render – Used for rendering the entity
  • Animation – Enables the entity to be animated (requires render component)
  • Item – Treats the entity as an item making it possible to add to inventories
  • Craft – Makes it possible to craft the entity (requires item component)
  • Interactive – There are several ways to interact with an entity. Right click on it to “interact” or “use” it from your toolbar are just two examples.
  • Placement – Enables an item to be placed into the world from inventory (requires item component)
  • Monster – Treats the entity as a monster.

Sometimes, as a modder, you’ll find yourself in need of a component that does not exist – at least not yet! It is entirely possible to create a new type of component. Components have a simple interface and are created in a python script just like the rest of the content.

Links

 

Crea Features

Recently I realized we do not have a comprehensive feature list for Crea. I decided this needs to change. Having a bullet point list of all of the features in Crea would be helpful to get a quick overview of the game but that would lack the depth that I want. So in addition to just a feature list, I am going to extensively cover every feature in Crea.

For each feature I plan to write a blog post, giving a detailed overview and elaborating on all modding aspects of the feature. I am going to publish these new feature posts on this blog every 2-3 days. With each new feature post, I will also create a discussion thread in the forums.

In the meantime here is the feature list I put together. Note that it may be missing a few things and continue to be updated over time. Here is the Official Crea Features forum thread.

Implemented Features – These features have already been implemented for the most part; however, they all will undoubtedly be modified and improved upon before release.

  • Character Customization
  • Crafting
  • Dynamic Music
  • Equipment
  • Interactive World
  • Inventory Management and Toolbar
  • Lighting
  • Monsters
  • Multiplayer
  • Organic Plants
  • Proficiencies and Skills
  • Water
  • World Generation

Planned Features – These features have been planned but not implemented yet. They likely need some more designing done as well.

  • Bosses
  • Day and Night Cycle
  • Mounts
  • NPCs
  • Quests
  • PvP (Player vs Player)
  • Weather
  • Second Playable Race

Desired Features – These are some features that we would love to see after release.

  • Build mode
  • Casino Biome
  • Pets

3 Free Programs for Game Artists

The majority of Crea graphics are made in Adobe Photoshop CS5, but I’ve also been collecting little specialty programs to help with specific tasks. These programs are all available for free! Sometimes the internet is a wonderful place, right? Let me introduce you to them:

1. Spriter

Spriter is an animation tool designed for 2D video games. We’ve been using this to create the character animations for Crea. Spriter makes it possible to easily swap out images in an animation, such as changing the hair style of characters, or the clothing color, or even their entire equipment set. Thanks to Spriter, all of the assets and animations only have to be made once – not dozens of frames for every single piece of armor. We plan to use Spriter for our characters, bosses and other animation-intensive creatures.

Earlier this year, the team behind Spriter ran a Kickstarter campaign to fund their project. Right now Spriter is still in an alpha state – which means that there are lots of bugs and not everything works smoothly. Additionally, it’s not really designed for teeny-tiny pixel art, and sometimes I feel like I have to wrestle with it a bit. Still, it’s been helpful to us and we eagerly look forward to each new update the Spriter team pushes out.

2. Pyxel Edit.

Pyxel Edit is a clean little program that makes it easy to create seamlessly patterned tiles and tile variations. The instructions are a little vague, but once you get the hang of it, it’s really pretty simple. We’re mainly using this for ground tiles. Pyxel Edit seems to have a little bit of trouble working with my Wacom tablet, but other than that it’s pretty much a godsend.

3. Sprite Sheet Packer. 

Sprite Sheet Packer has one purpose, and it does it well: it takes all the individual frames for a sprite, arranges them into a tidy little sprite sheet, and creates an accompanying text file that “maps the image file names with their rectangles, for use in your program to find the regions of the image you are interested in,” as they put it. We only just started using this program, but it’s definitely been a time-saver for us.

So there you have it – a little peek into the tools that we use to create the visuals for Crea. I hope these programs come in handy for your future modding needs.

World Looping

The last week I have been working on several different features: optimized world loading, horizontal world looping, and a secret feature I’m working on that I will announce in detail before too long. Aside from that I’ve been doing some other things such as getting the forums up and running!

The world loading optimizations I made are really going to make a huge difference with the game’s performance. Before the entire world would be loaded and stay loaded. Every single entity would be updated every frame. This all could be quite taxing on both the cpu and memory. Now the world is broken up into regions and a region is only loaded if it is needed. If a region is unused for awhile then it is unloaded. For a large world only 1/8 of it will typically be loaded at one time. That’s a huge difference!

While I was breaking up the world into regions I decided it was a good time to finally implement world looping. This means that if a player runs in the same direction then he will eventually loop back around to the same place he started. Another way to think of it is take a piece of paper and curl it up so that two opposite ends are touching. This is what the world looks like now. This world looping was actually quite a bit of work. I faced two major challenges with it.

The first one was getting the rending to work. If standing next to the world seam (where the two ends meet), then I needed to have the entities, tiles and whatever else render from two sides of the world.

The other challenge, the more difficult one, was that all of the systems relied on the assumption that the world started at (0,0) and ended at the world’s end. If something went past either of these points, across the seam, then it would be ignored. For example light would suddenly stop at the seam and cause some odd lighting as shown below. The light needed to jump across the world seam and affect the other end of the world. I had to worry about this for all of the other systems as well such as the automata (water) and physics. There are still a few issues with it that I need to cleanup but I’d say it is 90% of the way there.

Expect updates from me to come a little more frequently starting now.

Notice the line in the middle of the blocks. That’s the world seam and shouldn’t be visible…

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!

Crea’s Vision Part 2 – Gameplay

Yesterday I relayed our vision for Crea and the community. If you have not read this yet, then I recommend you do! Today I will divulge our vision for Crea’s gameplay. We may not be able to include all of these features in the initial release, but they will be added later in the form of free updates.

Our primary focus with gameplay is to give players a true sandbox; one that enables them to play how they want. I believe there are two playstyle extremes, creative oriented and action oriented. Most players will fall somewhere in the middle of the two, but Crea will support the full gamut of personal gameplay styles.

For those that enjoy crafting, building, and tinkering with things, monster spawning has been designed in such a way that they won’t be obnoxiously attacking you while you’re doing your thang. You will be able to adjust the frequency that monsters spawn. For players who are solely interested in creating worlds, we are also planning a build mode that will make this much easier.

The action oriented players will be pleased to find that we are planning an involved combat system where skills and timing matter. Monster spawning will be an entire system involving fighting back monsters as they attempt to expand their territory. Crea will also feature several bosses that will test both your strength and skills.

There will be lots of content that fills the gap between these two extremes. We have several large biomes planned and are dreaming up other “biome” type areas such as battle arenas or casinos. There will be hundreds of items with many being interactive, automatons (self-operating machines), or generators (items that create other items). These will make it possible to set up intricate systems for collecting resources or traps to kill enemies. I am a huge sucker for these!

In the past we have mentioned several systems such as crafting, leveling and quests. As we say in our video, we love sandbox games for being so open-ended, but we also love RPGs. Crea will have HP, leveling, NPCs with quests, bosses and other goals to strive for. You will always have something to do in Crea.

Modding, which truly touches every single aspect of Crea, acts as a multiplier to the gameplay. Everything can be enhanced or expanded upon through mods. This is easily the thing I am most excited about; seeing what the community comes up with.

Ah! Wall of text! There’s so much to Crea’s gameplay that it’s impossible to explain it all in one post. Much more in depth blog posts are on the horizon! If there’s any particular aspect of Crea that you’d like to know more about, then be sure to leave a comment. Tomorrow, in my final part of Crea’s vision, I will share with you what we have in mind for the worlds in Crea.

Crea’s Vision Part 1 – Community

Since the launch of our Kickstarter campaign we have been asked about the different aspects of Crea many times. We have been accused of being a “Terraria Clone” even more often than that. When I (Jasson) started Crea, I made it one of my development goals to be open with the community. Keeping true to that, I want to share with you our vision for Crea. I have decided to split it up over three parts to keep the wall of text to a minimum.

First and foremost, we are about the community. We don’t want to be isolated in some ivory tower of development. Instead, we want to be actively engaged with the community on as many levels as possible, updating the game according to feedback from players. I plan to continue to provide development updates on the blog at least once per week. To add to that, we will soon be launching forums, a wiki after that, and we are always listening to the community for other suggestions.

I want to ensure that Crea is fully accessible to everyone. That is why we are pushing hard to release on Windows, Mac and Linux platforms. We have already implemented localization support, which makes it easy for anyone to create a translation of Crea. As we get closer to release it would be great to work with the community to create some official translations.

After Crea is released, we’ll be working hard to fix any bugs players stumble upon. After that, we’d like to give players a chance to vote on what new features they’d like us to develop. I also want to assist modders who are creating interesting and original mods for Crea. We’ll be regularly participating in the forums to answer questions and provide assistance to players.

But before we can have a community, we first need a solid game. Tomorrow, in part 2, I will cover our vision for the gameplay in Crea. Thanks for reading and feel free to ask any questions.

Character Progression

Want some details on the “RPG elements” that will be included in Crea? You got it!

One of our major focuses for Crea is adding in character progression and a sense of personal attachment to characters. There are several aspects to character progression – this post is about character leveling.

Characters will have a set of the usual stats: HP, AP (Action Points), Attack, Defense, Magic Attack, Magic Defense, Agility and Dexterity.

Additionally, characters have “proficiencies.” These are skill levels in four different areas: fighting, crafting, exploring, and gathering. Each proficiency has its own experience level and experience points. So, craft items to gain proficiency in crafting. Pick mushrooms and other plants to gain proficiency in gathering, and so on.

As a proficiency levels up the character will unlock new skills. Once a skill is unlocked the character is able to allocate experience from that proficiency to their new skill. Some skills are passive, and always in effect. Subsequent levels in a skill will raise its efficacy.

As usual, all of this is going to be easily moddable. Want to add a “cooking” proficiency? New “Triple Jump” skill for the exploration proficiency? Not a problem! Are there any proficiencies you’d like to see us add to Crea?

Be sure to subscribe to the blog to get the latest updates and details on Crea!