Forum

> > Projects > Stranded III Dev. Blog
Forums overviewProjects overviewLog in to reply

English Stranded III Dev. Blog

115 replies
Page
To the start Previous 1 2 3 4 5 6 Next To the start

old OH NO! (No SIII Progress)

DC
Admin Off Offline

Quote
I didn't manage to do ANYTHING for Stranded III this week
Here's a little image to console you:
IMG:https://stuff.unrealsoftware.de/pics/s3dev/ohnoguy.png


Some Off-Topic Stuff
I released a new Counter-Strike 2D version though. It seems to have some critical bugs (they came out of nowhere! I promise!) which is hell because releasing a new CS2D version is a complicated process. It's a horrible nightmare. I never invested a second on any automation and therefore my CS2D-release-process consists of many annoying and super error-prone steps. I'll share them with you because I really have nothing to show regarding Stranded III this time.

After finishing everything I do the following stuff on my Windows machine:

• Compile the game client
• Compile the dedicated server
• Copy changed files to a release folder
• Copy changed files to an incremental update folder
• Make a zip from the release folder
• Make a zip from the dedicated server
• Run my auto-update tool to generate an incremental auto-update package for the in-game auto-update function
• Run Inno Setup to generate an installer
• Upload all 4 resulting files to my vServer (client as zip, client as setup, dedicated as zip, client auto update package)
• Also upload the client zip and setup to uploaded.to just to have a mirror
• Update the links & version at www.CS2D.com/download
• Update the version at www.unrealsoftware.de/game_cs2d.php

Then I boot Ubuntu in a VM and

• Compile the game client
• Compile the dedicated server
• Make a zip from the client
• Make a zip from the server
• Upload them both

Afterwards I boot another VM with MacOS and do the same here. I skip the dedicated server for MacOS though (I could make one but I really wanted to save some steps)

• Compile the game client
• Make a zip from the client
• Upload it

After doing all of this it's time to go live with the new version:

• Update the game version in the U.S.G.N. master server (this will trigger an auto-update for Windows clients and/or tell people to update the game)
• Write a German and an English news thread at UnrealSoftware.de
• Optionally write it on Twitter/Facebook

...and there are also some other small steps that I left out. Like updating changelogs, language files, command lists etc.

It's fun. I can do it in half an hour if everything goes really well but normally it doesn't.

So why do I share this with you (except for the fact that I don't have news about Stranded III)? I want you to stay sane! So please, if you're a developer: Consider to automate your build process. Especially if you're developing a cross-platform game! Everything else is madness and will lead to a lot of trouble.

I will do the same for Stranded III. I'll either set up my own little build server(s) or use Unity's Cloud Build service.
edited 1×, last 19.06.16 12:08:44 pm

old Rock 'n' Roll, Campfire, Texture Upgrade & Bamboo

DC
Admin Off Offline

Quote
Update / info for next dev blog entry
I won't be able to write a new entry next sunday (May 15. 2016) due to vacation! I'll write the next one on May 22.!


Rock 'n' Roll!
Time to create some rocks! I tried the Blender's texture paint feature for the first time last week and I really love it. I wish I tried earlier! It's great to draw a draft on the UV-mapped texture so you know better what belongs where when editing the texture later in Photoshop or whatever tool you use.
It's also super awesome for rocks. I recorded a video about low poly rock creation with Blender only. Modelling, UV mapping and drawing the texture directly in Blender on the model!
> Click to watch me modelling and texturing a rock on YouTube!

The resulting texture is still too plain and boring and needs some additional details though. This will be done outside Blender afterwards.

By the way: I share the same texture for multiple rocks (4096² pixels). That's why you already see other rock textures in the video.

Here's a shot of all the rocks I did so far. The texture is still pretty boring as you can see. So post-editing it with another tool is really necessary here.
IMG:https://stuff.unrealsoftware.de/pics/s3dev/models/rocks_pre.jpg

> click to enlarge (texture work in progress!)


A hint for everyone who wants to try this: Make sure that you save the texture and not just the model. Maybe Blender auto-saves the texture when you embed it in your model (I didn't try that) but I think it doesn't save it automatically when you use an external image file as texture.

Texture Upgrade
I re-used some Stranded II textures as placeholders for wooden stuff like a log and a stick. Instead of completely discarding these placeholders I decided to simply scale them up and add more detail. Click for a high res version (> 1 mb!)
IMG:https://stuff.unrealsoftware.de/pics/s3dev/models/textureupgrade_pre.png

Note: The leaf is not from Stranded II but from an apple texture made for Stranded III. I plan to add even more detail to the wood
surface (right side) later.

Campfire
I have rocks, I have wood.. hey! That's all I need for a campfire model!
IMG:https://stuff.unrealsoftware.de/pics/s3dev/models/small_campfire_pre.jpg

> click to enlarge

Someone asked in the comments if there will be different fire places and the answer is yes, I plan to add different fire places.

This model shows the small campfire but there will also be an improvised/basic campfire without stones. It's quicker to build but it has a an increased risk of inflaming nearby stuff and it will burn wood faster because it's more exposed to wind. There will also be bigger campfires which are required for advanced cooking and crafting. They will help to keep some of the bad animals away. The biggest fires also won't be extinguished by (short) showers of rain.

These are only some of the plans regarding fire. Fire is a very important and complex topic and therefore I may even add more types of fire places, all with different pros and cons. E.g. a fire pit which makes the fire less visible.

Bamboo
Another model. This time an item: Bamboo! Not much to say about it as it's a super simple model and also a super simple texture which mainly consists of a gradient. I also prepared a dry bamboo texture which is more yellow. It will be used for bamboo buildings. Yes, that's right! You won't only be able to build stuff from wood but also from bamboo!
IMG:https://stuff.unrealsoftware.de/pics/s3dev/models/bamboo_item_pre.jpg

> click to enlarge


YouTube Channel Recommendation
If you're into survival stuff I recommend the YouTube channel Primitive Technology to you! It's about building and crafting stuff out of things you find in nature. Needless to say that I already got some ideas for Stranded III from this...
edited 2×, last 19.06.16 12:09:10 pm

old Shrooms & Fern

DC
Admin Off Offline

Quote
Multithreading
After attending the 2. Hamburg Unity User Group and hearing Arne Held's talk about multithreading in Unity I decided to optimize my map generation with multithreading.
For the moment I only touched the Delaunay polygon scanline filling code which currently is the slowest part (it's not very optimized) of the algorithm. Unfortunately filling multiple polygons at once using concurrent threads doesn't give me the expected speed boost. Even worse: It actually becomes slower. Maybe due to per-thread memory allocations or whatever. I measured the time for the thread creation itself but it's negligible in my case. I'm still trying to find out why it becomes slower instead of faster.
Anyway: It's a very interesting topic as most people have CPUs which benefit from multithreading*. I'll use multithreading for sure for other things in Stranded III. Like processing network packages or calculating AI stuff.

*) Here are some stats regarding this:
• Unity hardware stats (May 2016)
• Steam hard- and software survey (last 5 months)

Mushrooms!
Here's a delicious Chanterelle:
IMG:https://stuff.unrealsoftware.de/pics/s3dev/models/chanterelle_pre.jpg

> click to enlarge


And here's a less delicious, because toxic, candidate: Pholiotina Rugosa.
IMG:https://stuff.unrealsoftware.de/pics/s3dev/models/pholiotina_rugosa_pre.jpg

> click to enlarge


Fern.
I love fern. It totally has to be in Stranded III. The problem when making fern is, that fern leafs are very detailed. I wanted to get these details right so I took the shape of a real fern leaf (Google image search) and painted over it.
It's not finished yet because it takes a lot of time to draw all the details but this is what I got so far:
IMG:https://stuff.unrealsoftware.de/pics/s3dev/models/fern_pre.jpg

> click to enlarge


Normally I make the model first, generate the UVs and then draw the texture. For the fern I had the texture first. To make a model from this existing texture I mapped it on a quad and used Blender's knife tool (one of my favorites!) to cut out the leaf shape. This way I was able to get a mesh which perfectly fits the UV texture without ugly stretching and without much overdrawing.
edited 1×, last 19.06.16 12:09:27 pm

old Simplifying Definitions, Starfish & Driftwood

DC
Admin Off Offline

Quote
Simplifying Definitions
Stranded III will have many items and objects and all of them need to be defined.
One basic thing which needs to be defined for nearly everything is a name. The actual name however won't be saved in the definition directly because it needs to be localized. Therefore the object definition will just contain a key to a localized string.

So the definition looks like:
1
2
3
4
define item apple {
	name = $item_apple
	...
}
The $ denotes a reference to the localization key.
The English translation file contains a line which defines a value for this key:
1
item_apple = Apple

Can't we simplify this? We can. I made a simple change: The game will now by default search for TYPE_ID as name in the localized strings. In my example the type is item and the id is apple.
This way it won't be necessary anymore to put the name-line into the definition because the game will automatically look for item_apple as string for the name.
Of course you're still able to define a custom name but in most cases this change allows you to save one line in the definition. Hooray!

Starfish
Only two simple models this time. The first one is a starfish (yes, I know - I should really use bump mapping for this one):
IMG:https://stuff.unrealsoftware.de/pics/s3dev/models/starfish_pre.jpg

> click to enlarge


Driftwood
The second one is driftwood. Maybe I'll make a driftwood item and then you'll be able to make some special buildings from driftwood - or just burn it.
IMG:https://stuff.unrealsoftware.de/pics/s3dev/models/driftwood_pre.jpg

> click to enlarge


Fern Texture
I also worked a bit on the fern texture and made a video while doing so. Probably not super interesting but it implies how much work drawing such a texture can be.
> watch the fern texture video on YouTube
edited 1×, last 19.06.16 12:09:57 pm

old Network Message Generator & Emergency Drinking Wat

DC
Admin Off Offline

Quote
Network Messages
In Counter-Strike 2D and Carnage Contest I used the possibly simplest way to send and receive network messages: Encoding and decoding everything manually in code.
This means for every network message type like shooting your gun or moving the player I had to write some code to send/serialize and also some code to receive/deserialize the data.

Benefits of this:
√ Maximum flexibility: You can do everything (e.g. special error handling) and send everything
√ Optimization: The flexibility also allows you to optimize the structure of messages so they are as small and efficient as possible

Problems with this approach:
× Much work: You have to write a lot of send/receive code which is typically pretty dull
× Error prone: Changes can easily break stuff. Send and receive code always has to be synchronized
× Hard to change: If there's a change in the underlying networking system which requires changes in the send/receive code then you're screwed because you have to touch code for every single message you have

There is an alternative solution: Define the message structure and then auto-generate code for serialization and deserialization of the message.
Google's Protocol Buffers work exactly like that. The "problem" is: Google's system is designed to handle changes in messages without breaking. This certainly is a nice feature but of course it comes at a cost: The messages are bigger because you can't simply rely on the order of the data.
There are also other comparable solutions but they are either not very well known (which means that they potentially have more bugs) or they are commercial, have weird limitations or also have more overhead than necessary.

Therefore I implemented my own network message definition system to generate code which serializes my network messages in an efficient (= small) way. It fully relies on the right order of the data. This makes different versions of messages incompatible with each other but it also minimizes overhead - which is more important for my use case.

Supporting compatibility and extensibility is a requirement for my system anyway. So how is that possible? Condtions are the answer. They can be part of the message definitions.
This doesn't make messages compatible out of the box but I can design them to be compatible by adding conditions, which make use of the game version. This is mainly important for handshaking / server list / join messages because you aren't able to join a server which runs a game version which is different from yours.

Conditions can also be used to modify the payload of the messages based on values in the messages themselves. This is a thing I did for some messages in Counter-Strike 2D already to minimize traffic while keeping the amount of different message types low - which is important because the message type is sent as a byte, allowing a maximum of 256 different messages.

Emergency Drinking Water
A visit of the Internationales Maritimes Museum Hamburg inspired me to make the following super detailed and complicated model...
IMG:https://stuff.unrealsoftware.de/pics/s3dev/models/emergency_drinking_water_pre.jpg

> click to enlarge

Yup... it's basically some water in a plastic bag. It could safe your life!

Aaand did you spot the missing letter? I already fixed that but only after preparing that image...
edited 1×, last 19.06.16 12:10:19 pm

old Newsletter, More Net Code Stuff & Clay

DC
Admin Off Offline

Quote
Newsletter
Some people asked for a newsletter so I prepared one.
> Subscribe here
I will only send a newsletter when there's actually a playable version or other REALLY important news.
I won't send a weekly newsletter for the dev blog because I think it would be too annoying.

Network Messages²
I want to give you some more detailed insights into the message code generation I talked about last week.
Skip this part if you don't care about technical stuff

The messages are defined as simple text files. The first line commonly contains a number which defines the message ID which is used to identify this message.
This is followed by fields and optionally sub messages which form the content of the network message. The indention level is used for sub messages and conditions. No brackets.

Here's a very basic example for a simple message:
1
2
3
245

int:Timestamp
It uses message ID 245 and it only contains one integer, called "Timestamp". The code generation will create this class from it (usings and namespaces removed):
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
public class PingMsg : INetworkMessage
{
	public const int MessageID = 245;

	public int Timestamp;

	public int ID { get { return MessageID; } }

	public void Write(Packet p)
	{
		p.WriteInt(Timestamp);
	}

	public void Read(Packet p)
	{
		Timestamp = p.ReadInt();
	}
}
The name of the class is the file name of the definition file by the way.

Of course the system is also capable of doing more complex stuff! Sub messages for example. And "repetitions" - I stole that idea from Google's Protobufs. They are basically arrays of data.
1
2
3
4
5
6
7
8
9
10
123

string:ClassName
Person:Teacher
repeat:Person:Pupils:<=30

	message:Person
	string:FirstName
	string:LastName
	byte:Age
So this is a network message definition to represent a school class. Each class has a name, a teacher and multiple pupils.
The pupils and the teacher are persons so they can be serialized using the same sub message (Person). Each person has a first name, a last name and an age in this example.

The <= 30 in the repeat statement defines that we expect a maximum of 30 pupils in a class. This is an important information for serialization because this way we know that we can use a single byte to encode the number of pupils. Otherwise we might have to use 2 or more bytes.
We could also just put 30 without <=. In this case the system would always send and receive 30 pupils. Advantage: No additional value for the amount has to be sent. Disadvantage: We always send 30 pupils. So this would only make sense in case all classes have exactly 30 pupils. Otherwise we might waste some bandwidth and memory.

This is the generated code from this definition:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
public class ShoolClass : INetworkMessage
{
	public const int MessageID = 123;

	public string ClassName;
	public Person Teacher;
	public Person[] Pupils;

	public int ID { get { return MessageID; } }

	public void Write(Packet p)
	{
		p.WriteString(ClassName);
		Teacher.Write(p);
		int c = Pupils.Length;
		p.WriteByte((byte)c);
		for (int i = 0; i < c; i++) {
			Pupils[i].Write(p);
		}
	}

	public void Read(Packet p)
	{
		ClassName = p.ReadString();
		Teacher = new Person(); Teacher.Read(p);
		int c = p.ReadByte();
		Pupils = new Person[c];
		for (int i = 0; i < c; i++) {
			Pupils[i] = new Person(); Pupils[i].Read(p);
		}
	}

	public class Person : INetworkMessage
	{
		public string FirstName;
		public string LastName;
		public int Age;

		public int ID { get { return 0; } }

		public void Write(Packet p)
		{
			p.WriteString(FirstName);
			p.WriteString(LastName);
			p.WriteInt(Age);
		}

		public void Read(Packet p)
		{
			FirstName = p.ReadString();
			LastName = p.ReadString();
			Age = p.ReadInt();
		}
	}
}
The above sample contains just a single sub message. In theory the amount of sub messages is unlimited and they can also be nested infinitely.

Another cool feature I integrated is bit packing. Bytes are the smallest data unit you can send over the internet. A Boolean (or bit) however is an even smaller unit. A byte can hold up to 8 Boolean values. Therefore it would be a waste of bandwidth to send each Boolean value as a single byte. The system is aware of this and packs up to 8 Boolean values together to reduce the message size.
Here's an example:
1
2
3
4
5
6
7
8
9
10
11
12
13
5

bool:This
bool:Is
bool:A
bool:Bit
bool:Packing
bool:Example
bool:ExclamationMark
bool:Thats
bool:Pretty
bool:Awesome
bool:ThreeExclamationMarks

Resulting code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
public class BitPacking : INetworkMessage
{
	public const int MessageID = 5;

	public bool This;
	public bool Is;
	public bool A;
	public bool Bit;
	public bool Packing;
	public bool Example;
	public bool ExclamationMark;
	public bool Thats;
	public bool Pretty;
	public bool Awesome;
	public bool ThreeExclamationMarks;

	public int ID { get { return MessageID; } }

	public void Write(Packet p)
	{

		byte bitFlags = 0;
		if (This) { bitFlags += 1; }
		if (Is) { bitFlags += 2; }
		if (A) { bitFlags += 4; }
		if (Bit) { bitFlags += 8; }
		if (Packing) { bitFlags += 16; }
		if (Example) { bitFlags += 32; }
		if (ExclamationMark) { bitFlags += 64; }
		if (Thats) { bitFlags += 128; }
		p.WriteByte(bitFlags);

		bitFlags = 0;
		if (Pretty) { bitFlags += 1; }
		if (Awesome) { bitFlags += 2; }
		if (ThreeExclamationMarks) { bitFlags += 4; }
		p.WriteByte(bitFlags);

	}

	public void Read(Packet p)
	{

		byte bitFlags = p.ReadByte();
		This = (bitFlags & 1) != 0;
		Is = (bitFlags & 2) != 0;
		A = (bitFlags & 4) != 0;
		Bit = (bitFlags & 8) != 0;
		Packing = (bitFlags & 16) != 0;
		Example = (bitFlags & 32) != 0;
		ExclamationMark = (bitFlags & 64) != 0;
		Thats = (bitFlags & 128) != 0;

		bitFlags = p.ReadByte();
		Pretty = (bitFlags & 1) != 0;
		Awesome = (bitFlags & 2) != 0;
		ThreeExclamationMarks = (bitFlags & 4) != 0;

	}
}
Only 2 bytes to encode all these Boolean values! There's even room for 5 more in these 2 bytes! Eureka!

There are also conditions as I mentioned last week but I won't show an example for that. It basically just generates an "if" around some of the statements in the read and write code.

Also note that this stuff is still in a really early development stage and a lot of things are still missing.
A lot of error handling code and sanity checks for example. Or constructors. Or ToString overrides...

Clay
Here comes another highly complicated model. Rocket science level: Over 9000! May I present to you, a clay... blob.
IMG:https://stuff.unrealsoftware.de/pics/s3dev/models/clay_pre.jpg

> click to enlarge

Hey, maybe I could reuse it as potatoe model!?

Clay Pot
Here's something you'll be able to craft later using that clay!
Turns out that modelling a clay pot in blender is not very hard when you use the right base shape to start from. The torus seems to be a pretty good choice for that. I started with the top ring and simply extruded it downwards. The bottom was then closed with faces.
Afterwards I merged some faces inside to reduce the poly count a bit and moved the bottom inside a bit upwards. This should prevent other geometry underneath the clay pot from glitching through the bottom too easily. Voilà!
> watch the clay pot modelling video on YouTube

Lifebuoy
I also worked on a lifebuoy model but it's not textured yet. Try to enjoy the grayness.
IMG:https://stuff.unrealsoftware.de/pics/s3dev/models/lifebuoy_untextured_pre.jpg

> click to enlarge
edited 1×, last 19.06.16 12:10:58 pm

old Website Update, Lifebuoy & Skills

DC
Admin Off Offline

Quote
Website Update
Stranded3.com has been improved a bit to deal with the increasing number of dev blog entries in a better way. There's now another page navigation and also an overview page.
Moreover I gave all entries titles so you can easily see what they are about on the overview page.

The bottom of the page is now doing wavy animation stuff using ugly and slow JS/CSS/jQuery code. It might not work in all browsers and it certainly looks pretty f*cked up in some browsers. There was not particular reason to do this, just wanted to try it.
I basically added a lot of divs with different background image position offsets and I modify the x-offsets with sine in JavaScript for the animation.

The header/background graphic has been updated as well. The navigation bar is now more curvy and the leafs and the fire are more shiny.

Textured Lifebuoy
Here's the textured version of the lifebuoy I've shown in the previous dev blog:
IMG:https://stuff.unrealsoftware.de/pics/s3dev/models/lifebuoy_pre.jpg

> click to enlarge

I also optimized the mesh a bit so it has only 476 instead of 544 tris.

Some Thoughts On Skills
Stranded II had the following skills:
• Digging
• Fishing
• Hunting
• Planting
• Woodcutting

They were automatically improved by just doing related things and improving the skills automatically unlocked new stuff and improved efficiency.

In Stranded III I want to make the skill system a bit more interesting: There will not only be more skills but also skill trees - one for each skill. You will still earn skill points by just doing things but when you reach a certain amount of skill points for a specific skill you will be able to manually choose a perk. Some perks will lock/unlock others so you have to choose wisely.

Wait, you said there will be more skills? What can we expect? Some movement related skills like
• Swimming (how long & fast can you swim)
• Diving (how long, fast & deep can you dive)
• Running (how long and fast can you run)

I'm also considering to add some
• Climbing (where/what & how long can you climb)
stuff after seeing some "Zelda: Breath of the Wild" game play videos - but I'm not sure about this yet.

The hunting skill will probably be split up into several individual fighting skills. It would be nice to have one for each major type of weapon. Including weaponless fighting.

It may also make sense to split the planting skill up into several independent ones for different plant types.

Moreover I would like to add some other new skills:
• Fire-Making (success rate, new fire place variations, fuel efficiency)
• Gathering (efficiency/speed when collecting items from the nature)
• Crafting (unlock new item combinations)
• Constructing (new buildings)
• Cooking (new meals & food related buildings/items, speed)
• Tailoring (new cloth & armor items, speed)
• Herbalism (production of medicine)
• Blacksmithing (new tools/weapons/armor made from metal)
• Pottery (new items made from clay)
• Taming (ability to tame / breed more animals)
• Trapping (new traps, trap re-usability)

...and some more. But his is just a "would be nice" at the moment. It depends on how much content I have for specific skills. e.g. Pottery might not make much sense unless I add a good number of different pottery items to the game.

What are your thoughts? What type of skill would you like to see in Stranded III?
edited 1×, last 20.06.16 07:18:13 pm

old Cocobanana

DC
Admin Off Offline

Quote
Coconut Items
Stranded Deep took my name, so I'll take their "coconut logic"!

This is the coconut as you'll find it on palm trees with a hull:
IMG:https://stuff.unrealsoftware.de/pics/s3dev/models/coconut_pre.jpg

> click to enlarge


You can dehusk it to get a ... well... dehusked coconut:
IMG:https://stuff.unrealsoftware.de/pics/s3dev/models/coconut_dehusked_pre.jpg

> click to enlarge


You can drink from the dehulled one, but to eat it you have to crack it open. Which will give you two halves:
IMG:https://stuff.unrealsoftware.de/pics/s3dev/models/coconut_half_pre.jpg

> click to enlarge


I'm afraid that I made it partially too low poly (note the dehusked model top view) but it should suffice for the moment.

Banana
I also made a banana:
IMG:https://stuff.unrealsoftware.de/pics/s3dev/models/banana_pre.jpg

> click to enlarge


Code Side
I worked on the code as well but it's basic stuff which I can't really write much about. I hope to post more next time.

old RiCe Of The Watermelon

DC
Admin Off Offline

Quote
Again no update on code/game stuff but I have some new assets to show.

Watermelon
A delicious watermelon. Great food for hungry and thirsty castaways!
IMG:https://stuff.unrealsoftware.de/pics/s3dev/models/watermelon_pre.jpg

> click to enlarge


If you have an item with good cutting abilities you can even slice your melon so you don't have to eat the whole thing at once:
IMG:https://stuff.unrealsoftware.de/pics/s3dev/models/watermelon_slice_pre.jpg

> click to enlarge


Rice Plant
I want to have cereal in the game but I also want it to be at least a bit more realistic than Stranded II. The stuff is simply called "grain" there and the model resembles something which might be some kind of wheat. The problem with this is that Stranded III (like II) takes places in the southern hemisphere / tropical regions and wheat doesn't really grow there. Therefore I decided to choose a cereal which is more likely to grow there: Rice.
IMG:https://stuff.unrealsoftware.de/pics/s3dev/models/riceplant_pre.jpg

> click to enlarge


Other cereals I plan to add later is corn and sorghum / millet.
edited 1×, last 03.07.16 11:53:27 pm

old It's peanut pumpkin manioc time!

DC
Admin Off Offline

Quote
50 Dev Blogs!
Damn... I really wanted to show something special for the 50th dev blog but I didn't manage to prepare something.
At least I'll be able to show some new models again.

Peanut
Need a snack? Eat some peanuts!
IMG:https://stuff.unrealsoftware.de/pics/s3dev/models/peanut_pre.jpg

> click to enlarge


Pumpkin
I wanted to be prepared in case I need to make a halloween update some day so I made a pumpkin:
IMG:https://stuff.unrealsoftware.de/pics/s3dev/models/pumpkin_pre.jpg

> click to enlarge


Manioc
Another simple model: A manioc tuber
IMG:https://stuff.unrealsoftware.de/pics/s3dev/models/manioc_pre.jpg

> click to enlarge

old Wheat, Bread & Thoughts

DC
Admin Off Offline

Quote
Wheat
After realizing that wheat also grows in tropical areas (not very well but it does), I decided to add it to the game
IMG:https://stuff.unrealsoftware.de/pics/s3dev/models/wheat_pre.jpg

> click to enlarge


Bread
And this also means that we can have bread
IMG:https://stuff.unrealsoftware.de/pics/s3dev/models/bread_pre.jpg

> click to enlarge


How the "Weekly Dev Blog"-approach affects the way I work
A few months ago I decided to make a new dev blog entry each week. My plan was to force myself to work more on Stranded III. This worked out only partially. Most weeks I only invest a few hours on Sunday to work on Stranded III. In that time I usually try to make a few cheap and fast models so I can show something.
This is not good because of course there is a huge amount of work on the code-side as well.

I wish I could develop games the way I did a few years ago. Back then I mainly cared about the result. I didn't invest much time in refactoring code or thinking about the cleanest and most efficient solution. Now I think about way too much stuff when I plan to implement something. This makes it harder to tackle big problems in a straightforward way.

To solve this problem I will try to write about code/game play stuff only the next weeks without showing any new assets.

Thoughts
Does it make sense to develop a game like Stranded III in times where every second game seems to be an open world survival game? There's Ark, there's Rust, there's Stranded Deep and there are hundreds or maybe even thousands of others. Some of these games are developed by big and experienced teams so it's impossible to compete graphic- or content-wise with my small indie project.

To be honest: I don't think that it makes sense. At least not if the goal is to make a successful and well known game. The competition is simply way too high. Of course I would like to make a successful game so the next logical step would be to instantly stop working on Stranded III and to work on something more unique with less competitors.

I won't do that though. I really want to make a successor for Stranded I and II even though the chances to get much attention with it are rather low. I will try to incorporate fun stuff to make the experience as unique as possible even though it will still be yet another open world survival game.

old Context Menu & Interface Meshes

DC
Admin Off Offline

Quote
Context Menu Improvements
My context menus now support header-items (the thing containing the question):
IMG:https://stuff.unrealsoftware.de/pics/s3dev/ui/context_delete_savegame_pre.jpg

> click to enlarge


This allows some fancy quick context menus for confirmation situations like in the one pictured in the screenshot above. The benefit compared to a full confirmation dialog is that context menus are quicker to use because they spawn right next to the clicked thing.
Also they are super easy to implement with my Stranded III Lua UI system

Here's the whole code for the delete save game button which actually contains the context menu code as well:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
self.deleteButton = gui.button.createMain("delete", 0, 0, false, true,
	function()
		local name = self.list:getSelectedText()
		-- Confirm delete
		gui.context.menu.createAutoFit({
			{label = "Delete '" .. name .. "'?", header = true},
			{icon = menu.gfx.icon_okay, label = "yes",
				-- Actually delete save game
				click = function()
					s3savegame.delete(name)
					self:updateSaveGameList()
				end
			},
			{icon = menu.gfx.icon_cancel, label = "no"}
		})
	end,
nil, menu.gfx.icon_cancel)
It's using multiple anonymous functions to implement the logic. The first one (starting in line 2) is the function which is executed when the button is clicked. This function basically creates the context menu which is defined with a big table (lines 5-15). That table contains a second anonymous function which is executed when "Yes" is clicked (lines 9-10).

3D meshes in the user interface
The Lua API has been extended to support drawing of 3D meshes in the user interface! Here's an example:
IMG:https://stuff.unrealsoftware.de/pics/s3dev/ui/lifebuoy3d_pre.gif

> click to enlarge (6 mb)


The code to draw this animated 3D lifebuoy is:
1
2
3
4
5
6
7
8
update = function(self)
	-- Draw fancy lifebuoy 3D mesh
	local t = gui.ms / 1000
	local yPos = math.sin(t) * 0.1
	local yRot = math.cos(t / 1.3) * 30
	local scale = math.min(350, (350 * menu.deco.leafScaleIn) * 3)
	s3mesh.drawInterface("lifebuoy", {0, yPos, 10}, {90, yRot, 0}, {scale, scale, scale})
end

s3mesh.drawInterface expects a definition to something which contains a 3D mesh, and 3 Vector3 tables: position, rotation and scale. Very basic sine and cosine operations are used to make the lifebuoy move a bit.
menu.deco.leafScaleIn
is a variable from the leaf animation system. I simply re-used it. It's for the very quick scale-in effect when the menu is opened.

old The Crafting Poll

DC
Admin Off Offline

Quote
The Crafting Poll
I didn't manage to make noteworthy progress this week
But I want to ask you what kind of crafting system you would like to see in Stranded III.

My two suggestions are:

• Option 1: Guess and try combinations (like in SI and SII)
You don't have any list of combinations. All you can do is selecting some items and see what happens. Trial and error basically.

• Option 2: A list with combinations
Many other games go for a list of items you can craft and show you the required items so you can just select what you want to craft. It would also be possible to hide more advanced combinations in the beginning and to unlock them with certain skills/buildings/tools (of course unlocking would also work with option 1 though). Furthermore there could be categories because there will be many possible combinations.

If you're registered at UnrealSoftware.de please cast your vote here:
> Stranded III Crafting Poll

Please also feel free to comment. What do you prefer? Would you like to see a completely different approach? What would it look like?

Keep in mind that Stranded III will also be a multiplayer game and that you might have to craft the same thing quite often. So it shouldn't be an annoying/slow process.

old Crafting Poll Result Evaluation

DC
Admin Off Offline

Quote
Coding Stuff
I'm currently busy preparing the basic multiplayer system so I can set up a test version. This will be a minimalist version without much gameplay. Basically moving placeholder player objects and chatting, collecting and dropping items.
This version is crucial to test the multiplayer system. I hope it works well on Win, Linux and Mac with a normal player client and - which is also very important - also with a headless client so people can run their own servers on actual servers without GPU.

Don't ask me when this version will be available. Unfortunately I have and had very little time to work on Stranded III this month.

Crafting Poll Result Evaluation
Last week I asked you about your opinion regarding how to do the crafting system in Stranded III and I received a lot of awesome and very useful feedback! Thank you very much!

The results of the poll at UnrealSoftware.de are (as of 07.08.2016, 6:51 pm, UTC+1):
IMG:https://stuff.unrealsoftware.de/pics/s3dev/crafting_poll.jpg


• about 2/3 (60 people, 65.93%) voted for the old SI and SII guessing approach
• and 1/3 (31 people, 34.07%) voted for a list of combinations.

There's a ton of great comments as well. At UnrealSoftware.de and here in the Disqus comments.
Here are some of the most important points I extracted from the comments:

• Mix both approaches
Many people said that they would like a mix of both approaches. So once a combination has been found out, you can select it from a list and don't have to combine it again manually.

• Hints
There were maaany cool ideas and comments regarding hints to make the game less frustrating.
     • Hints in item descriptions (this already was the case for several items in SII).
     • Hints when crafting failed. e.g: Saying which items might be wrong or missing.
     • A dynamic list of craftable items (or only their contours if they have not been discovered yet) based on the selected items. Could also show items for which you would have to select some more items.
     • A count for each item, saying in how many crafting combinations it is used so the player can safely ignore some items while trying.

• Blueprints
Blueprints could be part of the game, directly unlocking specific combinations so you don't have to find them out manually. They can be actual items which an be shared and traded. This could even be a multiplayer setting, controlling that you own/know specific combinations already so you don't have to "learn" them again manually in each new multiplayer session.

• Option to toggle
There could also be an option to toggle completely between both approaches so everyone can play the way he prefers.
A thought from me on this: It would actually be pretty interesting to implement this in early releases and to track how many people use which setting...

• Crafting Skill
A crafting skill could influence how good you are at crafting and how many hints you get.

So... what will I go for?
After reading all the comments, my current plan is the following:

√ Stranded III will use a mix of both approaches but you will have to find out combinations by trial and error!
√ There will be a much more sophisticated hint system:
     √ When selecting items for crafting you will see a list of possible combinations which contain these items (it updates instantly when selecting other items)
     √ The results (resulting items of crafting combinations) are grayed out unless you discovered them already
     √ You will also see combinations which need additional items or which only have some items in common
          √ how many combinations you see and how big the difference from the selected items can be is governed by your crafting skill, making it easier to discover new combinations when you have a high crafting skill level
√ I will also keep a list of combinations you already discovered so you can easily craft these things again.
     √ It will probably reset with each new game to keep it more fair.
√ It will be possible to find/buy/trade blueprints to learn new, complicated combinations.
√ Optionally: Crafting skill influencing crafting speed / allowing to craft batches of items / higher quality items
√ Optionally: An icon or color code in the inventory, indicating that an item is part of no/one/multiple combinations (this could also be a perk/skill related thing)


This is the basic principle for crafting without workstations / required tools. Those however could be treated just like regular crafting ingredients in the hint system.
E.g.: A combination is only possible while standing at a forge. In that case the forge will be displayed as required item by the hint system. The forge itself will automatically be treated as a selected item when you use the forge (which then would basically open the player inventory with a little info icon/text saying that you're currently using a forge).
Or for tools: Maybe they would be "passive ingredients" meaning that you won't have to select them as part of the combination. They would however be displayed in the crafting book and in the hints, with a little icon indicating that they are required but that they are not ingredients and won't be spent when crafting.

Let me know what you think and thanks again for your valuable feedback! You are awesome!

old No Update

DC
Admin Off Offline

Quote
Oh no, nothing meaningful to write or show for this week! I'm sorry!
IMG:https://stuff.unrealsoftware.de/pics/s3dev/ohnoguy.png


I'll hopefully be able to show more stuff again soon.

old Game Jam

DC
Admin Off Offline

Quote
Game Jam
I'm really sorry that my weekly dev blog approach isn't working very well recently. I wasn't able to post something interesting in the last dev blog and unfortunately I have to disappoint you again this week.

The reason for this is that I simply didn't have enough time to work on the game. I can show you something unrelated though. Together with a colleague I went to the IG Jam at the Games Com in Cologne from Wednesday to Friday and we developed a small game within 48 hours.

The topic was "masks" so we made a little Halloween game called Trick or Treat. It's available for many platforms and we even have a Web GL and Android version.
IMG:https://stuff.unrealsoftware.de/pics/s3dev/trickortreat.jpg

> More info here


What about Stranded III?
I'm still working on the basic network game so I can do some multiplayer tests with you soon.

Update 28.08.2016
I will temporarily pause the weekly dev blogs because it's currently hard to post about progress. I will try to bring them back ASAP.
edited 1×, last 28.08.16 08:46:50 pm

old Not Seamless At All

DC
Admin Off Offline

Quote
Not Seamless At All
I imported some of my models in Unity the other day and I encountered a horrifying problem with my UV mapping seams:
IMG:https://stuff.unrealsoftware.de/pics/s3dev/seamful_pre.jpg

> click to enlarge


Do you see the problem? Right! The UV seams are totally visible even though they shouldn't be!
I tried to find a solution with Google and I actually found other people posting about this problem but I didn't find a working fix yet...

I'm using FBX as export format from Blender and I would like to stick to that because other formats cause other problems. The same models work fine (at least regarding the seams) when I export them from Blender as OBJ.

So this is not a texture problem and the models are probably fine. It's clearly about the normals at the seams. Either Blender or Unity screws them up when using FBX. Does anybody know how to solve this without switching to another format or modelling software?

Auto-Generated Icons
The game now automatically renders preview icons for stuff if you don't specifiy your own icon.
IMG:https://stuff.unrealsoftware.de/pics/s3dev/ui/rendericons_pre.jpg

> click to enlarge

You can see that some items are using images rendered from the models and others use painted images. My intention is to use painted images for all icons. The rendered icons are actually just a fallback solution.
There are some scaling/positioning problems (note the mushrooms) but except for that it works pretty well already. You will also be able to define a custom rotation etc. for each icon rendering individually.

How does this work internally?
• I have a camera only for preview rendering
• It is disabled all the time and the culling mask only renders my "Preview" layer
• Clear flags are set to a solid black color with 0% opacity (it actually took me some time to realize that you can use 0% opacity for the clear color)
• There's also a light using the same layer so the previews aren't too dark and boring
• I then use RenderTexture.GetTemporary to get a texture and assign it to the camera as render texture
• The item is "created" with Graphics.DrawMesh in front of the preview camera and on the "Preview" layer
• Then it gets rendered manually with Camera.Render
• Afterwards the temporary render texture is copied into a new persistent texture
• Finally the render texture can be released with RenderTexture.ReleaseTemporary

Cool thing: This whole process is decoupled from the normal rendering loop. I can render as many items as I want without rendering a single full game frame with the main camera.

Networking
I mentioned a multiplayer test a while ago - this is still work in progress. I didn't forget about it Please don't ask for a date or timeframe though. There's no schedule yet and I can't estimate it.

old Seamless, Pooling & Crafting

DC
Admin Off Offline

Quote
Seamless.
Okay, I found out what caused the seams in my models. I wrote that script which fixes the rotation of the Blender FBX imports. That rotation fix apparently screwed up the normals. I even wrote a blog post about that script but I forgot about it. dragonking92 posted a useful link to a way more sophisticated importer script which helped me to fix my importer and the seam problem! Thanks a lot!

Sprite Pooling
Pooling is a nice thing to do if you want to reduce garbage and save some time on instantiating. It's pretty easy in Unity: Instead of destroying no longer used game objects, you simply disable them. Then, if you need new ones, you just enable your existing ones instead of instantiating new ones.
I added this to the sprite system in Stranded III but forgot about one very important thing: There are commands in my Lua API to add colliders and rigidbodys to sprites. Of course these stay there when reusing the sprites unless you disable/remove them in the pooling system... which I didn't do.
The results of this mistake look quite hilarious so I made a short video (the little sparks are the sprites which have a rigidbody and physics. They cause the trouble):
> Watch "Pooling Gone Wrong" on YouTube
Luckily this was trivial to fix

IMG:https://stuff.unrealsoftware.de/pics/s3dev/ui/funky_pooling_pre.jpg

> click to enlarge


Inventory And Crafting Menu
My plan was to use the same inventory menu for all item related actions like I did in Stranded I and II. Stranded III is more complex though because you will have a character which can be equipped with clothes etc.
Therefore I decided to have two separate menus: Inventory and crafting. This gives me more space in the interface and allows me to simplify controls.
The inventory will be used to equip and use/eat/throw away items and the the crafting menu will be used to combine items to new ones.

Here's a preview of the new crafting menu:
IMG:https://stuff.unrealsoftware.de/pics/s3dev/ui/combination_win_pre.jpg

> click to enlarge

You can select multiple items by simply left-clicking them. Right-clicking deselects all items. Clicking an already selected item also deselects it. The list on the right shows all possible crafting combinations with the selected items. Your crafting skills / perks will have an influence on what you see.
• If you have low crafting skills you'll have to select exactly the right items to see combinations
• If your skills are higher, you will see combinations even if some items are missing or if wrong ones are selected. Only to a certain extent of course.
• Already known combinations will also be displayed in some way... (not implemented yet)

To make the combination win work I extended the listbox component of my Lua scripted GUI. It now allows to pass in custom rendering functions for listbox items. This makes it possible to display complex combination details in the listbox.

The inventory menu has been changed to use tabs instead of a combobox for the different item categories. This reduces the required click count to change the category from 2 to 1! Usability! Hooray!
> Inventory tabs in action

old Sketchfab & Screenshots

DC
Admin Off Offline

Quote
Development Progress
Yes, I'm still working on the project. Unfortunately it's progressing pretty slowly so there's not a lot to write about.

Sketchfab
Sketchfab is cool! It allows you to upload models directly via Blender so people can see them online in their browsers! Awesome! I made an account and uploaded a few Stranded III models so you can have a look at them in 3D! Hooray!
> Stranded III Sketchfab Models

Blender FBX Rotation Fix
Instead of using an import script in Unity, I'm now exporting FBX models correctly from Blender using this great export script. It seems to be an easier and cleaner solution.

Some Screenshots
I worked a bit on some models and made a few screenshots. Please note that the objects on these screenshots are placed entirely randomly, not using the final biome based placement algorithm. Also of course a lot of assets are still missing. I think it already looks quite okay anyway The dynamic shadows Unity provides make the jungle look way more alive and interesting than in Stranded II which did not have any shadows at all.

IMG:https://stuff.unrealsoftware.de/pics/s3dev/landscape/beach01_pre.jpg

> Beach (click to enlarge)


IMG:https://stuff.unrealsoftware.de/pics/s3dev/landscape/jungle01_pre.jpg

> Jungle (click to enlarge)


IMG:https://stuff.unrealsoftware.de/pics/s3dev/landscape/dusk01_pre.jpg

> Dusk (click to enlarge)


IMG:https://stuff.unrealsoftware.de/pics/s3dev/landscape/dawn01_pre.jpg

> Dawn (click to enlarge)

old Drawing the Line: Script vs Code

DC
Admin Off Offline

Quote
2017
Welcome to dev blog entry number 60 and also the first one in 2017!
I hope you all had a happy new year.

Drawing the Line: Script vs Code
I made 3 bigger games in my life which can be modified a lot with scripting. Stranded II, Counter-Strike 2D and Carnage Contest.
They all have their own scripting system. They all differ in a way but they all work quite well.

Stranded II was designed with scripting in mind from the beginning. Several things in the actual game are done in script. The whole adventure is scripted too.
Stranded II Script (S2S) however is very slow so I took care that scripts are only executed when it's really necessary.
To make that possible I defined a number of events to which you can attach scripts by writing an event handler.

Scripting wasn't planned from the beginning for Counter-Strike 2D. It has been added later - on top of an already "complete" game.
This means everything in Counter-Strike 2D is game code, but you can influence and modify the normal behavior by hooking into the game when certain things happen.
CS2D's hooks are basically what Stranded II's events are. They are slightly different but it's the same idea.
Lua scripts only run on server side in Counter-Strike 2D though. A game client never executes a single Lua command.

Carnage Contest heavily relies on Lua scripting.
All weapons and some objects in the game are actually completely scripted in Lua.
These scripts run all the time - meaning each frame.
And it works. There's a weapon in Carnage Contest called "Arrow Rain". It spawns a shitload of arrows in the sky. Every single arrow is drawn, moved and updated with Lua - at a good and stable frame rate.
Additionally you can script game modes and "game enders" to influence the game even more. Scripts are even transferred to other players so they can play with your custom weapons.

For Stranded III I wanted to go even a step further. I wanted to make basically everything modifiable.
One way to achieve this is to write most of the game completely in script instead of code so people can touch and modify all the stuff.
That's the way I went for. Unfortunately.
The fully scripted menu - which contains a lot of complex UI elements - proves that this approach works fine performance wise.
The problem is that the Lua scripts for the UI system are kind of crazy - at least compared to the simple scripts in my other games.
They are too complex for my personal taste and probably so complex that many people who want to mod the game are scared when they see them.

There are also more problems with scripting everything: I have to expose everything to the Lua API.
In some cases I really don't want to expose certain things though because it's dangerous. The interface to enter U.S.G.N. login data for example.
Someone could very easily write a mod which steals your data because even the input field itself is fully scripted.
It also leads to instability: When you screw up a part of the UI system script, the whole game will explode and you won't be able to interact with it anymore because the UI script can't run anymore.

Apparently I've drawn the line for the scripting API at the wrong position. I did too much stuff in script, resulting in overly complex scripts with too much access and too many responsibilities.

How to solve this? The answer is simple: Move more parts to code again and do less stuff in Lua.
C# (the language Stranded III is developed in) is way better for writing complex stuff because it is more strict and strongly typed.
In my opinion Lua isn't the best choice for complex things. It is still nice however for quick development of small to medium software artifacts because of its open and dynamic table system.

The painful consequence of all this: I have to port the UI system from Lua (over 4.5k lines for the system itself + over 2.2k for actual game menus) to C#. Afterwards I'll throw the fancy Lua UI scripts into the trashbin. Ouch.
But hey, I learned some crazy Lua tricks while writing the UI.
Moreover it helped me to develop a powerful 2D Lua API for Stranded III which can be used for modding.

Another consequence: To speed up development I'll go for a more code-heavy approach in general now.
This means that some aspects of the game might be less modifiable at first.
This can speed up development because writing a modifiable system with Lua API is more effort.

Game Suggestion: Raft
I found a little game which is worth a try. It doesn't have much content and you can probably get to know everything it has to offer in 1-2 hours of play time but it's a very fun and interesting idea.
Raft is being developed by three students from Sweden (according to Rock Paper Shotgun). It's all about surviving on a raft on the ocean. You have to eat, drink and defend yourself against sharks. The probably most interesting part: You can extend your raft with flotsam.

It's available for "pay what you want" which includes the possibility to simply get it for free.
> Get Raft
To the start Previous 1 2 3 4 5 6 Next To the start
Log in to replyProjects overviewForums overview