Author Topic: How to setup Op2 Sdk With VS 2015 + Project Templates?  (Read 10270 times)

Offline rmiddle

  • Newbie
  • *
  • Posts: 9
How to setup Op2 Sdk With VS 2015 + Project Templates?
« on: October 09, 2015, 01:07:48 PM »
I see instructions for VS 2012 but I can't figure out how to make those instructions work with VS 2015.

Thanks
Robert

Offline leeor_net

  • Administrator
  • Hero Member
  • *****
  • Posts: 2352
  • OPHD Lead Developer
    • LairWorks Entertainment
Re: How to setup Op2 Sdk With VS 2015 + Project Templates?
« Reply #1 on: October 09, 2015, 01:13:08 PM »
Visual Studio 2015 shouldn't be much different than VS2015 so setup should be basically the same.

We're looking into creating official VS2015 project files and packages in an effort to bring the development API's to modern IDE's.

Offline Arklon

  • Administrator
  • Hero Member
  • *****
  • Posts: 1269
Re: How to setup Op2 Sdk With VS 2015 + Project Templates?
« Reply #2 on: October 09, 2015, 02:22:33 PM »
Yeah, it shouldn't be too different to set up VS2015 to use the SDK. You can't convert the MSVC6 project files directly to 2015, though, and I don't know if the project files on the SVN have been converted yet. If they're not, you need to get VS2008 (you should be able to find the express version around still), load the MSVC6 project in it to convert it to VS2008 format, and then you can load the VS2008 project in VS2015.
I don't have VS2015 installed yet myself, but I will soon. As in, when I feel like cleaning up C: to make room for it, because Microshit refuses to let you install VS since 2012 on any other partition.

Offline Hooman

  • Administrator
  • Hero Member
  • *****
  • Posts: 4955
Re: How to setup Op2 Sdk With VS 2015 + Project Templates?
« Reply #3 on: October 09, 2015, 02:51:12 PM »
A few months back I converted a few of the MSVC6 project files in SVN to VS2012. Those project files might work with VS2015.

Microsoft doesn't seem to have VS2008 up for download anymore, which is the last free version that can still read the MSVC6 project files. I hear the newer pro versions can still read the old project files. If anyone has an old copy of VS2008, or a pro version floating around, feel free to upgrade project files. When I did the conversions, I was doing it by manually recreating new project files. It's tedious, hence I didn't finish doing it for every project.

And yeah, there's been talk of standardizing things for VS2015. Maybe someone can do that soon. I downloaded VS2015 recently (it took days over an unreliable wifi connection), but I never got around to installing it to a Windows virtual machine. I'm hoping to give it a try in the next few days.

Offline leeor_net

  • Administrator
  • Hero Member
  • *****
  • Posts: 2352
  • OPHD Lead Developer
    • LairWorks Entertainment
Re: How to setup Op2 Sdk With VS 2015 + Project Templates?
« Reply #4 on: October 09, 2015, 05:54:38 PM »
Alas I just finally replaced 2008 with 2015. :P

I'll see what I can bang out this weekend.

Offline rmiddle

  • Newbie
  • *
  • Posts: 9
Re: How to setup Op2 Sdk With VS 2015 + Project Templates?
« Reply #5 on: October 09, 2015, 11:28:23 PM »
Yeah, it shouldn't be too different to set up VS2015 to use the SDK. You can't convert the MSVC6 project files directly to 2015, though, and I don't know if the project files on the SVN have been converted yet. If they're not, you need to get VS2008 (you should be able to find the express version around still), load the MSVC6 project in it to convert it to VS2008 format, and then you can load the VS2008 project in VS2015.
I don't have VS2015 installed yet myself, but I will soon. As in, when I feel like cleaning up C: to make room for it, because Microshit refuses to let you install VS since 2012 on any other partition.

I haven't been able to find VS 2008 anywhere. 

Thanks
Robert

Offline leeor_net

  • Administrator
  • Hero Member
  • *****
  • Posts: 2352
  • OPHD Lead Developer
    • LairWorks Entertainment
Re: How to setup Op2 Sdk With VS 2015 + Project Templates?
« Reply #6 on: October 10, 2015, 12:35:03 AM »
Looks like Microsoft decided to yank it. Good riddance too, frankly it was awful. Your best bet if you really want VS2008 is to probably torrent it.

I'll be looking at the code and the projects this weekend and hopefully get a VS2015 project set up and usable by the end of Sunday or Monday. That's my goal anyway. Unless Hooman wants to jump in and do it before I get to it (hint hint, nudge nudge).

Will keep you posted.

Offline rmiddle

  • Newbie
  • *
  • Posts: 9
Re: How to setup Op2 Sdk With VS 2015 + Project Templates?
« Reply #7 on: October 10, 2015, 02:45:57 PM »
Looks like Microsoft decided to yank it. Good riddance too, frankly it was awful. Your best bet if you really want VS2008 is to probably torrent it.

I'll be looking at the code and the projects this weekend and hopefully get a VS2015 project set up and usable by the end of Sunday or Monday. That's my goal anyway. Unless Hooman wants to jump in and do it before I get to it (hint hint, nudge nudge).

Will keep you posted.

That would be great.  I kinda want to play with OP2 code a little.

Thanks
Robert

Offline leeor_net

  • Administrator
  • Hero Member
  • *****
  • Posts: 2352
  • OPHD Lead Developer
    • LairWorks Entertainment
Re: How to setup Op2 Sdk With VS 2015 + Project Templates?
« Reply #8 on: October 10, 2015, 06:39:00 PM »
You and me both. I've been skirting around it for years but I think it's time I just dove in and got started.

Offline dave_erald

  • Sr. Member
  • ****
  • Posts: 262
Re: How to setup Op2 Sdk With VS 2015 + Project Templates?
« Reply #9 on: October 28, 2015, 12:03:37 PM »
I think I have the SDK loaded into VS 2015 correctly, load up templates, put the include and lib folders in VC, however I do get this

1>LibCTiny.lib(DLLCRT0.OBJ) : warning LNK4229: invalid directive '/OPT:NOWIN98' encountered; ignored

Is that the link in that library file its getting upset with? As near as I can tell I have it in the right folder and most everything else. I downloaded the OP2devolpment.zip file and got everything moved around to where I believe it needs to be, but I did not see a OP2script.dsp file anywhere.

I would like to try and get this to work, if I have jumped too far ahead and missed something let me know and I'll go back an reread some stuff. I've started on sirbombers tutorials but am missing some of the SDK setup info, of course that was for vs2008 I think.

Thanks

Dave.



-David R.V.

-GMT400 fan
-OPU Influencer

Offline leeor_net

  • Administrator
  • Hero Member
  • *****
  • Posts: 2352
  • OPHD Lead Developer
    • LairWorks Entertainment
Re: How to setup Op2 Sdk With VS 2015 + Project Templates?
« Reply #10 on: October 28, 2015, 02:53:09 PM »
That's a linker option. I'm assuming it's coming as a legacy command line switch from the original VC6 solution.

I'm going to be looking into this tonight to see about making it easier and cleaner with modern IDE's and tools. Will probably have more answers tonight or tomorrow.

Offline dave_erald

  • Sr. Member
  • ****
  • Posts: 262
Re: How to setup Op2 Sdk With VS 2015 + Project Templates?
« Reply #11 on: October 28, 2015, 07:02:48 PM »
That's about how I'm interpreting it, but what the hell do I know. I think if it wasn't in the right folder of VS I would get reference not found errors. On a side note does anyone have a op2script.dsp? Or is it in that op2devolopment.zip I downloaded and I'm just blind?
-David R.V.

-GMT400 fan
-OPU Influencer

Offline Hooman

  • Administrator
  • Hero Member
  • *****
  • Posts: 4955
Re: How to setup Op2 Sdk With VS 2015 + Project Templates?
« Reply #12 on: October 29, 2015, 01:52:25 AM »
LibCTiny is a replacement for the CRT (C Run Time) library. If you remove the reference to it, the code should compile with the default compiler provided version. LibCTiny was used with the Visual Studio 6 projects to produce a smaller DLL file. It was never strictly needed, just used to produce smaller output. I remember there being issues trying to use it with newer compilers, and so I don't think it was part of any Visual Studio 2008 (or 2012?) projects.

I'm guessing you're using an old zip file of the SDK. The zip files haven't been maintained or updated in ages. You're probably better off getting the code from SVN. The LibCTiny issue has likely already been resolved there, at least for the projects that were updated to Visual Studio 2012. You can use TortoiseSVN to download updated stuff from:
https://svn.outpostuniverse.org:8443/svn/outpost2

The .dsp files are Visual Studio 6 project files. You can ignore them if you've got a project setup with a newer version of Visual Studio.

Offline leeor_net

  • Administrator
  • Hero Member
  • *****
  • Posts: 2352
  • OPHD Lead Developer
    • LairWorks Entertainment
Re: How to setup Op2 Sdk With VS 2015 + Project Templates?
« Reply #13 on: October 29, 2015, 11:45:22 AM »
Working on putting together an updated downloadable package now that will work with VS2015.

Not many of the projects on the SVN were updated to VS2015. I also have an idea as to how to set it up to make it easier for newbies to just download and roll without having to jump through hoops, etc. Not going to make any changes on the SVN though.


EDIT:

Didn't want to double post.

I pulled the old SDK zip file, updated all of the OP2 API code to what's currently on the SVN and built a VS2015 project file for it. All of the linker and compiler settings allow it compile and the DLL's built work just fine.

Working having it be even easier for someone new to just open the ZIP, load the solution and just start writing.
« Last Edit: October 29, 2015, 01:39:16 PM by leeor_net »

Offline dave_erald

  • Sr. Member
  • ****
  • Posts: 262
Re: How to setup Op2 Sdk With VS 2015 + Project Templates?
« Reply #14 on: October 29, 2015, 04:30:12 PM »
This is great. Playing this again makes me want to break out Star Wars Rebellion and Fallen Haven. I'm not going to bother doing game coding for those, largely because I don't think those games have a following even close to this one ( not that this one is overwhelming, just dedicated is the biggest thing )

Awesome, I'm going to keep checking and working away learning.

EDIT - just thought of something, none of the templates have files for manipulating objects in game, vehicles and such? Take an existing Laser tiger and redesign it? Is there a forum section for that?
« Last Edit: October 29, 2015, 05:47:17 PM by dave_erald »
-David R.V.

-GMT400 fan
-OPU Influencer

Offline Hooman

  • Administrator
  • Hero Member
  • *****
  • Posts: 4955
Re: How to setup Op2 Sdk With VS 2015 + Project Templates?
« Reply #15 on: October 29, 2015, 10:05:50 PM »
@leeor_net: Why not make changes in SVN? That's what it's there for. If the changes prove to be a bad idea, they can always be undone. There's no need to think of the SVN contents as sacred or anything.

@dave_erald: What do you mean by redesign? Changing unit behaviour is not something supported by the game engine, but since DLLs are executable code you can hack anything into the game you want, if you really know what you're doing. It's not simple though, and certainly not a beginner topic.

Simpler manipulations are possible though. You can order units to do simple things, move, turn lights on or off, idle buildings, unload garages, that sort of thing. You can also mix and match weapons with chasis when you create units, including putting normal weapons on scorpions.

Offline dave_erald

  • Sr. Member
  • ****
  • Posts: 262
Re: How to setup Op2 Sdk With VS 2015 + Project Templates?
« Reply #16 on: October 29, 2015, 10:15:01 PM »
No no not looking to do anything outrageous right now, just hoping to get compiling maps and trying my hand.

I was only looking ahead, wondering how much can be done is all.
-David R.V.

-GMT400 fan
-OPU Influencer

Offline Hooman

  • Administrator
  • Hero Member
  • *****
  • Posts: 4955
Re: How to setup Op2 Sdk With VS 2015 + Project Templates?
« Reply #17 on: October 29, 2015, 10:30:37 PM »
With executable code in DLLs, theoretically anything can be done. Realistically though, it's somewhat limited what can be done easily.

Just getting units created is enough to make a playable map. You don't need to worry too much about manipulating them. The bulk of DLL code is just level setup, with a little bit extra for victory/failure conditions and random disasters.

Offline leeor_net

  • Administrator
  • Hero Member
  • *****
  • Posts: 2352
  • OPHD Lead Developer
    • LairWorks Entertainment
Re: How to setup Op2 Sdk With VS 2015 + Project Templates?
« Reply #18 on: October 30, 2015, 01:15:36 AM »
Hooman, it's not that I'm afraid to change it, it's that I'd like to have it review before I start making any commits. I'll be posting a new SDK download file by this tomorrow evening... don't think it will take me longer than that.



EDIT:

Got everything uploaded and a Redmine project set up for the SDK download package.

Head on over to Redmine and download v2.1. v2.1 includes Visual Studio 2015 project files so you can load it up and compile immediately without having to mess around with compiler or linker settings.

http://redmine.outpostuniverse.org/projects/op2-sdk/files
« Last Edit: November 01, 2015, 09:50:20 PM by leeor_net »

Offline Hooman

  • Administrator
  • Hero Member
  • *****
  • Posts: 4955
Re: How to setup Op2 Sdk With VS 2015 + Project Templates?
« Reply #19 on: November 11, 2015, 03:05:36 PM »
Commit first, review later. ;)

The change is basically new project files, which don't even overwrite old stuff. It's a safe change.

Besides, code is easier to review once it's in the SVN, and if further changes are needed, or something needs to be undone, it can be documented in a commit message why the change is needed.

It's not a big deal to break what's in the SVN. In some organizations, with more developers, and a more rapid development cycle, you probably want to avoid breaking trunk since that affects other active developers, and with frequent commits, other people will have more difficulty knowing when the problem was introduced. Here we just don't have that problem.

Some review systems basically have an extra repository that you push changes to, and only once they are reviewed and accepted is that change pushed to the main repository that everyone clones from. That's overkill for us. It's also more process heavy than it needs to be. Our needs are simpler. Just break stuff, learn from it, and try again. We have only one repository, and generally just work from trunk, not on separate branches.


Thank you for dealing with this. I just checked out the package, and the older version too. The changes look quite straightforward.

Offline leeor_net

  • Administrator
  • Hero Member
  • *****
  • Posts: 2352
  • OPHD Lead Developer
    • LairWorks Entertainment
Re: How to setup Op2 Sdk With VS 2015 + Project Templates?
« Reply #20 on: November 11, 2015, 03:20:44 PM »
Leviathan has a few suggestions and insists that we stick with  the original layout. I ceded defeat and will have an updated 2.2 version released... whenever. Heh.

I want to get additional sample code added for a 2.5 release hopefully by the end of the year. Make it easier for newbies to learn coding in addition to the Wiki pages we want to get set up.

And I've got some thoughts on a 3.0 SDK release but that's for sometime in the future.

Offline Hooman

  • Administrator
  • Hero Member
  • *****
  • Posts: 4955
Re: How to setup Op2 Sdk With VS 2015 + Project Templates?
« Reply #21 on: November 12, 2015, 06:59:57 AM »
I am most curious.

Offline Hooman

  • Administrator
  • Hero Member
  • *****
  • Posts: 4955
Re: How to setup Op2 Sdk With VS 2015 + Project Templates?
« Reply #22 on: December 28, 2015, 02:11:58 AM »
Bump. I think this still needs some attention. I don't see any commits to SVN, but did notice a Redmine task about updating this to match the SVN layout.

@leeor_net: It might also be good to specify what code samples should be added to a future release, and what thoughts you had for a 3.0 release.

Offline leeor_net

  • Administrator
  • Hero Member
  • *****
  • Posts: 2352
  • OPHD Lead Developer
    • LairWorks Entertainment
Re: How to setup Op2 Sdk With VS 2015 + Project Templates?
« Reply #23 on: January 01, 2016, 11:10:28 PM »
Basically, based on what Arklon stated on IRC, I'm not sure it makes sense to bother updating the API SDK at all. I haven't had a lot of positive comments regarding the 2.1 release so I've pretty much shied away from it.

Offline Hooman

  • Administrator
  • Hero Member
  • *****
  • Posts: 4955
Re: How to setup Op2 Sdk With VS 2015 + Project Templates?
« Reply #24 on: January 02, 2016, 01:33:42 AM »
I'm not sure I agree, but I do admit the SDK doesn't get much usage lately. Not many people try making levels, and it can be difficult to do. I don't think that's about to change.

I think more examples and tutorials would be helpful for the few people that do take interest.