Conversation started Sep 17, 2014 at 10:36.
Sep 17, 2014 10:36
I'm trying to picture things
And how to do the branching for the mod-modules
that won't be a problem I think
git checkout -b mod-hearthstone
I want to create a plan for myself
and off which branch to bracch off
I'm thinking about branching off ecs
well right now, ecs would be the best branch to branch off, yes
Sep 17, 2014 10:39
and then create my own test mod
It should be simpler as the game we are implementing, yet covering everything
'covering everything'? what 'everything'?
Well, the ECS system is split up in a core and a mod-implementation, right?
Note that right now, the PhrancisGame.createGame method might be a bit hard to understand and seem complex. It is possible to extract a lot of things to functions, so that you could do AttackYGO.add(game);
Depends on what you mean by core and what you mean by mod.
@SimonAndréForsberg Classes like ECSSystem, etc. are core, and implementations are mod
Could make a separate module for common systems, etc.?
The core is really the cardshifter.ecs.base package, but cardshifter.ecs.actions, cardshifter.ecs.phase, and cardshifter.ecs.resources can also be considered part of the 'core'
because pretty much every mod will use actions, phases (player turns), and resources (creature stats, mana costs, mana, etc...)
@skiwi yes, that's a bit what I was thinking. Refactoring out Mana feature to it's own package/class(es)
Sep 17, 2014 10:44
@SimonAndréForsberg But mana by itself should be mod specific, turns should be in the core, I think
lol, this made me look twice
@skiwi Absolutely. A mod can choose which mana style to use, or no of the existing styles.
So that is kind of settled then once done
Then the hard part is developing your own mods
Of what files does a Java mod consist?
hard*est*
Technically, to make a mod all you need is one method. A method to setup the entities and add components to them, and to add the systems that you want to use.
I imagine that there will be many default-implementations of various systems and features
So we have a setup method
so if you want to gain mana like in Hearthstone, it's a simple method call to Mana.asHearthstone(game);
Sep 17, 2014 10:52
I'm asking this also with Lua in mind, because Lua mods will not use the java build system at all
yes, it's a setup method
depends on what you mean by 'at all'
So the mod may be nothing more than a file (be it a zip for Lua or a jar for Java)
I picture people modding in Lua to not know anything about Java
they can use Java-Lua method bindings we provided to make what they want
Correct, but still unclear to me (probably also because I didn't have time to look into your code thoroughly yet)
There is only exactly one method in the mod that gets called which loads up the entire mod?
@skiwi pretty much, yes.
It's pretty much like a configuration
As all the features has been extracted to components + systems
Sep 17, 2014 10:57
Yes, but the mod needs to also be able to specify its own components and systems
And it will be able to do that
good
So we have a single point of entry
So currently for console and javafx version, we need to specify the directory of the mod, I assume?
@skiwi we need to make it call a method (that returns an instance of ECSGame). How we do that, that's up to us.
Sep 17, 2014 11:00
@SimonAndréForsberg Well yes, I'm thinking about the most simple implementation we can do at the moment
Most simple implementation? Dependency injection. Provide it with a Supplier<ECSGame>
We cannot require Java there
won't work for Lua
And it's then also hardcoded
I'm thinking we specify the mod (Lua uses a zip, Java uses a jar), and specify whether it is written in Lua and Java
sure we can require Java, the client is Java. We can provide a Lua-wrapper method. If we want to make a mod with Lua, we pass it a LuaGameLoader(InputStream)
and btw, the client is pretty much hard-coded for our specific mod as it is.
Well yes for testing that would be nice
Then last point for now
You are developing a mod, say a Java one for simplicity's sake
Is there a way you can as modder test the mod via automated tests?
Like taking over the basic startup tests from the core module, and then add your own integration tests?
While being aware that mod repository only has the mod code and nothing else
@skiwi not at the moment, but there is a way to make that possible yes.
Sep 17, 2014 11:07
What would be required to do so?
I would think publishing at least the core module on mvnrepo and creating tests that have the option to specify a mod
well, you need to make it possible to access the core..
it's solvable, but I'm not sure if it's meaningful to put it up on mvnrepo. At least not until there are some real players and there's a real client (that can support all kinds of mods)
Well, how would you else get the jar?
the old-fashioned way. Download it.
Do we want to do that inside a Maven build script?
of course not
Sep 17, 2014 11:16
Then what would be your plan on that?
I just mean that the initial modders don't have to use Maven
I don't think we should put it on mvnrepo until it's really production-ready, or at least beta-ready
They don't have to, but we would
which is still a loooooooooooong time from now.
@SimonAndréForsberg no I am not much of a graphical designer either
@skiwi what is what thing?
We still need to get the jar into there somewhee
@bazola Would be more helpful if you used the reply-to feature ;)
Sep 17, 2014 11:18
you can install jars into your local maven repository manually
or you can use the old-style 'build-path' to set up a mod-project
@SimonAndréForsberg Yes, but it executes on Travis
I do agree though that we may not want to put up things on mvnrepo now already
you never said that you wanted to use Travis for it!!!
@SimonAndréForsberg Well.... That's technically correct
@skiwi okay I will start using reply-to :)
@bazola But it's the picture I think yo meant?
Sep 17, 2014 11:23
yeah
er no
@skiwi what's what thing?
@bazola Ah, the window in front there
^^ that thing
its the github desktop client
the pc version looks the same though
Can you do anything cool with it, or just see fancy stuff?
Sep 17, 2014 11:26
you can do everything that you can do with the console
sometimes in mac when I do something in the console, it seems to get stuck, so I have used the GUI to fix it
okay
@SimonAndréForsberg I'll leave the discussion at where we are at right now
Will have plenty of things to do ;)
 
Conversation ended Sep 17, 2014 at 11:28.