Thanks @onekit
applying force after fireball attack is a great idea
Regarding second I’m not sure yet how items drop will looks like. I have two options, dropping on the ground or pickup from dead bodies. I’ll make use of Your ideas and code but it requires a little bit more work to integrate with current logic (I’m not removing dead entities from simulation and I’m replicating them to the observers)
Thanks again
The scope for creativity here is really vast. The main thing is to ensure that excessive detailing doesn’t start to hinder the core gameplay. Additionally, flies could start to swarm over corpses that have been lying around for a long time. As long as it fits within the main narrative of the game. I’m just throwing out ideas, and you see the overall picture. Keep watchin devlog.
Hello,
I’m working on inventory system. So far i implemented few things:
- inventory UI, displaying slot items and currency (dust)
- monsters drops items or dust (gold)
- player can pickup item from the ground
- not picked up items disappear after 30s
still TODO:
- dropping items on the ground
- drag and drop for inventory items for dropping/replacing in inventory slots
- investigate why picking up to showing item in the inventory takes so much time (edit: already found it. It turned yesterday i put manually 2s sleep to test if new async tool isworking properly)
- more properties of the items - in future
Hello,
I finished work on inventory system, this is the list of supported features, which I added while working on it:
- monsters have a chance to drop items/currency
- dropped items with name labels are displayed on the ground
- inventory UI with currency and items slots
- players can pickup items/currency from the ground. Picked items are displayed in the inventory
- not picked up items are removed after 30s
- items can be moved between inventory slots
- all picked up items are immediately persisted. In case of server crash they wont be lost. Saves are performed asynchronously and are not affecting engine loop. Players are seeing persisted inventory state.
UI changes are written in MVI pattern. I really like it and i think it suits well for online game. I will rewrite other UI parts to this pattern.
Also while recording this video i found one bug. Dropped item removing counter is not cleared after item pickup. So if player will drop it again within 30s, item will disappear earlier.
Hmm. What about character slots - or dynamic character slots. Of course, items do change player stats. Or worse: an item put into another item’s slot change its stats. Like ammo: if ammo is placed into a weapon’s ammo slot, player should of course reload (incl sound, animation,…). So wait: is “ammo” an item now or is it a property on a weapon…? At some point much later you realise: I need intecepting logic because some other game state can prevent some character slots from accepting items…
Inventory system (including classes for handling side effects, etc.) ranks top 3 in my bug tracker. It has the highest unit test coverage and is split into TransferMediator, TransferBuilder, TransferExecuter, OwnerInventoryCRUD, SideEffectsHandler and a list of transfer rules. Funny enough, UI integration is rather straightforward with Vue3.
I hope I have to never gonna touch it anymore.
@Joe_Kerr
Yes, You’re right. There’re some other things to add (items stacks, inventory sounds etc) or improve. What I meant was I finished work on the stuff I planned, which are basic inventory functionalities. I don’t have any experience in game development and even frontend stuff (99% percent of my experience is a backend).
Pretty much what I’m doing now is working on each most important game feature in the basic acceptable form without spending too much time on the UI quality. This way I’m discovering problems, experimenting with architecture, learning…
When I’ll finish next few systems I’m planning to rewrite some parts of the client and server to new architecture (I discovered few important issues/improvements with current one), work on server and client stability, tests and then incrementally improve current systems, work on the UI etc.
I keep few backlogs for future like ‘improvements’, ‘performance’, ‘main features’ etc. And If I’ll still working on this project I’ll revisit them. With current knowledge I’m not able to work on the features from 0 to 100. So I’m doing it in the incremental way.
ps: equipment slots/stats I’m treating as a separate features
Hey,
Next two systems in the prototype shape are added:
- Quest system (+ concept of async game event managing system) YOUTUBE
- Character statistics with some stat effects on dmg/hp/mana YOUTUBE
To make short break from feature’s work I focused a little on the performance. I created simple objects pools for entity’s dynamic textures and for instanced monsters (3 meshes for now). I gained a little bit of performance and fps is more stable when running around the map and displaying/hiding new entities. To make it more fluid I think I’ll need to load meshes one by one or in smaller batches, because apparently several calls to async methods have too big impact on the fps.
Next thing which I started are VAT instances. It started with funny false start (LINK) but I managed make it work partially. Performance looks promising. with around 250 monsters (each is playing some animation) on the screen fps is around 55-60.
Still what I need to figure it out is to how run vat animation without the loop. And probably there’ll be some other problems to solve…
btw I’m using AMD 4500U with integrated graphic card
PERFORMANCE TEST WITH VAT:
~250 monsters instances
600+ monsters instances:
So cool buddy!
It’s really cool
Are the draw calls made through the HP GUI?
You can hide monster’s HP bars if they too far(like 15+ m).
And check this post about VAT Baked Texture Animations with Animation Groups? - #39 by Alexander_Sosnovskiy
Are the draw calls made through the HP GUI?
@11128 I’m not 100% sure what You meant. U had in mind hp bars on monsters? Regarding draw calls, number of them are almost identical to number of visible monsters (right upper corner on the screenshot there’s debug window). So I think each of it corresponds to monsters and some others meshes of player and other environment elements.
You can hide monster’s HP bars if they too far(like 15+ m).
@Alexander_Sosnovskiy Cool idea
Regarding link I saw it Your code helped me a lot. But I think still there’s no solution for running animation only one time.
Hi @Maiu You can try deciphering how I do run an animation only once. Everything is in this file: t5c/src/client/Entities/Entity/EntityAnimator.ts at main · orion3dgames/t5c · GitHub
Thanks! @oriongu for sure I’ll take a look on this.
Yesterday i tried to learn a little bit more how these VAT animations are working and as far as I understand, it should be quite easy to add ‘no loop’ functionality. Looks like it’s matter of adding additional property to the shader and clamping frame variable to the max value when time factor is > 1.0.
I tried to run some prove of concept implementation but it didn’t work, I wasn’t able to override shader (I thought it was possible and maybe it is ) but i failed. Not enought knowledge yet to do this.
It was similar to what Alexander_Sosnovskiy was trying to say, but it was about whether drawcalls can be reduced.
It is expected that monsters, made up of VAT instance, will not increase draw calls
So, if the HP bar is the main drawcall increase factor, if additional restrictions are placed on it, an even more explosive increase in the number of monsters can be expected.
@11128 I validated it and You are right. These draw calls comes from dynamic texture from monster entities. Anyway I’m wondering if it’s possible to mark Advanced dynamic textures as AlwaysActive to decrease time spend in active mesh selection. marking mesh alwaysActive for which texture was created doesn’t change much.
I think in the future I’ll go with what Alexander proposed but to make it work I need some spatial hash grid algorithm on the UI side or/and potentially I can render these hp bars and name in FullScreen texture. As I checked some game are doing it. I think it will be super cheap to render.
Edit:
Or second option is to render hp bars only for monsters with aggro on the player.
Hello Adventurers!
This was very productive week I designed game items model and added equipment system (still missing visual effect part). To make it work i needed to rewrite current inventory, drop, pickup system to the new design and to be honest I really like the current design it’s clean and easy to extend.
This is short description about items model:
- Item category (weapon, armor, jewelery, consumable, jewel)
- Item rarity (poor, common, uncommon, rare, epic, legendary)
- items subcategories (rings, head, necklace, mainhand, offhand etc…)
- armor category items have defense bonus
- Bonus stats options
- Bonus dmg option for weapons(defense for armor)
- Equipment system (missing visual part), equipment affects player stats, player stats and defense affects dmg dealt/taken
- max 2 stat bonus options per item + weapon bonus
- bonuses assigned randomly
as usual video presentation of items and equipment:
Apart from those two things I fixed/improved/added several other things.
This is almost whole list (I tried to not forget about anything):
- support for consumable items (mana potions, health potion, food)
- potions on the ability bars with visible count (working hot key)
- added ‘food item’ (regenerated hp over time). also can buy it from vendor
- autoregen system for health and mana
- special sounds for jewel/jewelery items pickup/drop
- new general(common for inventory and equipment) item tooltip
- monsters levels
- hp, dmg of monsters depends on level
- currency drop, exp from monster depends on monster type (moster types have dedicated lvl range assigned)
- button for hiding debug window (window should be invisible by default in prod build)
- persistence of player position after logout
- concept of private (replicated to the owner only), public (replicate to all), internal (not replicateable) entity components in the engine. Including replication logic
- added new boss monster
- added new quest for killing boss
- monsters death sound
- npc greeting, farewell voice
Right now I’m really close to exposing demo of the game. Before it i want to implement items upgrade system, add death of players, abilities mana cost, several minor fixes and stuff closely related to the demo itself like saving logs, gathering some metrics about traffic, perhaps serving gzip assests.
Bye!
Amazing progress !!! keep us posted
Seems amazing, great job, the only thing that I feel is missing is having some proper buildings around in your scene.
Also curious if something like this is playable on mobile?