Tag 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

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!

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.

Quick Update – Creating Characters

This last week I’ve been busy laying the foundation to be able to creating characters. This primarily consists of getting the character’s to be able to dynamically render and animate with customizations (hair, base clothing, etc.) as well as with equipment. We have been contemplating and discussing how we would go about doing this since the beginning and then I found Spriter.

Spriter is a software tool used to create 2D modular animations. This means breaking apart the character into tiny pieces and moving them individually instead of having a static frame. This enables us to create animations with lots of frames and only create the graphics once – making content creation as simple as possible. I will save the remaining details for next week.

Aside from the animations I have begun constructing the UI for actually creating characters. Things are going well and I do not see any reason it wont be finished by next week’s update.

Speaking of UI, my good friend David has officially joined the team. He has been helping out since the beginning and was definitely Crea’s #1 fan. He is a professional web designer/developer and consequently will be focusing on the UI. I’m sure it wont be too long before I am showing off his work here.

Stay tuned!