« first day (2919 days earlier)      last day (2395 days later) » 

14:24
Hello chat!
howdy
ahoy! o/
Summer is slowly going away :'(
it's migrating to australia
14:37
Good. It's been way too humid.
it's been getting practice in for the southern hemisphere
doing a warm-up, if you will
@doppelgreener -_-
That will be pretty odd for me when I'll celebrate Christmas and new years day in the summer..! I'm not there yet, though!
I used to watch this guy mix while the sun was raising at my place, and setting at his place, it was pretty fun!
15:10
Are there any good concepts for a component / modular based monster/item system in java ? How would you guys do something like that, without coding a own class for every single item / monster ?
@genaray How are you going to make different functionalities without different classes?
@AlexandreVaillancourt for me celebrating christmas in the winter is pretty unusual :)
i've only done it twice so far!
@Garan Honestly dont know what you mean...
@Garan genaray isn't talking about using no classes at all, just using composition so that different game entities ("skeleton" vs "stronger skeleton") don't have a 1:1 relationship with class definitions
why would you need a class for every item / monster?
15:15
You wouldn't
@doppelgreener Exactly ... an example is unity... you can just attach other classes to existing objects which call themselves to modify game data
i imagine a lot of items are just blocks of stats with a list of attached Effects
@genaray This guide was recommended to me a short while ago and it's been very helpful at filling in the blanks: gameprogrammingpatterns.com/component.html
and Monsters are also blocks of stats and attributes with possibly a list of attached behaviors
If the only difference between skeleton and stronger skeleton is the values of their stats, why not just have different values for stats?
15:16
But what if you want each item to have a unique ability ? One does spawn monster, other one is used to open a door... next one destroys monster around you... but those abilities could be apllied to many different items
Also, Evolve your Hierarchy was the basic introductory guide to the concept & why we have it that didn't tell me the implementation details that the Game Programming Patterns site tells me.
@genaray Then at the very least you'll need a different class for each.
Or, you use a long list of flags a given item has.
you don't know that "each item has an unique ability"
@genaray You would compose an item and also give it a behaviour component suitable for the ability you give it. One might be a spawning behaviour, another might be an AOE component, but e.g. the fire sword and ice hammer might both share the normal damage component but with elemental capacity.
for example, you could have have 15 different swords that "set things on fire"
and one of those swords also "lights up the room", and it can't inherit from both FireySword and BrightSword at the same time
which is why people stopped using inheritance to model this stuff in the first place
15:18
@Jimmy all my weapons likely have a "deals damage to things it hits" component, with various damage or element types set -- for the normal weapons the element type is always 'none' or 'normal' or whatever i call that
@doppelgreener Thats what i mean... should i use generics for that ? :P
so all my 15 fire swords are using the same component as all those other swords, but with a "fire" configuration set for the damage, and a "fire" particle effect added to the graphics
@Jimmy What you'd probably then want is an "on hit" object that is called whenever the weapon deals damage. Most might have an empty class for that but the ones that set things on fire have an object that applies the "on fire" status to what was hit.
@genaray you will likely be using generics for part of this. you should check that games programming pattern thing i linked, and the evolve your hierarchy article.
but it is not a thing where "you use generics" and solve the whole problem, there's lots of things you'll do for this and generics is one of the tools that you may use.
@doppelgreener alright thanks :D
15:20
I feel like your best bet would be interfaces rather than classes. You can mix those, but the key here is ensuring that your components have a definition for things even if that definition is defined as "do nothing".
So everything has a "use with" function, but only the Key will check if the target is a door and if it is, will open the door.
@Garan that sounds like a viable way to do it, interesting. so i could add SFX for using a weapon that apply at various points of using it.
yeah typed event handlers seems like a good way to model that
Also found this here : codereview.stackexchange.com/questions/163215/… seems to be pretty good too :)
@doppelgreener Yeah, that's why I did not say "weird" because that's the "usual" for some. But you're lucky to have "tried" Christmas during the "other season".
e.g. in Dead Cells, there are...
- swords that throw a potion when you first swing them
- shields that shoot an arrow when you first pull them out
- weapons that burn/poison enemies that get hit by them
- shields that do something special when you successfully parry
- weapons that do something special when an enemy specifically dies from a hit by that weapon
So you could define "onActivation", "onHit", "onParry", and "onKill" events. To create a weapon you assign it a number of SFX, and almost all melee/ranged weapons have an SFX that listens for the "onHit" event and deals damage to whatev
15:30
I haven't had summer christmas, but I've had equatorial christmas, which I imagine must feel similar
@Jimmy equatorial regions are generally just summer all year round, so probably yes :)
Yeah, that's most likely what will happen to me some day. Go celebrate Christmas in an all inclusive resort or something.
15:47
A wild Almo appears ...
16:38
Anything good in the new indie book bundle?
@AlexMitan Haven't looked in depth.
17:00
@AlexMitan Looks like the most interesting book in that bundle (for me) would be the "Level up" one. And amzon.com users say it's good.

« first day (2919 days earlier)      last day (2395 days later) »