Editing Vessel code
Jump to navigation
Jump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 3: | Line 3: | ||
'''--- THIS IS WORK IN PROGRESS ---''' | '''--- THIS IS WORK IN PROGRESS ---''' | ||
− | This is a quick guide to create your own vessel dll with VC++. It's not suited for newbies to c++. If you are new to | + | This is a quick guide to create your own vessel dll with VC++. It's not suited for newbies to c++. If you are new to orbiter, make a config based vessel first, or one based on vinkas spacecraft.dll or spacecraft2.dll. |
You will find here which API functions are necessary to get a project running. This is basically just a very cut down version from one of the sample ships included in Orbiter SDK. | You will find here which API functions are necessary to get a project running. This is basically just a very cut down version from one of the sample ships included in Orbiter SDK. | ||
Line 9: | Line 9: | ||
After you have set up the compiler, it's time to start setting up the actual code. | After you have set up the compiler, it's time to start setting up the actual code. | ||
− | Try to settle on a name for your vessel class first. | + | Try to settle on a name for your vessel class first. Dont choose "testship" or "spacecraft". Try a unique name, like "ProtonLV", "HeavyCruiserHC" or whatever suits you. Save the project under that name and add the following two files (with your vessels name) |
*Source *.cpp file | *Source *.cpp file | ||
Line 128: | Line 128: | ||
Consequently you should only ever use global variables when you're absolutely sure they're safe, or when they're constants which therefore cannot change between runs. If you're not sure whether a variable should be global or part of your class, make it a class variable for safety. | Consequently you should only ever use global variables when you're absolutely sure they're safe, or when they're constants which therefore cannot change between runs. If you're not sure whether a variable should be global or part of your class, make it a class variable for safety. | ||
− | + | [[Category:Tutorials]][[Category:Addon tutorials]] | |
− | [[Category:Tutorials]] | ||
− | [[Category: |