StarMade 0.0938: Meta Items & new factories

    schema

    Cat God
    Joined
    Feb 17, 2012
    Messages
    1,552
    Reaction score
    2,604
    • Schine
    Hello and welcome to StarMade,

    Additional to a lot of bug fixes and optimizations, this version is introducing an all new meta-item system, and a new factory system.


    Meta Items

    A structure for items that have a completely free set of data has been implemented. It was actually one of the most time consuming parts of the update to create an abstract system, where I can just define new types of items with just one class. The hard part was to abstract the system over the network, so the items will not only be consistent with the world (saved, and loaded/unloaded with the universe), and for it to be synched over the network, but also to implement a way that items are only sent on demand, so network overhead for items that a player is not even near of won't happen.


    Log books

    Log books are the first class of items that have a very simple purpose: You write things in it and anybody else who opens it can read it. No more, and no less. This might be a good tool for RPG servers to get a customized lore across.

    Log books will spawn in pirate bases and ruin chests only. They cannot be bought or sold (yet).
    There is anew file in the /data/config/ directory that lets admins define the default messages that will randomly be assigned to a spawned logbook.

    There is also an admin command "/give_logbook playername" for admins to create it.


    Recipes

    The second meta item that is introduced in this version is the first one that will have impact on the game play. More about it below.


    New Factory System

    I was planning for a long time to change the factory/block-crafting system. The root of my thoughts were always: in science-fiction games, recipes will never be completely natural. No matter what you do, the items in a game like that will be as natural as putting wood and iron together to make a pickaxe. And that's also not what this game should be about.

    So with the current system it's unbelievably hard to learn and remember recipes. If you still did, I'm very sorry :(.


    Basically the basic system will stay the same.

    Here is the short version of how it works now:

    • Only one factory remains (factory input)
    • No fixed recipes are bound to that block
    • put a recipe in the top left slot
    • it does exactly that

    In the old system I originally wanted to make way longer production chains instead of having 4 factories doing everything. But that system requires to add a new block type for every single product there is. This is way to much cumbersome. So I "outsourced" what the factory does into the meta-item "recipe"

    A recipe is basically just that: It takes some ingredients and outputs a block. Out the recipe and the ingredients into a factory and the factory will make that block if you also put in the ingredients. Since there is only one type of block produced by recipe, you will need to chain-connect factories together to create the desired outcome.

    Recipes are pretty much unique and can't be sold. That's why they are a valuable trading asset with other players. The can be found in pirate bases and ruins. And they can also be bought in shops.

    Unlike normal blocks recipes don't require credits to be bought. They require 10,000 (value can be changed by admins) block of the block you are creating a recipe for.
    The ingredients however are random in amount and type, so there are "good" recipes and "bad" recipes. But this highly depents on the player. If you get a recipe that makes sand into hulls, and you don't have any sand, a player based on a sand planed might be very interested in that.

    Higher level parts will prefer manufacturing items as their ingredients, and those are the only type of item-recipes that require minerals/etc to buy instead of the items itself (would be rather hard to gather 10k protein)


    Notable optimizations

    On one side I managed to make lighting calculations faster.
    On the other, saving and loading will now use a new threaded random access algorithm, that will write and read data much faster. So this will hopefully get rid of a lot of sources of lag on servers.

    Please be sure to keep backups, since a change in this part of the engine is very delicate.



    More bug fixes

    - got rid of shutdown hooks: only used in absolute emergency (should never happen, even on crash)
    - server errors are now displayed instead of just shutting down
    - fixed false modified blueprint triggering when adding blocks afterwards
    - fixed "unknown faction" although faction exists
    - added check for ghost players
    - fixed bug where too many files could be deleted when a structure gets destroyed
    - fixed bug that left a invisible version of the mothership if it was removed with docked ships attached
    - fixed bug that turned docked ships into ghosts if mothership was removed
    - missiles now display and update shield hits correctly on the client
    - added notification to re-orientate if rotational system is entered
    - mouse check for GUI elements that are not drawn anymore but were flagged as "mouse inside" will now always deactivate the flag on the end of the frame. This should fix the permanent tooltip bug.
    - improved performance of wedges and spikes by not drawing faces that aren't visible (next to a solid block), in the same way the normal block algorithm already does
    - implemented server option to customize speed of rotating stellar systems (or to switch it off)
    - improved segment(chunk) reading performance by buffering the header for segmentRegions
    - improved segment(chunk) writing performance by also using buffered headers and switching to java NIO FileChannel MappedByteBuffer for random access
    - console&rcon(starNet) commands are now only interpreted as chat broadcast if they start with /chat
    - price of blueprint will now include price of all docked structures
    - shops now safe against missiles
    - blocks of other factions can no longer be activated with docking beam
    - shop spawning can now be customized by admins



    Also you might find a new surprise waiting at earth planets :)



    A video with tutorial for the new factory system will be out soon.




    Thanks for playing StarMade,
    - schema
     
    Joined
    Jul 4, 2013
    Messages
    7
    Reaction score
    0
    • Legacy Citizen 2
    • Legacy Citizen
    Thanks for the Update Schema and I hope the Tutorial for the Factory goes out soon. Since im probably the one of the few who uses factories a lot :D
     
    Joined
    Jul 6, 2013
    Messages
    17
    Reaction score
    1
    Absolutely love the new recipe idea! Love what this will do for trade on large multiplayer servers. Also love the log book; this will be great for rp servers and for communicating when offline etc. Good job!
     
    Joined
    Jul 4, 2013
    Messages
    7
    Reaction score
    0
    • Legacy Citizen 2
    • Legacy Citizen
    How are we supposed to bring the L5 Ores down to L1 Ores now? cause i was going to buy a recipe but it needed 10000 L1 Ore for the manufacturing ingredients i needed but how am i supposed to bring L5 ores down now without the Mineral Seperator?
     

    schema

    Cat God
    Joined
    Feb 17, 2012
    Messages
    1,552
    Reaction score
    2,604
    • Schine
    It\'s not in this version, but I will put in an old fashioned set factory for that specific purpose only: Changing mineral levels
     
    Joined
    Jul 4, 2013
    Messages
    7
    Reaction score
    0
    • Legacy Citizen 2
    • Legacy Citizen
    Thanks, glad to know :D I\'ll be waiting for it patiently and the update did really well to the servers.
     
    Joined
    Jun 24, 2013
    Messages
    2
    Reaction score
    0
    • Purchased!
    • Legacy Citizen 2
    • Legacy Citizen
    I still do not see my SD BB Missiles when I fire them. They simply don\'t show up and then there\'s a giant crater. Not sure if it happens in other situations, but I noticed this both in Single Player, and connecting to localhost.
     
    Joined
    Jul 4, 2013
    Messages
    7
    Reaction score
    0
    • Legacy Citizen 2
    • Legacy Citizen
    The recipes i got were great, but after i left and exited the game. I saw it as unknown item. I tried pressing right click but an error said \"Object is unknown on server... re-requesting...\". I waited for a few minutes and played ignoring it, but it still was the same.
     
    Joined
    Jun 21, 2013
    Messages
    78
    Reaction score
    2
    Log books are great, I am on a mission to locate as many as I can and using them to record Intelegence on enemy factions.

    All I want now is the ability to mass produce these books so I can give faction members copies and sell/trade intelegence with other factions.

    ATM I just have 1 book per faction and keep it locked up in faction home when I am not on a mission to gather info on that faction.
     
    Joined
    Jun 26, 2013
    Messages
    10
    Reaction score
    0
    • Legacy Citizen 2
    • Legacy Citizen
    The idea with the recipe block is very good, but there are problems with it.

    One, there are a lot of items and levels of crafting.
    Do I need a recipe to make the products that each mineral gives?


    Two, I need to have the blocks I want to craft to be able to craft it. How is that supposed to make sense? The player is still forced to interact with shops and buy the stuff. But then, why craft when you can just go and buy the items?



    A better idea is to implement some algroithm that detects the order items are placed into the factory. There is a great way to do this with barely any performance impact:

    Recipes are constant, i.e. never changed anywhere else than in the code.
    Make 3 arrays for the recipes or 1 array with 2 indexes. If 3 arrays, the first array would have every single-ingredient recipe, the second every two-ingredient recipe and the third every three ingredient recipe.

    With 1 array, every recipe is in the only one array and indexes tell us where the one-ingredients recipes end and two-ingredient recipes start (other index is for two end, three start) A recipe would be a string containing every Item ID that needs to craft an item and the product.

    I am pretty sure the inventories are done with arrays/lists so I will assume that.
    You can just make some algorithm to check which items (ID) are in the factories, make them into a string e.g. if Item IDs 63, 86 and 74 is placed in the factory, you can make a string containing \"63-86-74\" and then compare it with the recipes.

    This idea is just a brainstormed idea because quantties were not included and I am sure you got your own system to do these kind of things.

    TL;DR

    Make factory\'s recipes order based. If you place item A and B in slot 1 and 2 and A+B -> C then the recipe for B + A -> D because it\'s not in the same order. Then take that order and just compare with the recipe
     
    Joined
    Jun 20, 2013
    Messages
    120
    Reaction score
    0
    • Legacy Citizen 2
    • Legacy Citizen
    Okay, I like the new recipe system, but...

    When you buy a recipe from a shop, with the 10k of the item in question, what happens to that item? Does it just dissapear? Or does it go into the shop, making it buyable again? Because if the latter is true, then the recipies are still technically buyable with credits, with a minor obstacle of getting 10k of the block in question, which shouldn\'t be that hard.
     
    Joined
    Jun 22, 2013
    Messages
    4
    Reaction score
    0
    • Legacy Citizen 2
    • Legacy Citizen
    Stil getting the eofe exeption when trying to log onto servers tho, it happens so often, will that be fixed in the near future?

    And keep up the great work, love the game so fking much
     
    Joined
    Jan 22, 2016
    Messages
    5
    Reaction score
    0
    I actually liked the old way factories had to be interconnected and arranged. It provided some \"creative\" gameplay beyond the pew-pew and added a purpose of actually constructing machinery and factory buildings. I don\'t think it was too complex, but of course you would have to have either a printout of the recipes, or preferably, some sensible in-game way of looking them up (besides going to the shop...)

    With a graphics update for the factory blocks (I do like the new look of the ingredients!) and some thorough tweaking of the recipes and prices, I think the old system could have been made playable, and even enjoyable.

    The new \"system\" seems just too dumbed down.

    Here\'s hoping that you will reconsider the old factory system!
     
    Joined
    Jul 7, 2013
    Messages
    3
    Reaction score
    2
    This is probably because you\'re looking through glass bocks. For some reason missiles (and the sun) aren\'t visible when you are looking through glass.
     
    Joined
    Jul 4, 2013
    Messages
    425
    Reaction score
    273
    Some limitations with different factory blocks having different available recipes would be nice. This new system will still make for interconnection, but I fear I\'ll be screwed with random recipes like Yhole -> Hull and Hardened requiring L5s. At the very least we need limits on what could be chosen as input for a particular output.

    I\'ll see how it all plays out soon, but I\'m already dreading having to relocate in a game where landmarks are impossible to come by.
     
    Joined
    Jul 13, 2013
    Messages
    5
    Reaction score
    0
    After the first update today, the server was working, i then closed the server and restarted it later before updating, and now it automatically shuts down. According to the logs:

    [21-Jul-2013 17:35:45] STDERR: [ERR] java.lang.NullPointerException
    [21-Jul-2013 17:35:45] STDERR: [ERR] at lY.fromTagStructure(SourceFile:827)
    [21-Jul-2013 17:35:45] STDERR: [ERR] at lY.<init>(SourceFile:108)
    [21-Jul-2013 17:35:45] STDERR: [ERR] at ll.<init>(SourceFile:66)
    [21-Jul-2013 17:35:45] STDERR: [ERR] at org.schema.game.server.controller.GameServerController.initializeServerState(SourceFile:636)
    [21-Jul-2013 17:35:45] STDERR: [ERR] at org.schema.schine.network.server.ServerController.startServerAndListen(SourceFile:335)
    [21-Jul-2013 17:35:45] STDERR: [ERR] at jo.run(SourceFile:841)
    [21-Jul-2013 17:35:45] STDERR: [ERR] at java.lang.Thread.run(Unknown Source)
    [21-Jul-2013 17:35:45] STDERR: [ERR] WARNING: USING EMERGENCY SHUTDOWN HOOK

    In your update you said you removed the emergency shutdown hooks, so why is this ocurring to the server?

    I can\'t seem to do anything to fix it either.

    Any ideas?