Facebook Twitter Youtube RSS Steam Login Register
Home About News Pics Videos Downloads Forum Stats Search Buy
Forum \ Modding / Programming \ Request for opinions: Modding & Opening up the source code of Miner Wars




Posted ByMessage
3 months ago by
MarekRosa
CEO & Creative Director
Keen Software House

Send PM
Contributed: $40.00
Affiliate Registrations: 0
Posts: 1,717

Qualification P.: 11 014.2

Spread the word medal - level 3 3D Model contribution medal - level 3 Idea contribution medal - level 3 First adopter award 
Disclaimer: please take the following text just as me thinking out loud. It doesn't represent our actual plan or promises, and the whole purpose of why I wrote it is because I want to know opinions of our community.

---

This topic is about what way to choose when adding modding support to Miner Wars 2081:

a) write a plugin API
b) open 99% of the source code of the game

My problem with (a) is that it's basically a waste of our time. We would have to wrap a lot of code into some plugin API, just because we wouldn't want others to see what's inside that code. And we would have to make this for everything where modding is required. If we explicitly wouldn't write plugin API let's say for shaders, then nobody would be able to mod them.

Then there's option (b). We would split the code into two parts: first is executable, that one would stay as it is. Second would be an external dll file, which would contain 99% of code of our game and engine. You would have full source code for this dll. That dll would be the actual game.
Basically it means, you would have the same access as we do. There will be nothing hidden in front of you. If you want to change some deep stuff in our engine (render, physics, GUI, ...), just do it. Wanna change shader? Change how our AI behaves? Add a new weapon? New mission? Change networking stuff? Change textures or models or sounds? Or make a new game (total conversion)?

How would it work?
- you would need to own Miner Wars 2081 (you still need our executable and art assets)
- install free Visual Studio 2010 Express - http://www.microsoft.com/visualstudio/eng/products/visual-studio-2010-express
- download our source code (probably a zip file, GitHub repository or something)
- open MinerWars project in Visual Studio
- make some changes
- press Ctrl+F5 => Compile & Play
- distributing your mod - just copy that dll file to some other user's Miner Wars folder

Advantages:
- easy to start with - don't have to be a programmer
- C# is a simple language
- total control
- everybody from the team likes this idea (which is surprising, I was expecting that some people will consider it a high risk)

Disadvantages:
- I don't see any... and to be honest, this is weird... I am probably missing something.

Risks:
- somebody can steal our "genius ideas" and our code and make his own game: My answer to this is that after we removed "always online DRM", Miner Wars got on warez within hours, and that had zero impact on our daily sales.
Therefore I am 99% confident that opening source code wouldn't kill us.
Normal people would buy the game anyway - it's way easier then warezing it.
Minecraft' source code is available too (I am not sure if that's legal, but it's available) - and it didn't kill them.

License: it wouldn't be 100% open source - people still couldn't just resell our code, but the license would be as free as possible. We want people to have fun, not to tight them up and hold in a cell next to Zed. Who's Zed?

This thing would be an experiment - I don't know about any other developer who opens his source code just few months after the release. ID Software opened up source code for Doom and Quake, but that was years after those games were published.

Extra ideas:
- people could create whole new games (total conversions) based on our engine
- people could sell their mods - through Steam Workshop / Steam Market - although I don't have experience with these two... I assuming people can sell their mods there? Or am I wrong?

One last disclaimer: opening source code to Miner Wars doesn't mean we would quit with this project. No way. It just means that our team would be working on new features in parallel with the community

What do you think?
+4-0
3 months ago by
smoker93

Send PM
Contributed: $15.00
Affiliate Registrations: 0
Posts: 326

Qualification P.: 1 840.2
The best case scenario:
Some one makes a killer mod and you blow up like DayZ

I have no idea how to make mods but the PC crowd appreciates devs that allow modding.
and successful mods only increase awareness of the game.
so i would say go ahead with B since it's easier and cheaper and only can bring good things.

Unless you sit on some revolutionizing technology.
+0-0
3 months ago by
Ortzinator

Send PM
Affiliate Registrations: 0
Posts: 5

Qualification P.: 7.2

First adopter award 
I thought of a few business reasons why releasing the source would be a bad idea. However, they all turned out to be flawed.

Not sure how you "don't have to be a programmer"?

As a developer who already knows C# and XNA this is really exciting.
+0-0
3 months ago by
xhmmxdraeath

Send PM
Affiliate Registrations: 0
Posts: 11

Qualification P.: 11.4
The issue here will be the same issue the Quake games saw - you can't (easily) combine mods should you wish. With API plugins, you'd only have to worry about conflicts between different plugins trying to modify the same object/file/whatever-you-call-it.

Option B is certainly the most easy to implement, but then any mods that people want to combine have to be done at the code level, and built.

This really becomes an issue because lots of people want to change just one thing or two, while the users will want to pick and choose among them. Instead, you will only have those massive compilation projects (consider Fallout 3's Wanderer Edition, a rather huge compilation project). Developing such a thing would become much more painful.

Something else to consider - when you say open, do you mean Open? Have you put any thought into licensing?
+0-0
3 months ago by
MarekRosa
CEO & Creative Director
Keen Software House

Send PM
Contributed: $40.00
Affiliate Registrations: 0
Posts: 1,717

Qualification P.: 11 014.2

Spread the word medal - level 3 3D Model contribution medal - level 3 Idea contribution medal - level 3 First adopter award 
don't have to be a programmer - for a simple change (for example changing radius of an explosion, difficulty settings, etc) you don't have to be a programmer - just a bit more advanced user who can find that constant and change it. This is actually really easy - I have seen it during the development, we let everyone in the team (artists, level designers...) to access the source code, so they were able to polish these little things. Downside was that since they didn't understand it enough, they usually broke a thing - but this won't be an issue here, you would just broke your mod, not the main code repository

merging mods - it will be possible if people would share their code changes on that repository system and from time to time release a merged mod. People who work with systems such as SVN or Git knows what I mean. I agree, other then this, it would be harder. But you would have access to everything so this advantage should compensate this disadvantage.

License - it wouldn't be 100% open source. The way how I understand term "open source" is that anybody can do anything with that code, even sell, etc. We don't want this, but at the same time, we want people to play with it as much as they want. The bottom line is, it would be "semi open source" with only one limitation: you can only distribute that code if your intentions are that it would be a mod for MW. Or something like this, I will have to think it through.
+0-0
3 months ago by
xhmmxdraeath

Send PM
Affiliate Registrations: 0
Posts: 11

Qualification P.: 11.4
Just be very careful how you license it, because a wrong choice can effectively cripple modders (making the point moot), or put far more permissions out in the open than you intended. Also, be aware that linking (loading DLLs) needs to be handled specifically, otherwise you may put yourself in conflict with your own license. Eg, if you tried to GPLv3 the game code, but load it into the launcher, you would run into issues. (the correct course had you wanted GPL, would have been LGPL, which is GPL intended to let non-GPL load your objects)

Generally though, you want to find an established and commonly used license to apply, since those are generally more understood, and should the worst happen (court) things shouldn't be as up-in-the-air.

I leave the rest to the lawyers :)

I really do like what you're trying to accomplish. I hope you figure it all out!
+0-0
3 months ago by
evtmine

Send PM
Affiliate Registrations: 0
Posts: 260

Qualification P.: 722.6

First adopter award 
This looks like a very good idea to me.
+0-0
3 months ago by
AdamSkvor

Send PM
Affiliate Registrations: 0
Posts: 1

Qualification P.: 1.0
I realy appreciate this, it would be great motivation for learning C#
+0-0
2 months ago by
AlterFox

Send PM
Affiliate Registrations: 0
Posts: 413

Qualification P.: 1 020.0

First adopter award 
:D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D

Fox is currently unable to express himself, gushily or ungushily, so we present this brief interlude:

How much are you guys willing to bet that the first mod made will just add trichording?
+0-0
2 months ago by
Pysiu

Send PM
Affiliate Registrations: 0
Posts: 36

Qualification P.: 39.0
Definately the option b however i am amazed that you are even considering this (it`s usually not liked by Devs):)
+0-0
2 months ago by
l00ck

Send PM
Affiliate Registrations: 0
Posts: 9

Qualification P.: 9.8
yes b would be great, Iam guessing that you would get a little bit press if u are going to do this and through that more sales (just guessing). Another positive thing about this is, that you could add "mods" to your version of the game which are made by users(the ksp team is going to do this atm with partmods) so the game could grow and you could focus on other stuff that u wanted to impliment or the mmo.
And yes with GIT it would be a little bit hard for common users to merge branches, however i think ppl at the forum could help them with that.

Every time i had problems with licensing & this stuff the guys over at freenode #gnu where helpfull (most of the time at least).
+0-0
2 months ago by
guss

Send PM
Affiliate Registrations: 0
Posts: 2

Qualification P.: 2.0
I can tell you one thing that I am worried about if (B) happens is compatibility. Say two modders make their own mods that end up being very different and both are very good. How can you combine them? Will you be able to incorporate them together? or would they would have to work together to make a single good mod? Or will you guys be monitoring what comes out that you like and implementing it in the next update? I guess I'm thinking about all the Linux versions that are out there that are not really compatible with each other. Individually they all have some great features and it's too bad there isn't one version that combines the best out of all of them.

The other aspect is multiplayer. If a person is hosting a server with Mod A, everyone who wants to play on that server will have to download Mod A. Will there be a central place to download these files? Or will each person have to know the modder so that they will be able to get the files necessary to play it from the modder? Or the modders will have to host their files themselves? I don't know how that works.

Just my thoughts, I'm not a programmer so I don't know how all this stuff works. I just don't want to see a good game chopped up into a bunch of different mods that no one has access to and aren't otherwise compatible with each other.
+0-0
2 months ago by
MarekRosa
CEO & Creative Director
Keen Software House

Send PM
Contributed: $40.00
Affiliate Registrations: 0
Posts: 1,717

Qualification P.: 11 014.2

Spread the word medal - level 3 3D Model contribution medal - level 3 Idea contribution medal - level 3 First adopter award 
Merging two mods has to be made by a person who knows how to merge them.

Difficulty of this process depends on how much do these mods differ. For example when we are developing our code, we "commit" our changes to repository once in a while. We always commit only what has changed (new lines of code, deleted code, edited code...).

So before you commit your changes, you are basically having your own mod.

Back to the beginning - if those two mods are made of independent features, merging is simple - this is where GitHub comes in very handy.

Multiplayer - currently you will have to get Mod A files from its creator. It won't work automatically. We were thinking about making a "mod market" for this in future if there's a need.
+0-0
2 months ago by
RapeWhistle

Send PM
Affiliate Registrations: 0
Posts: 2

Qualification P.: 2.0
Already modifying a few things to suit my playstyle more... looking like it wouldn't be too terribly difficult to build a version of the game with a slider-menu (alternate cheat menu?) that allows people to customize some of the basic values (base speed, base force of engines, difficulty of AI).

One thing that's bothering me, however: Most of the FoundationFactory code is completely outdated and the commented sections aren't meshing up with the built-in editor's changes. This is my preliminary observations, and you can't expect to understand all of a game's code within a few hours.

No, no. That would be unrealistic. I only understand most of it. :P
+0-0
2 months ago by
MarekRosa
CEO & Creative Director
Keen Software House

Send PM
Contributed: $40.00
Affiliate Registrations: 0
Posts: 1,717

Qualification P.: 11 014.2

Spread the word medal - level 3 3D Model contribution medal - level 3 Idea contribution medal - level 3 First adopter award 
@RapeWhistle

Yes, most of the foundation factory code is outdated. This area is something we are working on right now, but we are going to redo it completely...if I was you I wouldn't touch it in Miner Wars 2081.

There's one more thing to play with: if you go to cheat screen (Ctrl+F1), there's a checkbox "Enable developer keys" (or something like that). Once you check it, you can use keys such as F8, F9, ... to switch to different camera. But the best is F12 - which will show you a developer screen with buttons and such, and there you can tweak ship parameters, render settings, etc. It's not very intuitive screen because it was really used only by programmers, but people can have fun with it. Just don't forget to press "alt key" while browsing in F12 screen.
+0-0
2 months ago by
RapeWhistle

Send PM
Affiliate Registrations: 0
Posts: 2

Qualification P.: 2.0
Oh, neat! I was more or less browsing all the individual files, and didn't run into that one. Maybe we can give that dev menu a good sprucing up with a way to synchronize in a multiplayer game? Like, host can set parameters for custom gametypes basically? Just a thought to keep from everyone downloading tweaks and what-not. Allow certain parameters to be set by the host of a game and the client changes accordingly...
+0-0
1 months ago by
d3x0r

Send PM
Affiliate Registrations: 0
Posts: 40

Qualification P.: 68.0

First adopter award 
Might be nice if this forum were opened up for more threads....

been poking at this on and off for a bit. Got pretty close to how things are draw, but I'm still missing something somewhere... that is, if I want to add a new thing to be drawn, how do I draw it? I see a few things that register as drawable (background cube for instance), but I'm really not finding what draws a ship. (but I guess the thing to add is more of a gui control than a model like a ship)...

---- Edit+ -------------
Also, I cannot connect to editor with built version? Makes it sorta hard to edit things?

--- Edit++ ----------
http://sharpdx.org/forum/5-api-usage/883-alt-key-pause#886 <-- how to make alt a functional key for game. Ya I realize you have other purposed this for accessing mouse-mode displays. Don't know what they mean by 'the form' but I'll get there. I've been playing Star Conflict and up/down is space/alt sorta like jump/crouch got really used to that pretty quick.
(Edit 04/23/13) in public GameWindowForm(string text)
add ControlBox = false; (loses system menu with minimize,resize,move,etc...)
or after new GameWindowForm( "..." ), add gameWindowForm.ControlBox = false;
+0-0
29 days ago by
d3x0r

Send PM
Affiliate Registrations: 0
Posts: 40

Qualification P.: 68.0

First adopter award 
So glad you all are active on here...
+0-0
26 days ago by
MarekRosa
CEO & Creative Director
Keen Software House

Send PM
Contributed: $40.00
Affiliate Registrations: 0
Posts: 1,717

Qualification P.: 11 014.2

Spread the word medal - level 3 3D Model contribution medal - level 3 Idea contribution medal - level 3 First adopter award 
Hi d3x0r,

1) you can't open a new topic in "Modding / Programming" forum category?

2) Editor - I don't understand... editor can't connect to our server?

3) Drawing things - this is hard to explain, but look for classes that have "GUI" in their name.
Those are used for GUI stuff. If you are familiar with OOP (object oriented programming), it will
be very intuitive to you.
+0-0
25 days ago by
d3x0r

Send PM
Affiliate Registrations: 0
Posts: 40

Qualification P.: 68.0

First adopter award 
Hello1....

Hi d3x0r,

1) you can't open a new topic in "Modding / Programming" forum category?
Nope, there's no 'Post Topic' button like other categories....

2) Editor - I don't understand... editor can't connect to our server?

I compiled the clean code(one minor issue there's missing , ran it, it launched, says I'm 'not connected' on my profile, and clicking editor fails to connect to server. NETWORK ERROR\n\nPlease try again. [ok]


3) Drawing things - this is hard to explain, but look for classes that have "GUI" in their name.
Those are used for GUI stuff. If you are familiar with OOP (object oriented programming), it will
be very intuitive to you.

The GUI objects are based on Controls... which are iterated in the renderer... somewhere polygons of some sort are fed to DirectX... I'm really looking to go up from the bottom, going down from the top levels all I run into is abstractions. I have custom controls already, with shaders for their job... just trying to fit in additional controls. Like Normally a control as a event delegate or a member to override to do a Draw.... but in this case I think somehow controls contain a ... ahh okay tracing that down, it has textures, which are drawn as sprite batches. *sigh* Well it's a start....

Well that solves gui, but doesn't solve ships and shapes, I got as far as that they have a shape that's loaded, and then *magic happens*...
+0-0
25 days ago by
MarekRosa
CEO & Creative Director
Keen Software House

Send PM
Contributed: $40.00
Affiliate Registrations: 0
Posts: 1,717

Qualification P.: 11 014.2

Spread the word medal - level 3 3D Model contribution medal - level 3 Idea contribution medal - level 3 First adopter award 
ad 1) It should be fixed now, please try again

My colleague Ondrej will try to help with the other things...
+0-0
25 days ago by
OndrejPetrzilka
Programmer
Keen Software House

Send PM
Affiliate Registrations: 0
Posts: 63

Qualification P.: 69.8
QUOTE:
2) Editor - I don't understand... editor can't connect to our server?


User sectors are saved on our server, but mods can't save user sectors to our servers (security issues, version problems, etc...)

To be able to open editor, you can modify source codes, open file MyGuiScreenMainMenu.cs, find method:
public void OnEditorClick(MyGuiControlButton sender)

and replace this line:
else if (!MySteam.IsActive && !MyClientServer.IsMwAccount) // Demo user...generate sector 0, 0, 0. User cant save.
with this:
else if (true) // Demo user...generate sector 0, 0, 0. User cant save.

You will enter editor, you can press Numpad0 to fly the ship, but you can't save sector.

To save sector, you'll have to modify source code and write sector to file (and also add loading from file to be able to open it in editor)
It's really not that hard (good start it MyEditor.SaveSector, MySession.GetCheckpointBuilder and MyLocalCache.Save)

If you have any question, ask :)
+0-0
25 days ago by
OndrejPetrzilka
Programmer
Keen Software House

Send PM
Affiliate Registrations: 0
Posts: 63

Qualification P.: 69.8
QUOTE:
Well that solves gui, but doesn't solve ships and shapes, I got as far as that they have a shape that's loaded, and then *magic happens*...


Shapes...it's more like 2D textures (sprites) draw on screen or in 3D space (billboards).
Adding billboard is done using: MyTransparentGeometry.AddBillboardOriented

Drawing models is complex task, what do you wan't to achieve?
Easiest is to create new model in 3dsmax, export as FBX, use tool (see readme_content) to build model and than replace one of existing models.
+0-0
25 days ago by
d3x0r

Send PM
Affiliate Registrations: 0
Posts: 40

Qualification P.: 68.0

First adopter award 
Thanx, will have to experiment later.

I just wanted to have an overall understanding of what was done where and a general flow from disk/server to screeen and all points inbetween. I'm pretty good there so-far. I'll start another thread if I come up with anything else.

without knowing what IS, it's hard to know what I need/want to add :)
+0-0

All times are UTC/GMT. The time is now Saturday, May 18, 2013 9:33 PM





Home | About | Affiliate | Frontline Developer | News | Pics | Videos | Downloads | Forum | Stats | Contact | Newsletter | Store | IRC | Wiki


Copyright © 2008-2012 Keen Software House a. s.
Miner Wars™, Miner Wars 2081™, Miner Wars MMO™, Miner Wars Arena™ are trademarks of Keen Software House a. s.
Terms Of Use | Privacy Policy
Feel free to use the pictures, videos and texts from this site to advertise or preview Miner Wars.


Website Design by FullyIllustrated
Loading...