Jump to content
  • Advertisement
Sign in to follow this  
Noxil

Opinions on a tool im making

This topic is 1751 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello what i want to achieve with this thread is to get some feedback from you guys from your experience with

how it is to set up a new game project for your or a pre existing engine.

And it would be great to get some feedback on my current setup.

 

So.. The tool im making is meant to be used like this, you want to start a new game project with the game engine.

Use the tool, type in the name of the new game project and the tool will generate the folder structure on the correct places

and it will also generate vcxproj, vcxproj.filter, vcxproj.user, sln and bat files for pre and post build events.

 

The idea came about after one of my pre build tools was completed and i realized if i ever was going to create a new game project

id have to go through and make sure that all pre and post build events are setup correctly. Not to mention the normal procedures 

of setting up the sln with all engine projects and project dependencies etc etc...

 

What i hope to gain from this is to be able to easily setup new projects and just get started and know that everything will just work.

I dont want to have to spend 30 minutes on making sure everything is setup correctly.

 

Im sure the topic "folder structure" is one that can go on for ever, but id like to share my first draft of a folder structure for how things will look
when the tool is used,

 

root (root folder of all code and content)

- Engine (containing all engine projects and engine resources)

- GameX (named based on input in the tool)

- GameX - Build

- GameX - Build - Debug

- GameX - Build - Release

- GameX - BuildConfig (pre, post build bat files)

- GameX - Resources (all the resources the game uses)

- GameX - Src (code for GameX)

- GameX - Work (raw work files, like .psd .fbx etc etc)

- GameX - GameX.sln
- GameX - GameX.vcxproj
- GameX - GameX.vcxproj.filters
- GameX - GameX.vcxproj.user
 
So when you wanna work on GameX then you simple open GameX folder and open its .sln file.
It should then be setup correctly to use the projects from Engine.
And whenever you compile in debug or release the builds will end up in the Build folder.
 
So any feedback, thoughts, ideas or questions is more then welcome smile.png

 

 

Share this post


Link to post
Share on other sites
Advertisement

Sounds like something that can be easily accomplished with any build system. CMake comes to mind. It sucks, but perhaps less than the alternatives. Anyway, you would just write a CMakeLists.txt that will create your given directory structure as necessary and create properly configured project files with your pre and post-build hooks, compilation arguments, dependencies, library/include paths, a stub codebase, and whatever else you want. 

 

Keep this CMakeLists somewhere handy, copy it to your new project root, and then just run something like: 

cmake -DPROJECT_NAME=GameX

whenever you want to generate a new project. This all depends on how you write your CMake script...it can be quite powerful if you so choose. Doing it with CMake would also grant you some key features like automatic dependency resolution, minimal rebuilds/reconfiguration, and some degree of reproducability and platform independence. If you write a script on your own, it probably won't be general enough to work anywhere but your exact environment...cross-platform or otherwise.

Share this post


Link to post
Share on other sites

Thanks for the tip on CMake, had totally overlooked it.

I will look into how it works and try some stuff out.

 

You have a great point about that it will most likely only work on my environment and only on the OS i work in.

I think i want to write the tool myself, it turned out to be quite fun and its only for my personal usage.

But i will definitely take note on the cross platform issue.

 

Do you use CMake? 
If so, have you configured it to suit your projects so you dont have to keep coming back to changing any of its settings,

or do you find that from time to time that there are some settings that you would like to change?

 

Im wondering if this is something that i should consider or, if id just have the tool generate the default files with my settings and if the user 

wants to do any tweaks he can do it after the files have been generated.

Share this post


Link to post
Share on other sites


I think i want to write the tool myself, it turned out to be quite fun and its only for my personal usage.

 

I feel you, I do the same thing from time to time.

 


Do you use CMake? 
If so, have you configured it to suit your projects so you dont have to keep coming back to changing any of its settings,
or do you find that from time to time that there are some settings that you would like to change?

 

I do, extensively. I sometimes have to change things, for instance to account for new dependencies or changes to the way they need to be linked as new versions are released. And really, in practice, your directory structure is probably not as fixed as you'd like it to be. Also, new platforms are not as straightforward as they should be, and generally require at least a little bit of custom code. I can deploy new clean projects using my game engine to Windows, Linux, iOS (simulator AND hardware), and OSX with my current build scripts, but getting to that point was not at all trivial...although that is the intention of CMake. I gather that adding support for Android will be another big hassle.

 


Im wondering if this is something that i should consider or, if id just have the tool generate the default files with my settings and if the user 
wants to do any tweaks he can do it after the files have been generated.

 

Your approach could work, but you might as well just let them parameterize your tool in the first place with their desired settings. I use the same script to generate slightly different builds for the iOS simulator and iOS hardware:

cmake -DIOS_PLATFORM=SIMULATOR
vs. 
cmake -DIOS_PLATFORM=OS

Of course, I can put these in different build trees, and I can rerun cmake to update those trees as project settings change, which certainly happens. It's not so hard to add basic command line arguments. I don't know enough about your exact use case to comment further. I've found CMake to be tremendously obtuse, so I have a hard time recommending it, it's just that at some point you might realize that your tool is just reinventing the wheel and have to concede defeat anyway (I'm not saying that that's the case here, yet :p)

Share this post


Link to post
Share on other sites

Thanks for your feedback, i think ill have to try out CMake before proceeding with my own tool.

Hopefully i can pickup some of the good and see what some of the bad is about it :)

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!