Development

A new particle system

Posted in Development on October 10th, 2013 by Zapper – 2 Comments

Over the last few weeks, I wrote a new particle system for OpenClonk. The main difference for the player is that it should be a lot faster *).
Developers now have a new, finer way of defining the behavior of particles which makes more aesthetical effects possible than what the old particle system could provide. I am excited about what interesting effects the scripters will think of.

image of particle effect

my test particles

The next part of the article is probably only interesting for scripters, since it explains some of the technical details 🙂

Most information from the old Particle.txt is not needed anymore. What remains is the Name and Facet (to define the particle graphics). The other properties of the particles’ behavior are defined directly in script using a proplist. Here is an example of such a proplist:

var particles =
{
 Size = PV_KeyFrames(0, 0, 0, 100, 1, 750, 1, 1000, 6),
 Alpha = PV_KeyFrames(0, 0, 255, 750, 255, 1000, 0),
 DampingX = 700, DampingY = 700,
 ForceY = PV_KeyFrames(0, 0, 0, 750, 0, 900, -10 * GetGravity()),
 R = 255,
 G = 255,
 B = PV_Linear(255, 0),
 Rotation = PV_Direction(),
 BlitMode = GFX_BLIT_Additive,
 Phase = PV_Step(1, 0, 2),
 Stretch = PV_Speed(2 * 1000, 1000),
 CollisionVertex = 750,
 OnCollision = PC_Bounce()
};
for (var i = 0; i < 500; ++i)
{
 var angle = Random(360);
 var speed = RandomX(5, 40);
 CreateParticleEx("Fire", 0, 0, Sin(angle, speed), -Cos(angle, speed), RandomX(5, 1 * 36), particles, nil);
}

As you might see in the example above, you can animate a lot of the particles’ properties now. For example the size, the color or even the new physics properties like damping or a constant force that is applied to your particles to simulate wind or gravity.
For more information you can have a look at the particle documentation or at the reference for CreateParticleEx.

The old particle system is currently still in place, but you are encouraged to use the new one.

picture of explosions

some of Matthi’s experimental explosions

*) The new particle system renders all of the particles of the same type with a single draw call to the GPU, which should speed up the drawing a lot. Additionally the particle physics are simulated in a thread parallel to the normal game logic (moving objects etc.), which might also yield a few extra FPS.

 

Eyjafjallaj

Posted in Development on February 18th, 2013 by Sven2 – 1 Comment

Life was way too simple in the world of OpenClonk, especially for those interested in peaceful cooperative play. So I’ve made a couple of volcano-themed scenarios available in the experimental branch.

Screenshot of Volcano Escape scenario

We got ourselves into a sticky situation.

The first scenario is Volcano Escape, a cooperative parkour scenario in which you have to get out of the bottom of a volcano. But unlike other race scenarios, you better work together in this one. The lava in this volcano is much hotter and submerging in it means instant death for your Clonk. Since you cannot hope for much help from outside in this dangerous area, there are no relaunches. Also be careful when digging into ashes, as they are unstable and crumble, away, potentially opening a path for lava flow onto your Clonks. Situations can become tricky and you might need to do some well-planned detonations to reroute lava lakes to reach the checkpoints. The scenario has a dynamic map for re-playability and can also be soloed quite nicely.

Screenshot of Hot Ice scenario

The ice is melting…

The second scenario is Hot Ice, loosely inspired by an equally named Clonk Rage map by Diddy. It’s a simple, fast-paced melee on some icy shards on top of an active volcano. Naturally, the ice won’t last very long and you better get rid of your enemies quickly. You can use the newly improved club to throw chunks of ice and firestones at your enemy, or you can wait for some of the chests placed on floating islands on top of you to fall down and pick up contained weapons. The game mode is Last Man Standing without relaunches, so a round can end pretty quickly.

Screenshot of Acid Gold Mine scenario

We finally reached the gold! Seconds after this screenshot was taken, the whole cave got flooded with poisonous acid 🙁

The third and by far hardest challenge is called Acid Gold Mine. It’s a cooperative gold mine scenario in desolate lands where deadly acid rains from the sky. All you have to do to win is to mine a small amount of gold. However, the valuable mineral is buried deep in a volcano which is haunted by spontaneous eruptions and earthquakes. Especially the earthquakes, coupled with the big lakes of acid accumulating on top of you and some odd meteorites dropping here and there, can lead to unwanted, fatal leaks of acid into the mine. To help you secure tunnels and close gaps, very durable metal bridges can be built from special wall construction kits. It’s highly recommended that you approach this scenario cooperatively, because the task is definitely not easy.

As usual with scenarios that aren’t approved for the main pack yet, you can play them in the development version only. To test them, just download the latest nightly build zip file from the development snapshot download page, unpack the contents to a new folder, run openclonk(.exe) and select your scenario of choice from the Experimental folder. Remember that all players in network need the same nightly build version to play together.

Kill the king!

Posted in Development on January 20th, 2013 by Sven2 – 2 Comments
Village

Survivors of the local population beg for help.

Oh no! King Horax, the evil tyrant, has raided a nearby village again. This madness must stop!

In this upcoming mission, one or more sturdy adventurers will build up a small stack of weapons, storm the monarch’s castle and liberate the people from the evil king. However, the castle is not easy to reach, as it is protected by sturdy rocks and hot lava lakes. And even once you got there, the sovereign has quite a few loyal servants who won’t give up their home easily.

Fighting on the rooftop

Horax’s servants fighting against two invaders.

This experimental mission features a rudimentary AI to oppose the player Clonks. The AI works similar to that of Dragon Rock, which veterans might know from CR. You can try out the current version from a nightly build or by checking out the current state of our repository. The scenario is called “Dark Castle” and is found in the experimental folder. There is still a lot of work to be done on the AI, castle furniture, intro, outro and general balancing. But for the adventurous, the scenario should already be quite playable.

Mushroom cave

The magical mushroom cave.

Zapper’s new mushrooms will also make their first appearance in this mission. They have been reinforced with a deadly poison should you dare to come near unprepared. But they are guarding a chest full of weapons that might prove useful in the battle against Horax.

Skylands

Posted in Development on December 2nd, 2012 by Sven2 – 2 Comments
Scaffold construction in Skylands

Scaffold construction in Skylands

Sky island scenarios have always been among my favorites in the classic Clonk series because of both the freedom and the challenge they offer to the players. Now that basic settlement got a bit boring, it’s time for OpenClonk to get its first cooperative aerial scenario. In this scenario, you need to collect five parts of an airplane spread out among several of the distant sky islands and bring them back to the construction site.

That will be a tough challenge though, as a new feature has been added for this map. It’s storming and the storm is certainly strong enough to blow poor Clonks off the islands if they aren’t careful!

Wind is simulated to flow around obstacles, so it can be blocked with wooden constructions (see screenshots). But be careful not to block the windmill, or your buildings will be out of power. Also, the more you block the wind off, the stronger it will blow above and below your obstacle.

Those who are daring to try out the alpha version can checkout the current development branch and find Skylands in the experimental scenario folder.

OpenClonk Release Meeting over

Posted in Development on October 16th, 2012 by Newton – 3 Comments
Taskboard

All important tasks finished!

So the OpenClonk release weekend is over now and I would like to thank everybody who participated for coming to Hamburg. I think it has been quite successful and I hope it was as fun for you all as it was for me! I am looking forward to doing these kind of weekends more often. But next time, with more preparation time.

With over 150 commits on and in preparation to the weekend, we made about as much progress this weekend than the last half a year! And, most importantly, we finally released all the work that has been put into the game since 20 months ago.

 

release button

We actually used this button to release the game. Sven2 had the honor after winning a round of an OpenClonk version of “One tree”

We were altogether eight people: Clonk-Karl, Clonkonaut, Maikel, Matthias Mortimer, Newton, Sven2 and Zapper.

All of us were super productive and also finally got around to do those works which normally nobody is motivated to do alone.
I want to particularly thank Sven2 & Mortimer who spent almost a day on finding desyncs between mac/linux & windows network games and Clonk-Karl who fired a broadside at old long-standing bugs from the bugtracker.

An overview of the immense count of tasks we finished on the weekend is linked in the forum:

OC release weekend: List of finished and unfinished tasks.

 

 

 

Krakatoa

Posted in Development on August 12th, 2012 by Maikel – 5 Comments

Recently some new structures were added to the settlement content of OpenClonk. Together with the fact that there are no challenging scenarios with dynamic landscapes yet and that a settlement design contest was organized, I decided to create a scenario for this void. Krakatoa is a large and active volcano on which players have to construct and expand their settlement, the goal is to expand the settlement across the whole volcano. Moreover the player has to drain the volcano or find another way to its core, where gold can be found and should be mined.

A typical settlement consists of the usual production buildings for producing the necessary tools and mining explosives. Pumps are needed to drain the ever rising lava inside the volcano. These need a large and continuous power supply, provided by numerous wind mills combined with a steam engine. Opposed to Clonk Rage where the combination of wind mills and the power plant only led to frustration and the loss of all you fuel, in OpenClonk both work very well together and will get you though the annoying calms.

The scenario has been reviewed by our friends from clonkspot in their Let’s Play series, for which many thanks. The scenario can be played after downloading a recent development snapshot.

Carry Heavy and Construction Sites

Posted in Development on May 3rd, 2012 by boni – 4 Comments

In the Controls rework, we also revisited the Carry Heavy system to fit in better. Additionally we changed how constructing building works. It’s awesome now. I mean, *awesome*.

 

CarryHeavy
The biggest change here is that Carry Heavy Objects don’t require inventory space anymore. You can always pick up a Carry Heavy Object (if you’re not already carryingone), and it’ll be displayed in an extra-slot next to your inventory. On the downside, you can’t use your inventory items while carrying a Carry Heavy Object. You can pick up and drop stuff, but you can’t select them into your hands, as they’re full. Carry Heavy Object can now be dropped via the ActionBar now, and also support the Contents-Menu. This means that they can be put into and taken out of containers.

 

Construction Sites
A construction site, and the placement of one
Constructing buildings has changed quite a bit. We made it more comfortable and easier, and you’ll never have to stand in front of a construction site and wait till it’s done again!

After selecting a building in the construction menu, you can now place them with the mouse in the vicinity of your Clonk. You can move around while doing so, in case the wanted position is just a bit too far away. Some buildings, like the elevator, can also be flipped during placement. Freedom!

The construction site itself now is displayed as a fancy wireframe-model. At placement, it looks for building material in the clonk, nearby containers and on the ground. To put construction material into site, just use the Contents-Menu or interact with the site. It’s also possible to remove construction sites. Building material will be refunded in that case.

When you’ve put all required materials into the site, the construction starts building itself. No standing there, holding down a mouse button! That’s it!

Shiny new Controls/UI

Posted in Development on March 21st, 2012 by boni – 10 Comments

OpenClonk now has updated Controls and a new UI! The aim of these changes is to provide comfortable and easy access to everything, while maintaining speed. For that reason nearly every action has multiple controls now. But I’m getting ahead of myself, take a look for yourself!

Behold, the new UI:

The new UI with the contents menu

UI & Contents Menu

The New

As you’ll probably have noticed, most of the UI is gone. So is the Backpack! It got replaced by a general inventory, displayed at the left side. With a unified inventory, the separation of hands and items in the backpack also is gone. You simply select which inventory-slot should be in your left/right hand.

The content-menu now also features fellow Crewmembers. That means you can trade items with your own clonks directly!

The health- and breath-tube have been removed completely. So have the two hand-fields.

The Old

The actionbar at the bottom, used for interacting with structures and vehicles, stays the same. However it has a fixed order now, as opposed to sorting the selected object to the beginning.
The crew-selector also stayed the same, and doubles as the only health and breath-information now. Some fancy features are planned though.

The Keys

About everything is doable by clicking on stuff, but as mentioned above, quite a few new keys have been added for the Pros.

  • The Hotkeys 1-9 select the corresponding slot into the left hand now. Holding a hotkey + Mouseclick also selects the slot into the corresponding hand.
  • Shift is the Inventory-key now. Shift + Mouseclick throws the corresponding hand-item, Shift + Number drops the corresponding slot.
  • Ctrl is the Crew-key. Ctrl + Number quickly selects the corresponding crew member.
  • Space is the Interaction-key. Space + Number interacts with the corresponding Actionbar-Item. Releasing Space without pressing a number interacts with the first one.
  • Also, so far the Q-Key doesn’t have a function now. But I’m sure we’ll find something for that. 😉

The Plan

Quite a few more features are planned. Many things will be implemented as experimental solutions. We will see how many survive. 🙂

A Toolbar to the right, for using Tools in your inventory directly. (Construction menu, chopping trees, etc.)
Indicator for usable stuff.
A Keyboard-Layout for left-handed players.
A way to select the right-hand item comfortably.
…and many more

A complete overview over the current iteration can be found here: https://wiki.openclonk.org/w/Controls

Crash landing!

Posted in Development on March 10th, 2012 by Sven2 – 11 Comments
Crash landing! - Intro sequence

You escape on emergency boompacks, just as the plane is crashing into the mountains.

After some of the basic settlement concepts have been ironed out, we noticed just playing Gold Mine all day got a bit boring. So we decided to create our first real, challenging settlement scenario. It’s called Crash Landing, and it features some adventure-ish elements and an intro!

Our heroes are taking an airplane flight over the local volcanoes, when suddenly things get ugly and the plane starts tumbling towards the volcano. Fortunately, all Clonks are able to escape safely using emergency Boompacks that every plane in Clonk has to carry.

Now the Clonks sit on one side of the volcano. The plane is on the other. How will they get it back? A tough challenge awaits them, as the local population is not too eager to give away their secrets…

Unfortunately, there aren’t too many interesting elements to build yet, so we had to improvise a bit and make do with unfinished objects. Still we already have the foundry and tools workshop production chains, water barrels, loam, some vehicles, loam and earth constructions as well as an unfinished pump. This should be enough to create a little challenge 🙂

Crash landing! - Village

The local village population offers us a deal we cannot refuse.

Crash landing! - Cliff

From the cliff, you can almost see the airplane. Now how do you get there?

Do you have the power?

Posted in Development on February 19th, 2012 by Zapper – 7 Comments

Electricity in Clonk has always meant taking a power producer, for example a windmill, and linking it to a power consumer with a power line.
While that sometimes led to interesting-looking bases that had the appearance of spiderwebs, those electric lines were not much more than a ressource. The player had to place them in a certain way – usually without a lot of playing room.

In OpenClonk we now have the definition of a base: the area covered by your flags.
The approach for the power is now to throw lines out and have consumers/producers in the same base automatically be linked. Producers increase the power balance of your base and consumers reduce it. Power balance above zero is good, power balance below zero not so much and means one consumer has to be turned off.
Sounds pretty straightforward, huh?

The advantage is now that we can use the concept of “weird lines running through your base” for something more interesting than power lines and something the player hopefully has some fun constructing – (because, hey, weird lines running through the landscape are actually pretty cool).

 

Two wind generators and a workshop

Two wind generators and a workshop