Author Topic: LevelTemplate - WithComments?  (Read 5799 times)

Offline Hooman

  • Administrator
  • Hero Member
  • *****
  • Posts: 4955
LevelTemplate - WithComments?
« on: October 10, 2018, 02:58:23 AM »
Do we need both a blank level template project, and one with comments? Perhaps we can or should remove one.

I liked having a blank template that wasn't littered with comments that I didn't need. Though perhaps levels based on a blank template would then be less useful for other people to learn from or adapt.

For people who hate excessive comments, it's not so hard to just delete comments after forking.

We could perhaps have the commented and non-commented versions as separate branches in the same repository. I'm not a fan of this solution though, as when you fork, you'd fork both branches, and I wouldn't want to encourage having extra stray branches around, which will inevitably become stale.

We could expand on the comments to make it more of a tutorial, though perhaps that's best as a separate tutorial level project.

I'm thinking we should get rid of the template without comments, and rename the other to simply LevelTemplate. Would love to see people's comments on the matter ;)

Offline leeor_net

  • Administrator
  • Hero Member
  • *****
  • Posts: 2352
  • OPHD Lead Developer
    • LairWorks Entertainment
Re: LevelTemplate - WithComments?
« Reply #1 on: October 10, 2018, 07:12:05 PM »
Personally I would leave in comments that explain required parameters and leave the rest for tutorials/documentation either on our Wiki or through GitHub's wiki features.

Offline Vagabond

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1015
Re: LevelTemplate - WithComments?
« Reply #2 on: October 10, 2018, 07:26:20 PM »
For the sake of maintainability, I would be happy if we dropped to 1 template. Doesn't really matter if it is commented to me or not. Although I wouldn't want to get crazy with a full tutorial in the comments. Better to review a completed scenario or read on the wiki or sirbomber's tutorials for the details.

I would also be okay removing the hooville template. I wonder how many people review it / find it helpful?

All of my scenarios use HFL. What do you think about adding a reference to HFL from the template library? You could make a simple multiplayer scenario without it. I think if you want to do anything more complex then you are going to want the added functionality it provides. For me it would cut down on some boilerplate reference code. Also understand if it is better to keep it simple.

-Brett

Offline Hooman

  • Administrator
  • Hero Member
  • *****
  • Posts: 4955
Re: LevelTemplate - WithComments?
« Reply #3 on: October 12, 2018, 03:14:44 PM »
I think the templates should come with all APIs available and ready for use.

In particular, the template should reference all APIs as Git submodules, and have project settings configured, such as additional include folders, or linker settings.

I would defer any use of the other APIs for a more advanced tutorial though. In particular, I wouldn't #include them anywhere if they are not needed.


The "Hooville" project could be converted from a template to a tutorial project. That's kind of what it is really, just a really short tutorial. It's probably not so useful as a template.

Offline Vagabond

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1015
Re: LevelTemplate - WithComments?
« Reply #4 on: October 13, 2018, 01:42:28 PM »
Agreed on adding HFL reference, but not actually adding HFL code or includes to the LevelTemplate.

Unless anyone disagrees, I propose:

1. Delete LevelTemplate-Blank.
2. Rename LevelTemplate-Blank-Comments REPO to just LevelTemplate.
3. Rename OP2Script.sln/OP2Script.vcxprog to LevelTemplate.sln.
4. Rename LevelTemplate-Hooville REPO to HoovilleLevelTutorial

Should probably wait to add HFL references and submodules until we finalize what the API structure will look like.

-Brett

Offline leeor_net

  • Administrator
  • Hero Member
  • *****
  • Posts: 2352
  • OPHD Lead Developer
    • LairWorks Entertainment
Re: LevelTemplate - WithComments?
« Reply #5 on: October 13, 2018, 02:29:14 PM »
Looks good to me... though the vxproj -- can that just be renamed? I thought those were separate from solutions?

Offline Vagabond

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1015
Re: LevelTemplate - WithComments?
« Reply #6 on: October 13, 2018, 03:56:47 PM »
Leeor,

To be more specific, I mean to rename .filters, .sln, and .vcxproj files to match the name of the repository and not be op2script.

This means when cloning or forking the template, you are going to want to rename these files to match your level. I find it tough to distinguish which file I'm working in when I have a couple of scenarios open and all their project files have the same name (op2script).

-Brett

Offline leeor_net

  • Administrator
  • Hero Member
  • *****
  • Posts: 2352
  • OPHD Lead Developer
    • LairWorks Entertainment
Re: LevelTemplate - WithComments?
« Reply #7 on: October 13, 2018, 08:06:25 PM »
That makes a lot of sense, actually. Though as a note that the solution file would need to be modified to match with the project file name change (like if the user renamed the solution).

Offline Hooman

  • Administrator
  • Hero Member
  • *****
  • Posts: 4955
Re: LevelTemplate - WithComments?
« Reply #8 on: October 13, 2018, 11:09:08 PM »
You know, there might be a way to add an actual Visual Studio template, such they they could choose an Outpost 2 level project from the new project menu. Just a thought. I've never actually investigated how to add items there. Probably not too high value, but it might address the project naming issue, so people don't need to clone+rename projects.

Offline Vagabond

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1015
Re: LevelTemplate - WithComments?
« Reply #9 on: October 23, 2018, 07:53:10 PM »
Okay, just finished making the changes outlined above. I passed on renaming the LevelTemplate project. This will prevent someone from having to change the name all the time unless they want to as OP2Script is sort of a decent catch all.

Hooman, I like the idea of creating a VS template. Not sure it is something I will put the time into right now though. There needs to be some research to see how the dependencies would be packaged. It might drive creating a NUGET package for Outpost2DLL that is downloaded for use with the template.

-Brett

Offline Hooman

  • Administrator
  • Hero Member
  • *****
  • Posts: 4955
Re: LevelTemplate - WithComments?
« Reply #10 on: October 24, 2018, 05:33:45 AM »
Hmm, that might also be a good idea. I hadn't thought of using Nuget. I suppose we'd need to create a Nuget organization account.