Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

 
Advanced search

1403811 Posts in 68294 Topics- by 61958 Members - Latest Member: Kvrochi

December 09, 2022, 08:45:34 PM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperTechnical (Moderator: ThemsAllTook)Windows Development. C++.
Pages: [1]
Print
Author Topic: Windows Development. C++.  (Read 803 times)
Jamie W
Level 1
*



View Profile WWW
« on: October 17, 2022, 05:31:00 AM »

Is it possible to create a Windows desktop / mobile and Xbox app; using the same project in MS Visual Studio, and with C/C++? Looking at Universal Windows Platform with C++. Would that work?

I'll be using Direct X, handling window creation, app life-cycle stuff, input etc, myself, no engine etc.

Thanks.
Logged

Jamie W
Level 1
*



View Profile WWW
« Reply #1 on: October 17, 2022, 05:51:29 AM »

Hmm. Looks like UWP is deprecated? What's the best way to develop for Windows Desktop and Xbox using C/C++? Is that even possible?
Logged

Schrompf
Level 9
****

C++ professional, game dev sparetime


View Profile WWW
« Reply #2 on: October 17, 2022, 05:53:50 AM »

Depends on which XBox, and which DirectX, and if you get access to a DevKit. To my knowledge those come only after serious contract work and only with a lot of liabilities. Apart from that it should be doable if you're a seasoned coder. XBoxX/S offer DirectX12 AFAIK, input and stuff should be doable. You'll have to handle a hell of a User Experience Guide, though. The one I saw for the PS4 was >100 pages of regulations, and I imagine it only grew since then.

On the coding side it's just C++ with a special version of Visual Studio you'll get along with the compiler, SDK and so on.
Logged

Snake World, multiplayer worm eats stuff and grows DevLog
Jamie W
Level 1
*



View Profile WWW
« Reply #3 on: October 17, 2022, 06:26:44 AM »

Depends on which XBox, and which DirectX, and if you get access to a DevKit. To my knowledge those come only after serious contract work and only with a lot of liabilities. Apart from that it should be doable if you're a seasoned coder. XBoxX/S offer DirectX12 AFAIK, input and stuff should be doable. You'll have to handle a hell of a User Experience Guide, though. The one I saw for the PS4 was >100 pages of regulations, and I imagine it only grew since then.

On the coding side it's just C++ with a special version of Visual Studio you'll get along with the compiler, SDK and so on.

Many thanks, that's really useful.

I'm getting the impression it's not going to be a trivial job, porting and getting released on Xbox. It may make more sense for me to just target Windows desktop for now; and potentially pay someone to help port to Xbox, if it seems worth doing further down the road.

What would you recommend for just regular Windows game development?

I'm using my own engine (well, layer of abstraction, that sits between my game code, and, the platform game is running on). Already have abstraction layers for Mac, iOS, Android; I'd just want to get something in place for Windows; so setting up a window (only need 1), handling app life-cycle stuff, input, rendering (DX11 I guess, people are saying DX12 is much more complex to setup), sound, etc.

What project type in Visual Studio, should I be looking at; and are there any good sample projects I should check out?

Many thanks again. Smiley
Logged

qMopey
Level 6
*


View Profile WWW
« Reply #4 on: October 18, 2022, 04:41:54 PM »

It's quite difficult to get a game onto the xbox. You need to have the correct DX version supported, and there is a difficult cert process where QA testers make sure you game passes all these little checks. It's time consuming and stressful to pass.

Other than that, I'd say make sure you have a decent windows abstraction. For example sokol_gfx does a great job abstraction low level rendering APIs. You mentioned you have your own abstraction layer. It's not too difficult to get up and running on Windows. Personally I use SDL2 for platform abstraction, but as long as you have something like this you'll be very well setup to pay someone to do an Xbox port later by using the Windows version as a starting point.

Perf can be a problem, but you sound like you probably already know somewhat that console dev is usually more strict about memory management.
Logged
Schrompf
Level 9
****

C++ professional, game dev sparetime


View Profile WWW
« Reply #5 on: October 19, 2022, 03:01:18 AM »

The project type is the last thing I'd worry about. You'll get these if you get the SDK and the DevKit. And if you already abstracted enough to run on both Mobile, Linux and Windows, you're already in a good position, coding-wise.

There are companies who do porting as contract work. Most of these are specialised to one of the large Engines now. One might ask: hey, what work exactly do they perform if the engine already supports deployment? The answer is: the platform-specific handling that you're contractually obligated to get a shot at their shop. As qMopey already said: that's a huge undertaking, it might even be too much for a single coder. Aaaand you only get one round of certification for free with the SDK contract. If they find something and deny certification, you're in for a mid-five-digit payment AFAIK to be allowed to re-submit. The whole process is taylored to AAA productions, as you might have guessed by now.

There was an ultra-cheap second path for indies at the XBox360, XBLIG. I don't know if there is any current option to bypass some of these requirements.

[edit]To maybe add something of value: I got contacted by a porting publisher/developer to bring my game to the Switch. They didn't flinch when I told them I built my own engine aaand the code is mostly German. It it's available in the Nintendo Download shop now. I took from this that Nintendo appears to have less-strict requirements and/or a side path for Indie games. Maybe reconsider your platform choice?
Logged

Snake World, multiplayer worm eats stuff and grows DevLog
Jamie W
Level 1
*



View Profile WWW
« Reply #6 on: October 19, 2022, 03:54:06 AM »

qMopey and Schrompf,

Many thanks, that’s super helpful again. It gives me a better perspective; and I think, considering I’m essentially a solo dev, it doesn’t make any sense targeting Xbox at this time; though, it does make sense to consider it as an option for the future, and developing what I have now, in a way that will make an eventual Xbox port of my game(s), easier. I’d still like to do Windows desktop now though.

Some people had suggested using GDK, and it’s DX12 on Xbox apparently, maybe it’s overkill if I’m just doing Windows desktop?…

Anyhow … I’m now thinking, it could make sense to have two (Microsoft) distinct abstraction layers of my code. A Windows desktop one, and an Xbox one (eventually); rather than trying to combine the two, which was my original idea.

If I do that (and put Xbox off for a future date, which makes a LOT of sense, given what you and others have said); I’m looking at the following:
https://github.com/kevinmoran/BeginnerDirect3D11

This looks like a good start for me. I have done some setup Windows, create DX, render with Direct3D etc, in the past, but it’s been a long while, and I’ve forgot most of it, so a refresher would be good!

Please feel free to post any other resources, if you think they maybe helpful.

Anyhow, many thanks to you both again. Thanks.
Logged

michaelplzno
Level 10
*****



View Profile WWW
« Reply #7 on: November 01, 2022, 08:47:08 AM »

I recommend unity for Xbox, its pretty easy if you know how to code c++, c# is like working with safety scissors. Xbox has a pitch process you have to go through and if you pass they give you dev tools which includes code samples and forums and stuff to tell you how to do c++ dev. Focus on getting through the pitch first.
Logged

Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic