Author Archives: jmcmorris

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

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…

Good Momentum

Typically I post updates much more often than I have recently. I’m not much of a writer to begin with and I wrote so much during the kickstarter that I think I burned myself out on it. I have also been really wanting to make some real progress on development – get some good momentum going.

I have been working nonstop since the kickstarter ended 10 days ago. I am almost done with the lighting system (the initial pass at least). Both equipment and proficiencies (leveling) are fully implemented. Now we just have to make the content!

So what is lighting looking like so far?

Sunlight with a lightsource (torch)

I’m currently finishing up the lighting. Optimizing it some and adding in colored lights. Right now I don’t have dynamic lights casting shadows. I really want shadows but they are not essential and right now I need to just focus on the core essentials.

Equipment is looking great. I want to do a future write-up all about equipment, but for now I will say that you can do nearly anything with it. This means not only will we be able to make awesome and unique equipment, but through the easy modding setup, so will everyone else! Here’s some visuals:

Programmer UI with no gear equipped

Programmer UI with chest plate equipped

Equipment dialog mockup

Right now there are no visuals to show for the proficiencies, because at this point its all logic. I will be posting the write-up on equipment soon. Be sure to subscribe to the blog to get updates when they happen.

Lately I have been doing impromptu coding livestreams. If you follow the Siege Games twitchtv account, you’ll be notified with an email whenever I start up a livestream.

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.

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.