Mike Daily posted an amazing blog on depth based mouse collision. Had to share it! This is something that I believe everyone will need to know in one of their games, eventually. So check it out HERE!
Goal: A 1.0 Playable Multiplayer ALPHA Version!
Finally! Another main feature of the game has been added: Crafting. This wasn’t terribly difficult since I’ve already had much of the machanics for crafting already in the game, only used by other things. For instance, the same script that checks if there are enough resources in the player’s inventory for base building is the same script I use to check for crafting. I also use the same script as I use for base building to remove ‘x’ amount of items from the player’s inventory. The hardest part here was just getting the GUI up and running, which is tedious work that I’ve done hundreds of times.
The crafting is seperated into different categories. When you find an item you want to make, you simply click craft. The server will then check if you have enough resources. If you do, it will then remove those resources from your inventory. Then after you wait whatever the crafting time on that item is, it will appear in your inventory!
Arms have been removed from the body sprite. This means arms can be doing one thing, while the body and legs are doing another. For instance, we can swing a weapon and the arms will play the proper animation and walk at the same time. This completely messed shirts up. So I’ll have to resprite them, and also include swinging animations on every shirt.
This also means, if I want it to look right, I have to make animations for every holdable item for every action and every direction…
~ If the cursor was over the inventory when you closed it, it wouldn’t allow you to left click and use hotbar items. I fixed this.
~ Fixed other cursor glitches – I’m sure there are others lingering around.
~ Fixed glitch where dead npc’s were still spawning as if they were alive for new players.
+ If NPC’s are walking when player logs in, they won’t pop around like before, but will be walking.
+ Added another option to NPC’s behavior. They now will sometimes just stand and do nothing. Fun.
+ You can now throw items onto the ground from your armor slot.
+Damage numbers now appear when you attack NPC’s.
+ You can move (x) amount of items from a stack onto other stacks, or split stacks into new stacks.
Needed features for v1.0
Here are many of the features that need to be complete before we have a working v1.0 Alpha Version! These are not all of the planned features for the game, but only the ones that are needed to be working before we enter into the testing phase!
- Complete and Expansive Crafting System
- Expanded combat system – Guns & ammo, bow & arrow, etc
- Stat Bars should all work – hunger, thirst, etc…
- Chatroom Overhaul – Add colors, local/global chat & other features
- Farming & Gardening – Ability to plant and grow food
- Base Building should be fully functional – Doors, windows, locks, beds, protective zones around bases
- Looting System – Lootable corpses… Also will affect campfires, furnaces, etc…
- Improved lighting system
- Procedural generated map
- Working serial key system
- Server lobby overhaul
- Main Menu overhaul
- Sound track
- Multiple playable races and planets
- Expanded NPC’s
- (Maybe) Complete graphic overhaul! – I may break away from the ‘rpg’ look and move towards a style like Rim World.
Sign up for free Alpha version key
Goal: A 1.0 Playable Multiplayer ALPHA Version!
Server Side Combat
Up until now, most of the hitting of nodes, other players and walls has been done client side. When you used a weapon or tool, it would create a slash effect, and at a certain frame it would create a hitbox item and if there was a collision with a certain object, it would tell the server it’s hitting something and the server would respond appropriately (do damage, gather resource, damage a wall, etc)…
Obviously, this could be abused by hackers so I’ve fixed this up!
It’s now handled completely server side. When you use a tool or weapon, all the client does it tell the server that you want to use a tool/weapon.
The server then
1. Sees if you can actually use that item.
2. Checks players cool down (so they can’t spam attack)
3. Calculates where the hitbox should be
4. Checks if there’s a node, player, base wall, etc at that position
5. Runs the appropriate script (damage player, damage wall, gather resource)
6. Lets clients know what’s going on.
This is a lot less messy, and has made about 15 scripts obsolete since the client doesn’t have to let the server know everytime he hits a node, tree, player, etc… 🙂
NPC’s – Farm Yard Animals
Attacking & Killing
Farm Animal Drops – New Items
Hitting dead animals with a tool will give you items. Depending on what tool you’re using will determine how much loot you get! I went ahead and added the following items to the game: pork, steak, chicken, bones, feather, leather, fat and wool! Now that we have all these new resources (and ways to obtain them), I can start working my way towards crafting!
Better Collisions & Path Finding
Barn Animals now consider resource nodes, walls and players and will no longer walk through these things. If they collide with something, they’ll try to find a better path rather than mindlessly walking into them. Also, when they are hit or take damage they will attempt to run away.
Players also collide with Barn Animals (and nodes) and will no longer just walk through them.
I’ve added appropriate sound effects to the animals for when they get hit, or if they die. There are 3 hit sound effects per animal, and one death sound.
A special thanks to Cole Monpas on YouTube for suggesting this new wall style. He also sent me a project file of his own. Though I didn’t use his code, I certainly took his suggestion and I think this style makes a lot more sense for now!
Sign up for a free Alpha Key
Since a lot of people are following this project (some on and off) I’ve decided to go ahead and start allowing people to sign up for free Alpha version keys. You will receive an e-mail once the alpha is released with a game key and download link once the Alpha version is ready to be played. Feel free to sign up while keys are available!
Sign up for free Alpha version key
~ Did some upgrades to the code behind resource nodes so they can support more than only 100 at a time
If you’d like to join our alpha testing phase of the game and receive a free alpha serial key, let us know by joining our mailing list!
All who join will receive a free serial key to play the game once our alpha is released.
Sign-Up For a FREE Alpha Key
Current Version: 0.4.8
NPCs / Farm Animals!
So far all they do is walk around and occasionally stop to eat grass.
Here are some planned features with these guys:
– Chickens will lay eggs which can be used as food / hatching more chickens
– Cows can be milked and used as food/hydration
– Sheep can be sheered for their wool to craft and make clothing and other items
– All animals can be killed and harvested for their meat + other resources (feathers, hide, etc)
– Farm animals will be tamable and will follow you for a short time when tamed
– You will have the ability to breed animals and potentially have your own animal farm!
– Perhaps… Mountable horses in the future? 🙂
This is all still a work in progress, and I can’t tell you how much will actually be done before I release a playable alpha.
Also, this gives me a huge step forward towards making enemy ai, and overhauling the combat!
Thanks for all the input in the last video. I really got some great ideas that I will be unvealing in future videos!
Placing items with base building will now cost resources. Repairing your base will also cost resources. This new script also allows me to start implementing crafting as I can now remove “x” amount of resources from the players inventory.
Damage, Destroy, Repair & Upgrade…
You can now damage, destroy or upgrade your walls and foundations!
There is now a new movement system in the game. The system handles collisions very smoothly.
The server and client should also better agree on the position of the player & slaves.
Also fixed a glitch that was passing up the players walking sprites when changing directions, making the player moonwalk.
For the sake of testing, the server can now display a lot more information. You can basically see a rough view of the game world now. This help me a lot when implementing the new movement system. I might remove or expand on this depending on any server performance issues it gives me in the future. Either way, it’s very nice seeing exactly what the server sees for now! 🙂
~ Fixed inventory glitch that was crashing the Client when you moved items around
~ Fixed skin tone glitch that was making some tones look really wonky
~ Updated the stone axe sprite.
+ Servers can now send clients error messages
+ Server has a new command “/resetserver”, this will clear ALL files (player files, server saves) at once and have a fresh server.