Early Access Update #18 – Hold onto your butts, 0.2a has landed

No, you’ve not read that wrong. Over a month since the last update, the item system re-write is complete and has been pushed out in 0.2a to the beta branch. We have a little bit to cover so get your cup of tea ready and sit back.

All updates over the last few weeks have documented the trials and tribulations of the item system re-write well, so I won’t cover it in much detail. The bottom line is Samphi now has a new item system that can deal with multiple item stacks. A seemingly small change on the surface, but massive in under-the-hood.

Given how much of the game changed for this, and how many possibilities it opens, I felt this was a good time to roll over to 0.2. Chests still aren’t in yet, they’re the whole reason we had to do this! but they will be next week. The game is now set up to accommodate them, I just didn’t have enough time to squeeze them into this update and we need to get testing ASAP.

Something I’m very aware of is the size of the item stacks. I think they may be too small, so I’m going to be looking for your feedback on this one. Have a play, and if you think an item should have a greater/lower stack size or stack/not stack altogether then let me know. Tweaking and getting these right will be a gradual and on-going process that starts today. 🙂

Another major thing 0.2 brings is partial language support for Italian, Spanish and Turkish. I say partial because it only effects items and their descriptions. UI text is soon to follow, however, so as we go forward this will get better and better.

I’d like to remind people that I’m always looking for translation volunteers, particularly Russian! If you’d like to help out drop me an email at greeny@greenygames.com.

I showed the new graphics in an update a while back, and they’re now in the game. For now, it’s just the settings and language menu, but I intend to roll this out to different parts of the game gradually. Please do let me know what you think!

Right, major systems explained, here’s everything that 0.2a is bringing to the table:

  • Fixed bug in menu with menu going behind terrain etc.
  • Fixed bug in settings menu where pressing ESC would leave windows behind
  • Implemented language menu in settings. Language effects item names and descriptions, more will come soon.
  • Added new art in new style in settings menu.
  • Implemented new item system. Samphi now supports multiple stacks of items and items now have max stack sizes. This means you’ll loose your items I’m afraid. 🙁 Sorry!!!!
  • The crafting system also got a big change-up, something along the lines of a 50% re-write. There’s still things I’d like to change here, but we can do them later and they’ll be MUCH less disruptive.Time for a warning. A massive portion of Samphi has been re-written here, so there WILL be issues. As usual, 0.2a will be pushed to the beta branch, and instead of keeping it there for one week, I think I’ll keep it there for 2. Make sure as many bugs are found as possible.

    Also, I’m really sorry about this, but your item data will be lost. 🙂 I tried everything to make that not the case, but this new system needed a more flexible saving system. I’ve always been open about Samphi save data. I don’t encrypt it or anything, I think that’s so stupid. If you want to give yourself 1,000,000 of an item, then be my guest.

    To try to soften the blow of the changeover, I’ve written an article that explains the new save data format. If you want to move your old item over, read that article and you’ll know how to add items to the save file.

    http://www.samphi-game.com/blog/2016/06/24/samphis-new-item-save-data-format/

    Now that this big update is out I’m going to spend a few days on web stuff. My website for Greeny Games has been down for weeks now, and the Samphi website is feeling derelict. I don’t post articles there yet so I want to spend some time there.

    The wiki system is going to be a big part of that also and I’d like to get it in a functioning early version very soon.

    Now that this is complete we can get back to adding content! I have chests and new crops on the list immediately, so let’s start there. I also have a cool idea for the main menu that I’d like to explore and want to continue moving the older graphics over to the new. This graphical changeover will take a while, so you’ll notice more and more changing as the updates roll through.

    Have a fantastic weekend, and enjoy 0.2! Great things are coming!

    As always you can show your support and keep up to date with development by following me here:

    Visit my websites
    Greeny Games Website[www.greenygames.com]
    Samphi Website[www.samphi-game.co.uk]

    Follow me on Twitter
    Greeny Games Twitter
    Samphi Twitter

Samphi’s new item save data format

From 0.2x onwards, the way in which Samphi saves player item data is vastly different. I apologise about that, I tried to make it cross-compatible, but the new item needs more flexibility in how it stores data and the old system just can’t provide that.

I’ve always been open about people editing their save files. If you want to give yourself 1,000,000 of an item, you should be able to. This article will outline how the new item save data works, so you’ll be able to move over your old items, or give yourselves new ones whenever you want!

Here’s how the new save file for item data looks:

icon_count=”2.000000″
0i=”37.000000″
0q=”1.000000″
0p=”2.000000″
0c=”0.000000″
0s=”0.000000″
1i=”4.000000″
1q=”1.000000″
1p=”1.000000″
1c=”0.000000″
1s=”0.000000″

Looks like nonsense at first, but let’s go through it line-by-line.

icon_count=”2.000000″

Icon count is the number of items that the save file has to load. Pretty self-explanatory! This should simply match the number of icons you have data for.

0i=”37.000000″

From here things get a little more cryptic. Starting with the first character, the number at the start of the line is the index of the item. In programming we start counting from 0, so in the line above the 0 means it’s the first icon that the game will load.

All lines start with the index; the next character determines what type of data it is:

0i=”37.000000″

Item id. All items in Samphi have an index. In this case, the id is 37 so that’s a spade item. There is a lookup table at the end of this blog showing all id’s, and once the wiki is up and running fully you’ll be able to easily find them there also.

0q=”1.000000″

item quantity. This is simply the number of items in the stack.

0p=”2.000000″

Item position. This is which slot the icon belongs in. Be sure not to give 2 items the same item position as it will cause problems in the game.

0c=”0.000000″

Chest index*. This is which chest the item is in. So for example, if you had 2 chests in your level, and you wanted the item in the first you

0s=”0.000000″

0s = chest slot*. This is the slot index for which slot of the chest the item is in.

So that’s what all the values mean! The way Samphi loads data is by first reading that icon_count value, and then counting up from 0. So, remembering we start counting at 0 in programming, let’s say our icon_count value is 3. In this case, we’ll be reading items which start with 0, 1, and 2; three overall.

Practical examples are always best, so let’s look at one. Let’s work with the same data as before:

icon_count=”2.000000″
0i=”37.000000″
0q=”1.000000″
0p=”2.000000″
0c=”0.000000″
0s=”0.000000″
1i=”4.000000″
1q=”1.000000″
1p=”1.000000″
1c=”0.000000″
1s=”0.000000″

Here we have 2 items, one is a spade (37), and the other is an axe (4). Let’s assume we want to give ourselves 20 wood. First, we need to update our icon_count value as we now have one more item to load:

icon_count=”3.000000″

Now we need to add the details of our item. Remember, we already have 2 items here, and we’re adding our third, so all lines need to start with the number 2 as that’s going to be the third one loaded. [0][1][2].

We’ll start with what item we want and how many of it:

2i=”45.000000″
2q=”20.000000″

Now we need to choose its slot. Remember not to give two icons the same value here. We can see that our other items have the slots 1 and 2, so let’s stick it in slot 3:

2p=”3.000000″

I’m not going to show the chest slots, as I advise putting items in chests in the game. But if you do want to tinker, just remember that xC means chest index, and xS is the slot in that chest. For this example, I’m leaving them blank, but they still need to be there! We just use 0s.

2c=”0.000000″
2s=”0.000000″

Pulling all that together we get the following data:

icon_count=”2.000000″
0i=”37.000000″
0q=”1.000000″
0p=”2.000000″
0c=”0.000000″
0s=”0.000000″
1i=”4.000000″
1q=”1.000000″
1p=”1.000000″
1c=”0.000000″
1s=”0.000000″
2i=”45.000000″
2q=”20.000000″
2p=”3.000000″
2c=”0.000000″
2s=”0.000000″

That’s the save data. A little complex on face value, but actually not too bad. There are issues like having to ensure you use the correct slot value, but I plan on creating an editor for this type of thing later down the line. Same goes for level editing, I want to build a tool for it, so there’s no point in creating a robust editing system now when it will be rendered defunct down the line.

Hopefully, this will enable you to make changes to your data and potentially restore any lost item from moving between versions 0.1x and 0.2x! Thanks for reading and all feedback is welcome. Here’s the item lookup table as promised!

ID Name
1 acorn
2 apple
3 arrow
4 axe
5 backing
6 bed
7 bench
8 berry
9 bow
10 bread
11 bucket
12 chest
13 cloth
14 dirt
15 door
16 iron ingot
17 iron ore
18 fat
19 fence
20 fire
21 fish
22 fish cooked
23 flax
24 glass
25 hammer
26 honeycomb
27 kiln
28 ladder
29 pickaxe
30 rock
31 rock sharp
32 rod
33 rope
34 sand
35 seed
36 shears
37 spade
38 stalks
39 stick
40 straw
41 sword
42 torch
43 wall
44 wheat
45 wood
46 wool

Welcome to Samphi’s new home

Around 2 years ago I made a temporary site for Samphi. I posted a note on the bottom saying ‘Full Website Coming Soon’ … 2 years is soon, right? To the Universe it is. To the universe 2 years incredibly fast, so I done good! Anyway, incessant rambling aside Samphi has a new home, welcome! 🙂

Web design is always a very slow process for me. I’m a programmer, not a designer, so the process of me finding a design I like basically includes me fumbling around in the dark until I accidently create something I like the look of. I’ve always been keen for the website to reflect the game, so I’ve mimicked the in-game GUI to a certain extent so it hopefully feels familiar.

There are a number of pages of the site that are not yet turned on, such as maps and community. These require some systems to be built, so for now only the basic pages are live. With Samphi coming out March 18th, I needed to a web presence live. Speaking of March 18th, here’s a quick recap of Samphi. For a full breakdown check out the About page.

“Samphi is a randomly-generated, survival-RPG, featuring elements such as skills, world management and a story mode*. Travel through broken memories of a failing relationship to try and salvage what’s left. How you play is up to you. The world is yours. Your story is waiting.”

“The game will feature a full story mode*, online and offline free play, skills, RPG mechanics, and character progression. The game is entering Early Access on Steam on March 18th, and you can check out the Steam page here.”

My goal for Samphi is to create truly community driven game. Lots of people say this game is ‘community driven’ but I really want to embrace that. All suggestions will be addressed, and any content changes/additions will be polled with the players. If you don’t want it, it doesn’t go in. If you want to see something new, I’ll do it.

I’m really looking forward to starting the Samphi journey with you, and we’re approaching the final few weeks before that happens. So hello, welcome to Samphi. 🙂