Pathfinding

In the last couple of days I have made good progress with pathfinding. It still has some rough edges, but it’s almost good enough for the first release.

As usual, when there’s something new and cool, there’s a (lengthy) video: http://youtu.be/ZaO8gDLwZeM

A full pathfind, in a complex environment on a slow phone, may take as much as 150ms. This of course happens on a separate thread, but if your phone is single-core, this thread will share the CPU with all the others. That means the game would slow down a bit for short periods while the animals are pathfinding.

To combat this, I made the AI to use pathfinding as little as possible. With this on, I hope the slowdowns will not be noticeable. If they are, there’s always room for optimizations and tweaking. We’ll see.

Need To Sleep

The next survival mechanic is need to sleep. As stamina, it will only exist in Challenging, Cruel and Adventure. What it boils down to is that you can function for about 2 game days without sleep. After that, you will lose consciousness and collapse, wherever you are. Most likely, the animals will then make a hash of you :-)

Here’s a little video (condensed from 2 game days) to show you how it looks in the game:

http://youtu.be/xRMqcL0aavo

No, the yellow lines and dots in the earlier post was not Pac-Man mode :-) As many of you noticed, it’s pathfinding. There are a few issues with it, though.

First of all, it’s quite costly (i.e. needs a lot of CPU), so the animals try to avoid it unless absolutely necessary.

Second, at the moment it does not work very well. The pathfinding itself (the yellow line on the screenshot was the path found by the algorithm) works perfectly. What doesn’t work so well is the animals navigating the real world along the path. The world in Survivalcraft is quite complex and 3D. Things like doors, narrow or low passages, sticking out corners, dangers (magma, cacti etc.) make it quite difficult to  get it to work reliably. But I am trying.

I think it’s important that I get this done. I have been planning it for a long time. Without it the animals are like little insects, only seeing a block or two around them.  With pathfinding they will be able to penetrate into your builds if you leave a hole open (or forget to close the door). They will also be able to do other things that I plan for the future.

The Other Side Of Survival

Comments and emails tell me that stamina is a hugely controversial feature.

Apparently the first issue is the panting sound, which was annoying. I have now replaced it with a better and quieter version. I also made it sound more natural by introducing more random frequency and volume fluctuations. It should not sound like a train any more. Hopefully you’ll like it better.

Second, the entire stamina system came under heavy attack. Some even claimed that it brings nothing to the game. That’s not true. At the very least it will force you to build stairs and ladders down your shafts and up your towers, and to get a horse for longer travels. It will also make it more risky to mess with fast, dangerous animals. And you will no longer be able to swim for miles :-)

Anyway, in an attempt to make everyone happier I increased the amount of running and the number of jumps you have to take to get exhausted.

Please keep in mind that the last video focused on the exhaustion. I have specially chosen situations where the player is winded and cut the other parts, to keep the video shorter and less boring. In real gameplay it’s not so easy to get panting as the video might suggest. Especially with the changes I now made.

I think the final test will come when I release it for Google Play. If there is a massive backlash, there will still be time to revise it in a quick update before submitting to Windows, Amazon and Apple.

Leaving the stamina aside, here’s a debug screenshot from the new mechanic I am working on. It will make the animals more clever (and dangerous), giving a boost to the neglected survival aspect from another direction. I’m sure you’ll guess what it is :-)

Feature

Stamina

The survival mechanics I’ve been working on for some time are roughly done, they just need some tweaking. Here’s a video showing how stamina (which is one of them) works:

http://youtu.be/nJjV5WqZw3k

This will only be active in Challenging, Cruel and Adventure modes. Harmless and (obviously) Creative stay as they are.

What do you think? Is it not too annoying?

If you haven’t read my earlier posts about survival: the reason for stamina is so that it’s not so easy to run away from the animals that chase you. It also adds more player immersion (pun intended) and makes the world more dangerous, which is badly needed.

Right now I am working on something new that will make animals a lot more dangerous and realistic than they are now. If it works out, together with stamina, hunger and sleep, 1.22 will really flesh out the survival aspect. I’ll tell you more in another post.

Thank you for all the magnet recipes. I still haven’t decided which one to use. Especially the lodestone concept is cool – never thought of that! But I don’t want to add a new mineral just for the sake of one or two items. Unless I come across an idea on how to use lodestone sensibly somewhere else, I’ll sadly have to skip it. Ideas welcome.

At the moment I think the recipe should be just that:

Magnet
But it seems too simple…

In the meantime daverave40 published 19th episode of his Let’s Play Survivalcraft series: http://www.youtube.com/watch?v=5zCrtziB0II

[EDIT]

Here’s some numbers to help you better judge the stamina system:

  • You can run about 300 blocks until you start to pant and slow down (on level ground)
  • After about 400 blocks you’re fully exhausted and move at 50% speed
  • About 40 jumps in quick succession will get you exhausted and unable to jump any more
  • It takes just 3 seconds of rest to restore you to full performance
  • About 10 seconds more of rest will make you fully rested (i.e. able to run another 400 blocks / make 40 jumps).
  • Walking on stairs/ladders counts like moving on flat terrain.

 

Finding Way Home

I am still working on the new survival mechanics. Hopefully will be able to show you something shortly. Don’t worry – at the moment the idea is that they will only work in Challenging and Cruel. Harmless will stay as it is, or at the very least will have a much nerfed variant of the survival.

Having so many of you to bounce ideas against is great. You spotted something which I haven’t even thought of. If I make it so that the player needs to sleep regularly, he will be forced to sleep outside of his house while on long journeys. This will invalidate the last spawn position, and the compass will no longer work. Finding the way home will be difficult.

Fortunately, there’s an easy way to fix this:

Magnet

 

 

A magnet is a new block being introduced in 1.22. Once placed, the compass will point towards it. When more than one is placed, they will point to the nearest one.

It will be crafted from iron (obviously), but I also want to add some other ingredient, and I’m not sure which yet. If you have any good ideas for magnet recipes, please post them below in the comments (preferably the whole recipe, including the shape).

Fence Gates

A lot of people are screaming for these, so here you go. In 1.22 you get proper fence gates that you can arrange in single and double variants. The video with all the gritty details: http://youtu.be/Af0wI61y9Vk

Have you noticed Survivalcraft was at #1 for some time in the US marketplace? Now it’s at #2. This is beyond amazing, reaching #1 in AppStore five days from launch.

Here’s the snapshot of Top-5 matrix in the US taken at that crazy moment:

Rankings

Mount Everest of mobile publishing conquered! Of course I hope we’ll stay up there for some time, or at least somewhere nearby :-)

Split Touch And Survival

Ok, I have read all your comments and installed Minecraft PE on my iPad to see split touch at work for myself. Indeed, I was in the dark, but now I can see the light :-)

I think the best explanation was given in a comment by caitlin, so that’s where the prize goes. Thanks for all the other comments!

prize_draw

I have already made extensive changes to the Split Touch in Survivalcraft to make it more useful. Basically they boil down to that (if you enable split touch):

  • Look pad goes away
  • No matter where you tap/hold the screen, only the block under crosshair will get affected
  • You can keep your finger down and look around as you’re digging. This moves the crosshair and so you can dig multiple blocks without releasing your finger
  • Crosshair is bigger on high-dpi devices

These are small changes compared to the other stuff I was working on. The boat proved to be quite complicated to add, I was hoping for a quick kill, but instead it’s dragging on and on. So for now I just left it in half-done state, will come back to it later.

The most important stuff I’ve been working on is the proper survival mechanics. Basically, starting with 1.22, your life will become a whole heck more challenging. Of course, Creative Mode is unaffected.

First of all, you will get winded as you move, swim, jump or dig. You’ll need to take a short break, or your movements will slow down and the jumping will become weaker and weaker. The reason for that is to make running away from predators more difficult, and to prevent you from swimming very large distances, because you can’t rest while swimming. If you get too winded while swimming, you’ll start drowning. This is actually the coolest working part :-)

Second, you’ll need food to survive. In 1.22, food no longer restores your health. It becomes vital to stay alive. You’ll be able to manage for a couple of days without it, but eventually you’ll start to lose health and die if you don’t eat. That means you’ll have to get out, find it or hunt it.

Third, you’ll need to sleep. You won’t be able to roam forever without taking a nap. If you neglect that, you’ll start to get small blackouts, they will become longer until eventually you pass out wherever you are. The reason for that is to make it impossible to travel very large distances (i.e. more than about a days walk) without large preparations, so that you can build a temporary shelter to sleep while on the move. For this to work I’ll also need to make animals more aggressive while you sleep in the open.

Fourth is still to be decided.

This is all pretty revolutionary and I want to make sure I don’t screw up royally and make the game unplayable, so I’ll be asking your opinion as I progress.

Most of you probably think, how is he going to fit so many bars on the screen (stamina bar, food bar, sleep bar etc.). The answer is I won’t. There are no bars! I dislike bars. The whole mechanic is hidden, and only becomes visible to the players when things are deteriorating. For example when you’re getting hungry you’ll start getting messages that you need to eat. If you’re winded, the player will start panting louder and louder and will move more slowly. If you need sleep, you’ll start getting the blackouts.

So far I think it works pretty well. When it’s more complete, I’ll post a video. In the meantime, please comment and let me know what you think. It’s high time to live up to the name and make Survivalcraft more about survival!

 

Split Touch

First of all, what’s happening on Apple front.

The iOS launch has been extremely successful. It has beaten my wildest expectations. Right now, we are #5 fastest selling application in the US. That’s almost right behind Minecraft, which is #3. In some smaller countries (and Japan) we actually went ahead of it. The reviews are very good, and we are at 4.5 stars in most places.

Ranking

Todays AppStore on my iPad. What can I say, thank you to everyone for great support!

To be honest, I don’t think I deserve all that glory. The game is missing so many things yet. And I definitely don’t think we should leapfrog Minecraft, even if it’s just the PE version and only in Japan. Survivalcraft would not exist without Minecraft, and I have been standing on the shoulders of the bearded giant from Sweden from day one.

I think one of the reasons we went so high in AppStore is that the game quality is higher on iOS than on Android. It runs smoother. It does not have problems with some devices. It does not have problems with custom ROMs and $59.99 Chinese tablets. This definitely counts. It’s a bit like Windows Phone, but with 100x more customers out there.

Anyway, back to business. I get a lot of feedback that the split touch option is not how it should be. I think this is #1 complaint on iOS, and Android/WP7 people are saying the same. I never used it much on Minecraft PE, that’s why.

Can you please tell me what I should modify to make it correct? Actually, I have a small prize for the person that correctly describes what needs to be changed in the most succinct and clearest way. It’s a promo code that allows you to get a free copy of Survivalcraft for iOS (if you don’t have an iPhone/iPad/iPod, you can always give it away to your friends or family). I’ll be checking the comments for the best reply. Just make sure that the email you registered with is correct, I’ll use it to send the code to you.

Thank you!

More Survival

I am introducing more survival aspects of the game in 1.22.

This has been long in the planning, probably more than a year, but I was so focused on creative that I had to push it back constantly. Now it’s high time to do it! I don’t want to say anything specific about it yet as it’s still long way from being finalized.

With the new survival mechanics, there will be new items required. One of them you can see on the below screenshot:

Boat

Yes, it’s a boat. It’s a very early prototype, so I don’t want to make any videos yet. Hope you like the idea though :-)

For those who have not noticed yet, Apple have approved the game! Wohoo!

AppStoreBadge

Because of that, the game needs your help now. It’s early days, so every single person counts. If you have friends with iPhones, please tell them about the game. If you have Facebook or Twitter – please write about it. If you played the game, please go to the above link and rate/review it.

You can also go to http://forums.toucharcade.com/showthread.php?p=2799118#post2799118 and rate the game or maybe write a few words.

Thank you!

It’s already got 19 reviews and 4.5 stars rating after less than a day (not sure if this is worldwide or US only), so it’s pretty good, but we could use more.

Apple version seems to be much more stable than Android. I haven’t heard about a single problem yet, which is a welcome change. I have just 2 Apple devices, but still have fairly high confidence that it works on all of them. It’s because Apple hardware is so tightly controlled and there are no horrible driver bugs or unofficial OS versions.

Good times!

Apple Yay!

Apple have finally approved Survivalcraft, that’s awesome. I’ll write more about it later, now I’m off to celebrate!

Here’s the iTunes link:

https://itunes.apple.com/us/app/survivalcraft/id622613679

Apple

Follow

Get every new post delivered to your Inbox.

Join 1,645 other followers