Page 1 of 1

[Code] Editor to Linux & Mac OS X

Posted: Mon May 23, 2011 11:01 am
by fb_eelis
[Code] Editor to Linux & Mac OS X:

The task includes porting the Frozenbyte Editor to Linux and Mac OS X.

Description:
Modifying the editor code to be less Windows dependant and to eventually build and run on Linux and Mac OS X. The specific details of how this could be accomplished, such as which cross platform libraries to use, would require further planning.

Why:
Increase the possible contributors. Many people like to use their preferred OS whenever possible.

When:
This is likely a fairly large task so the time scale would reflect that. Depends on how many people are working on it too.

Special skills:
Programming and access to a variety of machines and OS installs.

This task could be broken into mini tasks.


Comment on this thread if you want to do/be part of this task. Multiple people can work on this since it is fairly large a task. The contributor most interested on working on this task can be the lead designer who can break the task into smaller pieces for others to work on.

Re: [Code]Task: Editor to Linux & Mac OS X

Posted: Mon May 23, 2011 12:40 pm
by alt_turo
Requires:

Frozenbyte needs to release Mac/Linux code. Or give us the go-ahead to upload it to github.

Sane abstraction for the renderer. Currently direct3d/opengl renderers are entirely separate. They should be merged into single storm3d and separate abstractions for different graphics APIs.

Ability to embed renderer in a GUI. This is very hard to do in a portable way. Maybe not embed it at all but have a separate window with the game view.

OR

Put the editor completely inside the game. Use game ui stuff to do editor ui. This is way more complex but should allow identical editor on all supported platforms.

Re: [Code]Task: Editor to Linux & Mac OS X

Posted: Mon May 23, 2011 1:48 pm
by CheatCat
OR

Do a new editor, maybe the best way if is hard to do that with the code we have now. We can begin with a 2D editor maybe :D

Re: [Code]Task: Editor to Linux & Mac OS X

Posted: Mon May 23, 2011 3:18 pm
by FB_Mikael

Re: [Code]Task: Editor to Linux & Mac OS X

Posted: Tue May 24, 2011 1:31 am
by StevenT
FB_Mikael wrote:Here are the Linux and Mac sources.
http://frozenbyte.com/temp_jackclaw/JackClaw_source_LinuxMac.zip

I added this to the github repository :)

I'm not sure if this new release still builds on Windows so I've put this and the original release in their own directories for now.

Re: [Code]Task: Editor to Linux & Mac OS X

Posted: Tue May 24, 2011 12:12 pm
by alt_turo
StevenT wrote:I'm not sure if this new release still builds on Windows so I've put this and the original release in their own directories for now.


It should. The only things that might be broken are the editors.

There should only be one source tree otherwise the code diverges which is very bad. Please put it back the way it was and then put the linux source on top of it.

Re: [Code]Task: Editor to Linux & Mac OS X

Posted: Tue May 24, 2011 12:27 pm
by alt_turo
Can github branches be forced back to a specific commits? I know it breaks if anyone has pulled from it but the current code is a mess. Firefox chokes when trying to view the big commit. So does gitg.

Also when redoing this thing please first convert all code to unix line endings and then do a separate commit of the new code. This way we can see the actual changes and not all the whitespace.

Re: [Code]Task: Editor to Linux & Mac OS X

Posted: Tue May 24, 2011 1:44 pm
by StevenT
Hmm, doing it like that made so much sense late last night...

So setting this to fix the dos newlines, reverting to the first commit then copying the new code on top of it as a separate commit should fix the problems?

Re: [Code]Task: Editor to Linux & Mac OS X

Posted: Tue May 24, 2011 1:52 pm
by alt_turo
StevenT wrote:So setting this to fix the dos newlines, reverting to the first commit then copying the new code on top of it as a separate commit should fix the problems?


I think so. But you might need to do a "Fix line endings" commit before adding the new code.

Re: [Code]Task: Editor to Linux & Mac OS X

Posted: Tue May 24, 2011 2:03 pm
by StevenT
Playing around locally it seems that git setting doesn't quite convert the line endings the way I thought. I think just running through all the text files with dos2unix could work better, I'll do a bit more testing before pushing anything.

Re: [Code]Task: Editor to Linux & Mac OS X

Posted: Tue May 24, 2011 4:02 pm
by StevenT
Pushed those changes now. The diffs now appear to be actually useful now.

I was going to move all the sub directories to the root getting rid of the pointless "claw_source_final" folder and have the licence files in the same directory but I didn't want to have the huge commit any more confusing.

Re: [Code]Task: Editor to Linux & Mac OS X

Posted: Tue May 24, 2011 4:18 pm
by alt_turo
StevenT wrote:Pushed those changes now. The diffs now appear to be actually useful now.

Much better, thanks.

I was going to move all the sub directories to the root getting rid of the pointless "claw_source_final" folder and have the licence files in the same directory but I didn't want to have the huge commit any more confusing.

That would be the best.

Is it possible to change the history to get rid of those huge and ugly early commits? They cause problems for firefox and gitg.

Re: [Code]Task: Editor to Linux & Mac OS X

Posted: Tue May 24, 2011 4:54 pm
by StevenT
I moved the files to the root, for some reason git/github doesn't seem to link up the history of each file properly so the diffs can only be viewed from in the old commit using their old locations :?

//edit
http://stackoverflow.com/questions/2314 ... ir-history
Seems like you need to add --follow to get the full history of moved files.

alt_turo wrote:Is it possible to change the history to get rid of those huge and ugly early commits? They cause problems for firefox and gitg.

I don't think so, not without restarting the repo. Even reverted commits are actually just another commit with everything reversed. I've not used gitg, are the problems constant or just when viewing those commits?

Re: [Code]Task: Editor to Linux & Mac OS X

Posted: Sun Jun 19, 2011 4:10 pm
by AndySmile
hey @all,

CheatCat wrote:OR

Do a new editor, maybe the best way if is hard to do that with the code we have now. We can begin with a 2D editor maybe :D


That's actually a really good idea, had the same thought ;) On this way, we have the advantage to build that application
for all three platforms from the ground up. If we using library files, we're able to split that project in some small pieces. That
makes it simple to implement it to other platforms, because the core functions are stored in a separated module without or
just less platform dependencies and all we have to do is to implement its interface methods to the platform depended parts,
like cocoa on MacOSX or in .NET code on Windows.

But on this way, another questions would be really interesting, is it possible to get a specification for the level structure of jack claw? Because we'll need it to save and load routines of that editor or shall we build a completely new one?

see ya
Andy =)

Re: [Code]Task: Editor to Linux & Mac OS X

Posted: Mon Jun 27, 2011 1:27 pm
by alt_turo
AndySmile wrote:On this way, we have the advantage to build that application for all three platforms from the ground up. If we using library files, we're able to split that project in some small pieces. Thatmakes it simple to implement it to other platforms, because the core functions are stored in a separated module without or just less platform dependencies and all we have to do is to implement its interface methods to the platform depended parts, like cocoa on MacOSX or in .NET code on Windows.

Not a good idea. You would have several different UIs and have to keep all of them up to date. The preferable way would be to create an "in-game" editor which uses the UI primitives defined by the game itself. This way the same code is used on all platforms. It could even be a true in-game editor where you can easily switch between game and editor modes. This would require some major refactoring of the game first. And unfortunately the game ui code is pretty primitive so it would required lots of improvement first.

If you really want to use native widgets then you should use something cross-platform like wxWidgets or maybe GTK.

But on this way, another questions would be really interesting, is it possible to get a specification for the level structure of jack claw? Because we'll need it to save and load routines of that editor or shall we build a completely new one?

There's no specification. The code is all there is. game/Game.cpp (loadGame at line 4623) and ui/Terrain.cpp at least are interesting, possibly also game/GameUI.cpp

In the game data the level (currently just the one) is stored in "data/missions/mission1/". There are a bunch of scripts (.dhs and .dhps) and then binary files under bin/.

Someone really should write a specification for this. And it would also be very useful to write a text-only format to replace all the bin -files. This would make them easier to handle in version control.