Orbiter-Forum  

Go Back   Orbiter-Forum > Orbiter Addons > Addon Development
Register Blogs Orbinauts List Social Groups FAQ Projects Mark Forums Read

Addon Development Developers post news, updates, & discussions here about your projects in development.

Reply
 
Thread Tools
  #1  
Old
Face's Avatar
Face Face is offline
Beta Tester

Default genericvessel - spacecraft3 and multistage2 replacement project
by Face 02-09-2013, 08:14 PM

Hy there,

Following the discussion here, I'd like to announce the genericvessel project.

From the Wiki page:
Quote:
This project intends to create a generic framework for the Orbiter Space Flight simulator. It should enable users without C++ knowledge (or compilers) to create vessel add-ons that leverage as much as possible of the possibilities the Orbiter SDK offers. In this regards, it is similar to (and compatible with) the legacy frameworks spacecraft3 and multistage2.
The project is hosted on Bitbucket here. The code is going to be GPL'ed and version controlled with Mercurial. Please make use of the Wiki and bug-tracker facilities, if you'd like to contribute specification/documentation or have issues to report.

Thanks to Artlav, the project already has some content to put your hands on, if you feel like testing the approach: http://bitbucket.org/face/genericvessel/get/OSH.zip ( please see /Doc/genericvessel/README.txt ).

regards,
Face
Reply With Quote
Views 58631 Comments 226
Total Comments 226

Comments

Old 02-09-2013, 09:03 PM   #2
Artlav
Aperiodic traveller
 
Artlav's Avatar

Default

For you who wasn't keeping track of the other thread, the current functional part of the project is the SC3->DLL converter, that i made previously, being transformed into a drop-in replacement for the spacecraft3.dll.

Meaning, that if spacecraft3.dll does no longer work for you or your setup of Orbiter, there will now be a compatible (and in the future expanded) alternative that is up to date. Vinka's work proved invaluable to the community, and we are future-proofing it by doing it again with the code open.


Architectural outline of the system is two parts - the INI parser and the Orbiter vessel module.

The vessel module goes into the place of spacecraft3.dll, just placing "Module = oshdll" into the config/spacecraft/spacecraft*.cfg does the trick.
This is the module that would be loaded up when the ini vessel is requested.

The module does not know anything about ini files, it just passes it's vessel name to the second dll - the parser.
The parser locates the ini file and produces a data block to pass back (or blank vessel if no ini found).
The vessel module receives this data block and unfolds into a vessel class according to it.

The advantage is that the in-the-flux Orbiter part is decoupled from relatively-static INI parsing part. Both can be worked on independently, be made in languages to fit the task, etc.

Orbiter vessel part is a simple C++ module that can be updated (or fixed) independently of the more complex parser, by anyone familiar with Orbiter add-on development.
And in most cases to add compatibility to the new Orbiter release, orbitersound or a graphic client all it would take is to recompile the module - easy, since it's open source.


On the bad side, so far it is only as good as the later version of SC3->DLL converter was, which still had some bugs and limitations, and it does not yet do anything about multistage2.dll.
Time should cure these issues, however.

---------- Post added at 01:03 ---------- Previous post was at 00:51 ----------

Face, tried to push some changes, got authorization error.
Is that normal?
Artlav is offline   Reply With Quote
Old 02-09-2013, 09:18 PM   #3
orb
O-F Administrator
Ninja
 
orb's Avatar

Default

Quote:
Originally Posted by Artlav View Post
 Face, tried to push some changes, got authorization error.
Is that normal?
AFAIK, you need to get permission from face first to push changes to his project. Tblaxland for example had set permissions for me to the "Event Timer" project before I could do so.
orb is offline   Reply With Quote
Old 02-09-2013, 09:35 PM   #4
Face
Beta Tester
 
Face's Avatar

Default

Quote:
Originally Posted by Artlav View Post
 Face, tried to push some changes, got authorization error.
Is that normal?
Yes, it is normal for the default policy on Bitbucket. But I can add you for push access, no problem.

With DVCS and those "social coding" platforms, the normal work-mode is to simply clone a copy of the project under your account, hack away locally, use the account-copy as kind of personal backup, and send so-called pull-requests.

But since we are only 2 ATM, I see no harm in following the usual SVN-like workflow.

---------- Post added at 22:35 ---------- Previous post was at 22:33 ----------

And done. You should now be able to push with your Bitbucket credentials.
Face is offline   Reply With Quote
Old 02-09-2013, 09:38 PM   #5
Artlav
Aperiodic traveller
 
Artlav's Avatar

Default

Thanks, it works.
Now it should support scn definitions for spacecraft2 and spacecraft one.
Artlav is offline   Reply With Quote
Old 02-09-2013, 10:37 PM   #6
Arthur Dent
Absolutely Mental
 
Arthur Dent's Avatar
Default

Artlav, will you also make a GenericVessel->DLL converter, like your very handy SC3->DLL Converter?

I find programming via scripting very useful, but I can imagine that having a native DLL can have it's advantages. Especially when it outputs the C++ code, that could be used to learn vessel programming and of course to do some "manual" experimentation.
Arthur Dent is offline   Reply With Quote
Old 02-09-2013, 11:09 PM   #7
Artlav
Aperiodic traveller
 
Artlav's Avatar

Default

Quote:
Originally Posted by Arthur Dent View Post
 Artlav, will you also make a GenericVessel->DLL converter, like your very handy SC3->DLL Converter?
Directly to DLL conversion is trivial, as well as probably quite useless now with the drop-in-replacement mode available.

Conversion to C++ can be maintained and extended if sufficient demand is present. I'll see how it goes, then it should be clearer.
Artlav is offline   Reply With Quote
Thanked by:
Old 02-10-2013, 01:24 AM   #8
Face
Beta Tester
 
Face's Avatar

Default

I've pushed a refactoring as well as a merge with my load strategy now. Now you can use Artlav's engine with INI declarations embedded in the CFG file for your class. The scenario "Generic Vessels" scenario folder is in again.
Face is offline   Reply With Quote
Old 02-11-2013, 02:44 PM   #9
Kendo
Orbinaut
 
Kendo's Avatar
Default

This is very good indeed. As a test, I got the old EagleII mod from 2005 to work (using the EagleIIVIP addon ) Also I put the EagleII.cfg in Vessels and I can now add it using the scenario editor.
I noticed , using your files for ideas, it,s almost as though the ini file becomes the config file and visa versa. Also I only need 1 EagleII, as EagleIIa EagleIIb and EagleIIc can be used from the EagleII cfg / ini.
As spacecraft didn,t show up, I changed it to spacecraft2. ( can I change it to Spacecraft3 )? And the animations work.
Great work, you really are a genius. Kind regards, Ken.
Kendo is offline   Reply With Quote
Old 02-11-2013, 03:20 PM   #10
MeDiCS
Donator
 
MeDiCS's Avatar
Default

Very nice. I once wrote something alike, intended to be a drop-in replacement SC3 and MS2, and I planned to add UMmu support + other misc extensions. It wasn't ready for prime time, but luckly isn't needed anymore.

A few ideas are still roaming my mind right now, such as JSON (or a small Lua module) instead of INI for the declarative part, and support for custom Lua or DLL modules, as there isn't a need for SC3 compatibility anymore. I think I'll write a small test DLL and see how it fares...
MeDiCS is offline   Reply With Quote
Thanked by:
Old 02-11-2013, 03:33 PM   #11
Donamy
Beta Tester


Default

It seems to slow the animations a bit.
Donamy is offline   Reply With Quote
Old 02-28-2013, 11:36 PM   #12
Kendo
Orbinaut
 
Kendo's Avatar
Default

Artlav, just a couple of things to mention to you......
Tried Kev,s Eagle1999-S3 addon, works great using Spacecraft3. But using your Genericvessel module, I am losing the particlestreams.

Also, there are 2 meshes, Eagle1y (Main body) and Eagle1p (Cockpit).
The original S3 version if fine, and adds and attaches the cockpit automatically, where as the Genericvessel version doesn,t add it. (infact, it doesn,t load the cockpit at all)
So I have a separate vessel file for the cockpit so I can attach it using Attachment manager, I then re-save using the Scenario editor, and then the scenarios load up fine.
All these files are in Config/Vessels. I can now add them using the Scenario editor.
This Genericvessel module is a great idea.
Kendo is offline   Reply With Quote
Old 03-01-2013, 10:05 AM   #13
Face
Beta Tester
 
Face's Avatar

Default

Quote:
Originally Posted by Donamy View Post
 It seems to slow the animations a bit.
Quote:
Originally Posted by Kendo View Post
 Tried Kev,s Eagle1999-S3 addon, works great using Spacecraft3. But using your Genericvessel module, I am losing the particlestreams.

Also, there are 2 meshes, Eagle1y (Main body) and Eagle1p (Cockpit).
The original S3 version if fine, and adds and attaches the cockpit automatically, where as the Genericvessel version doesn,t add it. (infact, it doesn,t load the cockpit at all)
Could you provide links to download the appropriate add-ons? If that's possible, I'll put up tickets to the project in order to investigate the problems. The more reproduction input, the better!
Face is offline   Reply With Quote
Old 03-01-2013, 12:13 PM   #14
Kendo
Orbinaut
 
Kendo's Avatar
Default

Thank you for your reply, Face.
Here is the link http://www.orbithangar.com/download.php?ID=2216 This is for Kev,s Eagle1999-S3.
You will need another download, (this download is for a dll version from 04 that doesnt work.) http://www.orbithangar.com/download.php?ID=612
You need it purely for the 2 meshes and textures, it tells you which download in Kev,s instructions. Just put Eagle in the search bar at Orbithangar and you will find it easily.
You don,t need the Moonbase alpha v3 download, thats purely for a scenario

Last edited by Kendo; 03-01-2013 at 12:24 PM.
Kendo is offline   Reply With Quote
Old 03-01-2013, 03:15 PM   #15
Artlav
Aperiodic traveller
 
Artlav's Avatar

Default

Fixed all Eagle issues (that i can see):

-Added support for payload visuals - Eagle cockpit now visible.
-Fixed COG offset definition - Eagle now appears at the right height off the ground.
-Fixed a typo in genericvessel.c
-Removed legacy compatibility - the way this is going, better to keep the code separate from my other frameworks.

Update here:
http://orbides.1gb.ru/orbf/genericvessel-130301.zip
Note, that the module is now called genericvessel, not oshdll.

Remember, people - detailed reproduction instructions equals quick fix.
Artlav is offline   Reply With Quote
Reply

  Orbiter-Forum > Orbiter Addons > Addon Development


Thread Tools

Posting Rules
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
Forum Jump


All times are GMT. The time now is 11:20 PM.

Quick Links Need Help?


About Us | Rules & Guidelines | TOS Policy | Privacy Policy

Orbiter-Forum is hosted at Orbithangar.com
Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
Copyright 2007 - 2017, Orbiter-Forum.com. All rights reserved.