Project Shuttle PB Mk2 developpement thread

Anyone ? Doh ... I'll pass this save/load func, not very important ...
Next step: UCGO !
Hi SolarLiner,

it's unfortunately not clear what your method/function should do.
So it's hard to tell what's wrong with it ;)

You can help us help you by doing one of the following steps:

  • Give us a bit more of your code, so we might be able to see some obvious issues.
  • Describe what the function/method should do in normal "prosa".
    It's generally a good approach to first define what the function should do and then start to code it. For example:
    PHP:
    // This method reads the three parameters x, y and z from
    // a scenario line that has the form "  PARAM x.x y.y z.z", where x,
    // y and z are floats. y and z are optional.
    // The values are stored in members m_X, m_Y and m_Z.
    void Foo::myMethod (const char* theLine) {
    }
The example above is of course only an example :)
You can of course also just attach the file with the problem, but still the revievers (and you too) need to know what should be done.
You can have a syntactically perfectly valid method that still is semantically wrong:
PHP:
// This method should calculate the difference between two values
double diff (double a, double b) {
  return -(a + b); // Sytax: OK, Semantics: wrong
}
Again, just an example.

/Kuddel
 
Much better: Use doxygen together with your source code comments. doxygen permits special tags in the comments to describe your program better, and turns the program into HTML/PDF/etc with the help of the source code comments for descriptions. Orbiters SDK documentation is done with doxygen and the header files are full of examples for how you can use it.

also, I personally find looking at the not yet used tags for doxygen for a class or function very helpful for knowing which aspect of my program I have not yet documented even a bit.
 
O.K. Now I see ;)

Here my suggestion(s):
clbkLoadStateEx
Code:
  [COLOR="Blue"]while[/COLOR] (oapiReadScenario_nextline (scn, line)) {
    [COLOR="SeaGreen"]// ...[/COLOR]
    } [COLOR="Blue"]else if[/COLOR] (!_strnicmp (line, [COLOR="Red"]"ANIM_"[/COLOR], 5)) {
      [COLOR="Blue"]int[/COLOR] i, status; [COLOR="Green"]// temp buffer to validate before[/COLOR]
      [COLOR="Blue"]double[/COLOR] proc; [COLOR="Green"]  //   "       "   "      "       "[/COLOR]
      sscanf(line+5, [COLOR="Red"]"%d %d %lf"[/COLOR], &i, &status, &proc);
      [COLOR="Blue"]if[/COLOR] ( i>=0 && i < ANIM_COUNT) {
        ani[i].status = status;
        ani[i].proc = proc;
      }
    } [COLOR="Blue"]else if[/COLOR] (!_strnicmp (line, [COLOR="Red"]"RID"[/COLOR], 3)) {
      sscanf(line+3, [COLOR="Red"]"%d"[/COLOR], &iRandomID);
    }
    [COLOR="Green"]// else ...[/COLOR]
  }
clbkSaveState
Code:
  [COLOR="Green"]// rest is not nice, but O.K. so far ;)[/COLOR]
  oapiWriteScenario_int(scn, [COLOR="Red"]"RID"[/COLOR], iRandomID);

You see, you can get all the variable numbers from the line in one scanf call. But as you are using one parameter as an array index it is vital that we check before (you did that already - good!)

By the way, this scenario (-lines) will work well:
Code:
  ANIM_0 -1 1.0000
  ANIM_1 11 2.0000
  ANIM_2 22 3.0000
  ANIM_3 33 4.0000
  ANIM_4 44 5.0000
  ANIM_5 55 6.0000
  ANIM_666 789 0.9876  ; an evil line!! (out of index) that will _not_ be (re-)written of course
  ANIM_6 66 7.0000
  ANIM_7 77 8.0000
  ANIM_8 88 9.0000
  ANIM_9 99 10.0000
  ANIM_10 100 11.0000

Hope this helps,
Kuddel
 
Last edited:
The clbkLoadStateEx you copied was written by the Artlav's Spacecraft3 to DLL converter.
The problem is in the clbkLoadState: when I add "oapiReadItem_int(sc, "RID", iRandomID);", it mess up the scenario loading ...

EDOT: Oops, I need to take a rest ... I'll try this, thanks ;)

---------- Post added at 10:23 PM ---------- Previous post was at 09:39 PM ----------

Tested ... And approved ! UCGO works pretty well and the load-save works. I'll update the code and release a first version on OHM !

Meanwhile, I'm doing some retexturing using Blender:
Texturing001.jpg


But Im' getting stuck on the bottom ... Arf this is so simple that I can't even do this :rofl:

---------- Post added 11-08-12 at 03:33 PM ---------- Previous post was 11-07-12 at 10:23 PM ----------

And I finally released a first version !
[ame="http://www.orbithangar.com/searchid.php?ID=5906"]Shuttle PB Mk2 - DLL Version[/ame]

It is still a beta, so there is maybe some bugs to solve but I think it is quite flyable ;)
If you have founs a bug, please post it here: http://code.google.com/p/shuttlepb-mk2/issues/list

Thanks, and good flights !
 
Last edited:
Interesting project Solarliner, looking forward to seeing its development!
Can the PB Mk2 dock with other craft?
 
Yep, it can transfers UMmu too if the other craft is compatible too.
I need some help to include aerodynamics, this is the part where I know ... just anything !
 
Sorry cant help much with aerodynamics, what little knowledge I have was gained through orbiter :rolleyes:

However I believe Moach is very knowledgeable in this department.

The PB Mk2 would make an awesome little support or emergency escape vehicle for the likes of the arrow/deepstar vessels or something big with multiple docking ports :hmm:

Excellent work :thumbup:
 
Sorry cant help much with aerodynamics, what little knowledge I have was gained through orbiter :rolleyes:

Excellent work :thumbup:

First thanks :tiphat:

Second, the baby have produced ... LIFT ! :woohoo:
Lift.jpg


But, there is a problem: now with that the wings doesn't move anymore and when I want to pull up ... I am going down ! :facepalm: :lol:
I've updated the code, so if anyone want to check out it is still here: https://code.google.com/p/shuttlepb-mk2/source/browse?name=102
 
Hello,
There is some updates here.
First, I almost finished the retexturing:
blender%202013-02-20%2018-58-52-46.jpg


But, as Blender will mess the groups numbers, the animations won't work anymore. But that's fine, hi-res (2048x2048) textures soon !
Speaking of textures, as you can say it is not too bad, but I need some better skills at UV wrapping ! :lol:

More on a technical side, I past to Subversion, and that was woth it, now you can export into a new folder to have the lastest alpha version of it, using this link: https://shuttlepb-mk2.googlecode.com/svn/branches/lastest

I didn't touched the code much, because of some other (and IRL) projects, was doing some good stuff, almost forgot it, and speaking with other developpers, reminding me this, well ...

So, for the today's question: Who would like to help me with texturing this (diffuse, normal, and maybe reflection maps) ?

---------- Post added 02-21-13 at 05:20 PM ---------- Previous post was 02-20-13 at 06:06 PM ----------

I present you ... the new Shuttle PB Mk2 !
orbiter%202013-02-21%2018-00-01-48.jpg


New 2048 textures, D3D9 env-map-ready !

Demo of the reflecting glass:
orbiter%202013-02-21%2017-58-10-65.jpg


As I said before, I messed the anims completly. Pressing on "K" will make the shuttle go crazy:
orbiter%202013-02-21%2017-59-31-10.jpg


You can have it into your Orbiter install, just SVN the "branch/lastest" !
 
My fault !
I forgot to remember that a group can only support one texture ... Because of that, we can't apply textures the proper way ! My UV Maps worth nothing ... :facepalm:


In fact, not all. But the fuselage was separated in two parts: The sides, and the top-bottom. So now I need to separate the parts into new groups. Easy, right ? I didn't find any functions to separate faces into objects in Blender.

So, if anyone has a solution ... And if anyone would like to help me in this terrible process of retexturing and painting this little ship ... He will have a big credit in the final doc, so thanks ! :tiphat:
 
There is a way. In mesh edit mode select the appropriatte faces and then open your mesh functions menu and select, seperate, and by selection. Default shortcut is p. Alternately blender also allows you to copy/paste selected vertices between different meshes.
 
There is a way. In mesh edit mode select the appropriatte faces and then open your mesh functions menu and select, seperate, and by selection. Default shortcut is p. Alternately blender also allows you to copy/paste selected vertices between different meshes.

You just saved my life ! Thanks alot Hlynkacg !

---------- Post added at 09:22 PM ---------- Previous post was at 08:18 PM ----------

By the way, here is the very first version of the PBMk2's logo:
shpbmk2_logo.png


What do you guys think ?
 
Shuttle PB Mk2 today:
Inivisibility_activated.jpg


It works a little bit better on the inline client:
invisible_d3d9.JPG


I need to play with the touchdown points to solve the problem (which is not a reversed mesh), but I want and need to know what in the (Orbiter) world makes my ship go underground, and doesn't even show up on D3D9 ! I assume this is not MESHHANDLE related has NG does not CTD and I don't even use it (a simple "AddMesh" is enough for me for now)
 
Back
Top