tirsdag den 15. januar 2013

Natural Look and Particles!

It's been a while since my last post here, but a lot has happened.
This post will cover the changes shown in video 8 and 9. Video 10 will be covered soon.

All of the natural tiles have been given a more natural look- This includes: Dirt, grass, sand, stone, and all the ores(3 Types of ore have also been added). World items has been introduced, like Workbench, furnace and anvils. Even chests have been implemented.  On top of that I finally got around to making particle effects.. and I think some of the results are pretty nifty. Effects include particles from mined tiles, plant particles when plants are destroyed, blood splatter and snow.

What's New?

- Natural tiles have received a more natural look.
- Three new ore types have been added - Copper, Iron, Gold.
- World items have been added - Including the furnace, which is used to smelt the ore into ingots.
- More craftable items have been added to make use of the newly added materials.
- Chests have been added- It is now possible to store items and saving loading of items works too.
- Equipable Items & equipment slots
- Particle system has been implemented. Various new particles have been created.
- Weather has been implemented. Currently only snow is available.
- Some extra christmas related stuff (See video 9)

Natural Look

All natural tiles, including background tiles have received a more natural look. This complicates the way backgrounds work though. When building a wall (background tiles) the edges only cover about half the outer tile. Part of the reason for this is to make doors more realistic looking, so that when you place a door, there will be wall on one side, but not on the outside. This works very well for the "artificial" tiles, but for natural tiles this was quite a challenge, one that I still haven't decided if I have "owned". I didn't show any of this off in the video, since I'm still not sure I will keep the result. I might make a little video about it in the future to better explain the issues.

Copper, Iron, Gold

With the first three ore types added to the game, a new level of depth has been added to the game.  Part of the goal in the game is to gather resources, and use them to craft various objects. There will be a difference in the rarity of the ores. Gold will be much more rare than both copper and iron, but copper will be more common than iron. A lot games handle resources in tiers. So that copper in this case would be Tier 1, iron Tier 2 and Gold Tier 3, increasing in effectivity. What I wish to do is to follow this direction some of the way, but I would like to keep every material you find usable, no matter how advanced you are. Thus recipes for items created with gold will still require some components based in copper and iron. This way copper or iron won't have to be "yet another ore deposit" you come across when you explore, but instead provoke a small feeling of success.

World Items

"World Items" have been added to the game. Currently this include a Workbench, furnace, and the anvil. These three items are all involved in crafting. You need the furnace to melt your ore into ingots, and the anvil to craft them into weapons. The workbench are used to create various items, including the furnace. In the future world items will also include things like chairs, tables, beds, candles, and other furniture. Currently a word item occupies four tiles, 2X2. The orientation of a world item tile is fixed, su 2X2 tiles will include "UpperLeft, UpperRight, LowerRight and LowerLeft. When I draw the tiles I simply only draw it if it has the UpperLeft orientation. That way I stay true to the tile grid, while at the same time avoid drawing the same thing four times.


The chests works mostly like the World items, the only difference is that a chest has an inventory. A chest (or a containerTile) also occupies 2X2 tiles, and are drawn in the same way as the world items. Each containerTile can potentially hold one baseItem array (The inventory), but only ContainerTiles with the UpperLeft orientation will actually have one. This means if you right click the chest to access its inventory, the tile you actually click, will point towards the UpperLeft tile and then access the inventory there.
GUI elements has been added for the chests as well, so they are fully implemented in the game.

Equipable items

I've finally gotten around to making the equipment slots, and thus added a few equipable items. Currently there's the Copper armor (Looks more like a leather armor, so that might change), and a few other things you can see in video 9. Currently there's only armor, but it is represented visually on your character.
Things like jewelry and trinkets, will not have a visual effect on the player, except in some rare cases. Currently the armors does give some protection, but I won't go into detail with the mathematics behind that, since currently they are more or less untested, and rather simple.


Particles.... Finally. Something as small, and fairly simple as particles can really add some feel to the game, and I think my first attempts are pretty decent. Currently there's blood when hitting mobs with weapons, plant particles, when you destroy plants, mining particles, movement dust and snow particles. Overall I am very happy with the results, and I am surprised of how simple they actually were to make. - At a later time I might tell a bit about how I am making and handling particles.


Snow! What better type of weather to start out with in the holly days. Having the particle system in place it was a small matter to create snow, but after that I felt something was missing. I wanted the snow to have an effect on the world, thus I create the snow tile. Everytime a snowflake collides with a tile, there's a 1/100 chance that it will place a snow tile on top of that tile. There was one issue with this though- Since I've just made all tiles look more natural, there would, in some cases, be small pockets of air under the snow, due to the fact that the tile under the snowtile wasn't filling out the entire square. I fixed this by drawing the snow tile, a few pixels lower than its actual position- So basically The snow is pushed a few pixels down, to give the illusion that the snow has filled the small gabs in the tile below. Snow can then be harvested with a shovel, which gives you one snowball pr snow tile. As of video 9, snowballs aren't yet usable (They are in video 10, but I'll get to that in the next post).

I've also added a few extra christmas goodies, as you will see in the video. All of the christmas stuff (including snow) was something my daughter inspired me to do, since she asked me to make something related to christmas. So everything christmas related had to be approved by her, before I added it to the game.

Again I apologize for the long delay, and I will be posting my next two blog entries within the week. The first one, related to my 10th video, which is already out. The other post will be more about how I do things. The intention with this blod initially was to show the process, and I think I haven't quite lived up to that.

Anyways - Below are the videos - Please enjoy them and share them if you like:
Phantobra - The Game - Part 8: More Tiles, Less Tiley

Phantobra - The Game - Part 9: Here's The Season To Be Jolly

Thanks for reading / watching - See you soon!

Ingen kommentarer:

Send en kommentar