Advertisement Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

  • Days Won


GalacticCrew last won the day on August 12 2018

GalacticCrew had the most liked content!

Community Reputation

35 Neutral

About GalacticCrew

  • Rank

Personal Information


  • Twitter

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Actually, the list of outputs is empty for all adapters except the first one (whichever that is).
  2. Thanks for your response, but why does it work if I compile my game with the Debug configuration? I do not use other externals, libraries, etc. Do you know how other games do it? I mean, I do not need to change any settings for a game like Battlefield 1. It automatically uses the correct adapter - in fullscreen.
  3. Some computer configurations have multiple GPUs, e.g. gaming laptop with an Intel HD Graphics chip and a GeForce or Radeon chip. When enumerating through the available adapters on a computer, the Intel chip is the first one in most cases. However, I want to use the best adapter for my game. So I wrote the code below to create my swap chain: protected void CreateDevice(Size clientSize, IntPtr outputHandle) { ProcessLogger.Instance.StartFunction(this, "CreateDevice"); // Set swap chain flags, DXGI format and default refresh rate. _swapChainFlags = SharpDX.DXGI.SwapChainFlags.None; _dxgiFormat = SharpDX.DXGI.Format.R8G8B8A8_UNorm; SharpDX.DXGI.Rational refreshRate = new SharpDX.DXGI.Rational(60, 1); // Get proper video adapter and create device and swap chain. using (var factory = new SharpDX.DXGI.Factory1()) { SharpDX.DXGI.Adapter adapter = GetAdapter(factory); if (adapter != null) { ProcessLogger.Instance.Write(String.Format("Selected adapter: {0}", adapter.Description.Description)); // Get refresh rate. refreshRate = GetRefreshRate(adapter, _dxgiFormat, refreshRate); ProcessLogger.Instance.Write(String.Format("Selected refresh rate = {0}/{1} ({2})", refreshRate.Numerator, refreshRate.Denominator, refreshRate.Numerator / refreshRate.Denominator)); // Create Device and SwapChain ProcessLogger.Instance.Write("Create device."); _device = new SharpDX.Direct3D11.Device(adapter, SharpDX.Direct3D11.DeviceCreationFlags.BgraSupport, new SharpDX.Direct3D.FeatureLevel[] { SharpDX.Direct3D.FeatureLevel.Level_10_1 }); ProcessLogger.Instance.Write("Create swap chain."); _swapChain = new SharpDX.DXGI.SwapChain(factory, _device, GetSwapChainDescription(clientSize, outputHandle, refreshRate)); ProcessLogger.Instance.Write("Store device context."); _deviceContext = _device.ImmediateContext; } } ProcessLogger.Instance.EndFunction(this, "CreateDevice"); } For this function to work properly, I have to select the proper adapter in GetAdapter. Here is what it looks like: private SharpDX.DXGI.Adapter GetAdapter(SharpDX.DXGI.Factory1 factory) { List<SharpDX.DXGI.Adapter> adapters = new List<SharpDX.DXGI.Adapter>(); for (int i = 0; i < factory.GetAdapterCount(); i++) { SharpDX.DXGI.Adapter adapter = factory.GetAdapter(i); if (SharpDX.Direct3D11.Device.IsSupportedFeatureLevel(adapter, SharpDX.Direct3D.FeatureLevel.Level_10_1)) adapters.Add(adapter); } try { foreach (var adapter in adapters) if (adapter.Description.Description != null && (adapter.Description.Description.Contains("GeForce") || adapter.Description.Description.Contains("Radeon"))) { return adapter; } } catch { } return adapters.First(); } So all I am doing is asking my Factory1 for a list of all adapters that support FeatureLevel 10.1 and search for a "GeForce" or "Radeon" one. Very simple and use that one. This works like a charm. HOWEVER, there is one big problem: When I use this code in the Release build the game crashes when going to fullscreen using the code below. public void SetFullscreenState(bool isFullscreen) { if (isFullscreen != _swapChain.IsFullScreen) _swapChain.SetFullscreenState(isFullscreen, null); } The error code is DXGI_ERROR_UNSUPPORTED and after doing some research I found out, that this problem only happens for the Release build but not for the Debug build. The Debug build works like a charm. It also crashes only, if the selected adapter is not the first one in the list. So, if I use the first adapter (factory.GetAdapter(0)), it works! If I change my computer settings so that my GeForce is used as primary adapter for my game, it works. It only does not work for the Release build, if the selected adapter is not the first adapter in the list and I can't figure out why... The problem is independent from the used screen or other running applications in a multi-windowed application. I already tested that.
  4. I love creating technology and designing software architecture. However, creating the actual game gives you other forms of satisfaction like player feedback, revenues or transforming a creative idea into an actual product.
  5. In my last compay we used a software component from a small but specialized company from Finland. We made a contract to buy several licences for their product under the condition that we gain complete access to the source, if the company runs out of business or reported bugs don't get solved within a certain time. We never had to use this clause, but it is something that's stuck with me. I have to say again, the more I read your replies the more I am convinced to stick with my own game engine. I worked on both games today (like every day) and made great progress and I sometimes forget what I've already achieved. My thoughts were circling around the question how much time it takes to implement the new visual features (fire, water, smoke) I need and I forgot all the basic stuff I did, like the Translation framework integrated in all my engine components. Clicking a button and the entire user interface is translated in real-time for example.
  6. I switched my website from Wordpress so old school HTML, because Wordpress itself is not GDPR compliant and I always live by the rules. Call be boring, but I don't want to risk anything, especially in business. The great thing about Unity is that you make things look good very easily. I used their environment for some time to check out how things are handled their and what they offer. Back then, I decided to stick with my own game engine. The more answeres I read here the more I am sure I will stick with my game engine. I was not aware of that. This alone would be enough for me not to use Unity for my business. Do you remember the shitstorm after players discovered the Redshell component in some games a few weeks ago? This might be even worse. Before I launched my game on Steam, I had 70 test players that were given an early Alpha version that included metrics like play duration, bug reports, when players lose, etc. This information was sent to my servers as soon as the game was closed. However, every single player signed a document in which he agreed to this data collection and it listed all things I monitor. I wouldn't even dream about adding any form of data collection to any of my games. It would be very useful to me to see how long players play my game or which updates let players return to the game. But this would violate my player's privacy. I wouldn't do that! I also don't want to be monitored by other companies. In my last job we had a time tracking software we had to use to write down all our activities for each day. This is fine to me, because my boss paid me to do work for him and he deserves to know what he is paying for. But other companies should not be allowed to monitor me...
  7. The discussion is drifting away from the topic. I was thinking about not answering your last thread, but this would've made a false impression. You are free to contact me via PM to discuss anything unrelated to this topic.
  8. I wouldn't change the game engine anything for this project! My initial question targets my games that might come in the future. The second game is already in production and will be announced in the next weeks. I have a large collection of different video game concepts and I selected something I can create at the same time as Galactic Crew. Since the engine is the same, I instantly had everything from basic game features, settings, UI controls, input management, asset management, pathfinding, state machines, etc. It wasn't much to add before I had a playable mock-up. The main work of the second game is done by freelancers (2D artists, screenwriters, level designers, etc.). This way, I can manage both projects at the same time. I also wanted to start a second project while Galactic Crew is still in development, because it will make sure I can continue my work next year! Like most Indie games, the sales of Galactic Crew declined in the first year. If I want to continue to make games next year, I can either abandon the game and start something new or need a second source of income. I expect the upcoming Steam Sales to be as good as the last ones (the numbers are pretty constant), but this won't be enough to finance an entire year of development after I paid my taxes (they are pretty high in Germany...)! As one can clearly see in the Steam discussions, I care about every single player and issue. Bugs are normally fixed within hour if possible, almost all requested features were added within the next two updates and so on. I also get a lot of very positive e-mails from players who enjoy the game. It isn't done yet, but I improved the game and its engine dramatically over the past 10 months and I will continue my work.
  9. Thank you I haven't watched the video, but is it compliant to Europe's GDPR? In Germany privacy is super important, e.g. the governmant can hardly install any cameras in public areas for this reason. Using another company's or person's game engine is definitely something good. The purpose of this thread was not to choose what is better: Creating your own engine vs. Using someone's engine. The question was if I should switch in my particular situation. I am very sure that game engines have their value and if someone wants to create a game he should not be forced to write his own engine. When people build their own car in their garage they normally do not build the engine, transmission or tires by themselves. 😄 If the profit is well enough at the end of the year, I will continue making games and then I'll decide whether I switch or not. If I don't switch I am going to put my game engine online so other people might find some inspiration (or not..).
  10. I have my game engine in one repository, my toolset (like the Asset Converter or Code Generator) are in a second repository and the games (two at the moment) are in a third one. The game repository has externals to the other repositories, so when I update it, I have all sources. I have a single Microsoft Visual Studio solution in my game repository. So I can click on "Compile All" and check, if my changes at any low level component has effect on any other part of any of my projects. In addition, it makes it very simple to run Unit Tests from a single solution. I don't like this approach to be honest. When I started writing my game engine I did not know what was laying ahead of my (skinned animation, soft shadowing, PBR shaders, ...), so there were countless changes and updates. I handle my game engine like a virtual creature: handle it well and make sure it evolves in the right direction. Source code should always be as generic as possible. My first game is a 3D space exploration game, while my second game is a 2.5D adventure game. It uses totally different techniques (for example Sprite Animation vs. 3D Skinned Animation), but the game framework is the same. The user interface system is the same. And so on..
  11. I agree. I haven't made my decision yet, but I think I will continue developing my own game engine. It might result in a longer production cycle for the third game, but I think the experience I get will be great. In addition, future games will have these features for free, because I already developed them. I think it's safe to say that we've learned from this thread that every developer should decide in their case if it makes sense to develop their own engine or use a ready-to-use one. I have to mention again, that I believe it does not make sense to start developing your own 3D engine, when you want to start to a business. I wouldn't have done, but I already had my engine when I started my business.
  12. I totally agree with you! Thank you
  13. This is actually what I am doing right now. I wanted to make my game look nicer, so I added Soft Shadowing an better gloomy laser effects to my engine. The code is so generic that it is used in any 3D game using my engine, if you turn on the shadow or gloom effect switch. For my second game, I needed support for background images in my user interface controls and 2D sprite animations, so I added this support. Again, it is so generic, that it can be used by any game. The third game will feature water, smoke and fire effects. So my game engine gets bigger with each of my projects.
  14. That's a very good point! I got very positive feedback from players, because I always fix all bugs as soon as possible. Normally, a reported bug is fixed within few hours. This include problems with the engine. I can't be that fast if I use an engine that are just DLLs. If I have access to an engine's sources I can fix it by myself and ask the engine's author to include my pull request. Have you checked other open source engines? From what I've read so far there are several persons even in this discussion that have developed their own engines. I enjoy creating the game engine and the creative process of creating a game. Oh, I forgot: I also enjoy getting my profit from Steam, Green Man Gaming, etc. at the end of a month. 😄
  15. True! I don't think so. In Unity you can load almost any animation file for bipedal creatures and apply them on almost any rigged model. You can just do it by using their user interface. You neither need to program the Skinned Animation nor the mapping process (which is a lot fun with Linear Algebra). You can also apply effects using their UI without having to code them. Soft Shadowing for example requires several render passes (getting depth map from light's view, creating light map, blurring light map, rendering the scene). As someone was pointing out at some point you might have to go down deep into the architecture when using Unity, but you can accomplish a lot of stuff without it.
  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!