Jump to content
  • Advertisement


  • Content count

  • Joined

  • Last visited

Community Reputation

5456 Excellent


About Endurion

  • Rank

Personal Information

Recent Profile Visitors

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

  1. Endurion

    about DirectX SDK

    DirectX is nowadays included in the Windows SDK. Visual Studio comes with at least one version of that Windows SDK. If you want older DirectX versions you still have to get the DirectX SDK though.
  2. Endurion

    DirectInput release key not detected

    Are you pressing other keys at the same time? There's a lot of keyboards where some key combinations do not register (try two cursor keys with space for example). If that is the problem it's a hardware issue and you really can't do anything about it but use different keys. Custom key mapping is always recommended.
  3. This hints on a required .NET SDK missing: [fail]: OmniSharp.MSBuild.ProjectLoader The reference assemblies for framework ".NETFramework,Version=v4.7.1" were not found. To resolve this, install the SDK or Targeting Pack for this framework version or retarget your application to a version of the framework for which you have the SDK or Targeting Pack installed. Note that assemblies will be resolved from the Global Assembly Cache (GAC) and will be used in place of reference assemblies. Therefore your assembly may not be correctly targeted for the framework you intend.  Off topic: Rant on really bad message editor of Gamedev.net (text color can't be changed)
  4. These are really essential debug skills. When you get your crash when running in debug mode double click on the entry in the call stack window where it says game.exe!APPLICATION::Update. VS will set the cursor to the line that was called before entering std::vector code. Copy the code there and the lines above and paste them here. It sounds like you're using an iterator of one vector with a function of a different vector. Regarding old versions: Something must be off in your project when you can't get it to compile. I suspect the book author set some weird configurations. You can compile for XP with VS 2015 fine (even with DX8 or DX9), if you keep to the older APIs.
  5. Endurion

    Latest from GameDev.net - May 2018

    The breakage of my journal entries was not entirely convincing to go ahead with tutorials I do hear the call though. Also, the message editor, my personal pet peeve, is simply crap. It's trying to be a word processor and fails. If you want to have word processor documents, let me upload a .doc file which I can conveniently edit offline. A web browser is still 20 years from being an adequate replacement for real programs. At least add a bbcode mode so the formatting is actually visible and editable. I really hate the single-enter-results-in-paragraph mode. Regarding groups, I still do not see any kind of benefit they have over plain forums. Maybe you could work on promoting the group advantages. What could convince me if they were available for all forums and you could also reorder the personal group list. Regarding projects: Could you also add Microsoft Store as source like there's for AppStore, Steam, etc.? TLDR: I'm probably just getting old and grumpy, but I don't like things getting in my way and slowing me down.
  6. I don't know it either, but the second link in Google gave me this: http://developer.download.nvidia.com/assets/gamedev/docs/Guard_Band_Clipping.pdf Which seems to contain a great explanation about the surrounding feature. I can't however find any docs regarding that particular flag, ie. it's not clear what the object of the extents is.
  7. Endurion

    Migrating from Win32 (DX) to UWP

    I added an UWP wrapper to my C++ game framework and there are a few things to consider. I'm happy to share code bits if that helps. Regarding the templates trojanfoe mentioned, they're the way to go. Albeit there were different versions, one with XAML, the other without. I always had problems getting the XAML one to work properly. 1) For Fullscreen, IDXGISwapChain::SetFullScreenState is what you're looking for. Note that it usually does not do real fullscreen with screen mode change, but simply modifies your window to cover the whole screen. 2) For setting the size of the window the following snippet helped (use inside the OnActivated handler): Windows::Foundation::Size desiredSize; if ( pApp->m_ForceFixedSize ) { float DPI = Windows::Graphics::Display::DisplayInformation::GetForCurrentView()->LogicalDpi; Windows::UI::ViewManagement::ApplicationView::PreferredLaunchWindowingMode = Windows::UI::ViewManagement::ApplicationViewWindowingMode::PreferredLaunchViewSize; desiredSize = Windows::Foundation::Size( ( (float)pApp->m_RenderFrame.Width() * 96.0f / DPI ), ( (float)pApp->m_RenderFrame.Height() * 96.0f / DPI ) ); Windows::UI::ViewManagement::ApplicationView::PreferredLaunchViewSize = desiredSize; } CoreWindow::GetForCurrentThread()->Activate(); if ( pApp->m_ForceFixedSize ) { bool result = Windows::UI::ViewManagement::ApplicationView::GetForCurrentView()->TryResizeView( desiredSize ); } 3) For key presses I've added several handlers: Windows::UI::Core::SystemNavigationManager::GetForCurrentView()->AppViewBackButtonVisibility = Windows::UI::Core::AppViewBackButtonVisibility::Visible; Windows::UI::Core::SystemNavigationManager::GetForCurrentView()->BackRequested += ref new Windows::Foundation::EventHandler<Windows::UI::Core::BackRequestedEventArgs^>( s_Mediator, &XInputCLRMediator::OnBackRequested ); // Detect gamepad connection and disconnection events. Gamepad::GamepadAdded += ref new Windows::Foundation::EventHandler<Gamepad^>( s_Mediator, &XInputCLRMediator::OnGamepadChanged ); Gamepad::GamepadRemoved += ref new Windows::Foundation::EventHandler<Gamepad^>( s_Mediator, &XInputCLRMediator::OnGamepadChanged ); // event handlers last, so everything else is initialised. They seem to trigger right away m_KeyDownToken = coreWindow->KeyDown += ref new Windows::Foundation::TypedEventHandler<Windows::UI::Core::CoreWindow ^, Windows::UI::Core::KeyEventArgs ^>( s_Mediator, &XInputCLRMediator::OnKeyDown ); m_KeyUpToken = coreWindow->KeyUp += ref new Windows::Foundation::TypedEventHandler<Windows::UI::Core::CoreWindow ^, Windows::UI::Core::KeyEventArgs ^>( s_Mediator, &XInputCLRMediator::OnKeyUp ); m_OnCharToken = coreWindow->CharacterReceived += ref new Windows::Foundation::TypedEventHandler<Windows::UI::Core::CoreWindow ^, Windows::UI::Core::CharacterReceivedEventArgs^>( s_Mediator, &XInputCLRMediator::OnCharacterReceived ); m_PointerMovedToken = coreWindow->PointerMoved += ref new Windows::Foundation::TypedEventHandler<Windows::UI::Core::CoreWindow ^, Windows::UI::Core::PointerEventArgs ^>( s_Mediator, &XInputCLRMediator::OnPointerMoved ); m_PointerPressedToken = coreWindow->PointerPressed += ref new Windows::Foundation::TypedEventHandler<Windows::UI::Core::CoreWindow ^, Windows::UI::Core::PointerEventArgs ^>( s_Mediator, &XInputCLRMediator::OnPointerMoved ); m_PointerReleasedToken = coreWindow->PointerReleased += ref new Windows::Foundation::TypedEventHandler<Windows::UI::Core::CoreWindow ^, Windows::UI::Core::PointerEventArgs ^>( s_Mediator, &XInputCLRMediator::OnPointerMoved ); m_PointerWheelChangedToken = coreWindow->PointerWheelChanged += ref new Windows::Foundation::TypedEventHandler<Windows::UI::Core::CoreWindow ^, Windows::UI::Core::PointerEventArgs ^>( s_Mediator, &XInputCLRMediator::OnPointerMoved ); Special notes: Be careful with the input handlers, they fire right away, even before your init routine finishes! You also have to remove the handlers once you're done. You can use the returned token to remove them (see below). Also, if you go for non PC as well, make sure you use the back button properly (the BackRequested and AppViewBackButtonVisiblity handlers above). You do want to be able to close your app on the phone as well. auto coreWindow = Windows::UI::Core::CoreWindow::GetForCurrentThread(); coreWindow->KeyDown -= m_KeyDownToken; coreWindow->KeyUp -= m_KeyUpToken; coreWindow->CharacterReceived -= m_OnCharToken; coreWindow->PointerMoved -= m_PointerMovedToken; coreWindow->PointerPressed -= m_PointerPressedToken; coreWindow->PointerReleased -= m_PointerReleasedToken; coreWindow->PointerWheelChanged -= m_PointerWheelChangedToken; And then there's the gyro and a few other input methods, that can optionally be used. Be prepared that all of them are optional: m_Gyrometer = Windows::Devices::Sensors::Gyrometer::GetDefault(); if ( m_Gyrometer != nullptr ) { // Establish the report interval unsigned int minReportInterval = m_Gyrometer->MinimumReportInterval; unsigned int reportInterval = minReportInterval > 16 ? minReportInterval : 16; m_Gyrometer->ReportInterval = reportInterval; // Assign an event handler for the reading-changed event m_Gyrometer->ReadingChanged += ref new Windows::Foundation::TypedEventHandler<Windows::Devices::Sensors::Gyrometer^, Windows::Devices::Sensors::GyrometerReadingChangedEventArgs^>( s_Mediator, &XInputCLRMediator::OnReadingChanged ); } m_Sensor = Windows::Devices::Sensors::OrientationSensor::GetDefault(); if ( m_Sensor != nullptr ) { unsigned int minReportInterval = m_Sensor->MinimumReportInterval; unsigned int reportInterval = minReportInterval > 16 ? minReportInterval : 16; m_Sensor->ReportInterval = reportInterval; m_Sensor->ReadingChanged += ref new Windows::Foundation::TypedEventHandler<Windows::Devices::Sensors::OrientationSensor^, Windows::Devices::Sensors::OrientationSensorReadingChangedEventArgs^>( s_Mediator, &XInputCLRMediator::OnOrientationReadingChanged ); }
  8. Endurion

    DirectInput GUID compare

    You're still using MAKEDIPROP on a non-GUID. A DIPROPRANGE struct simply does not have a GUID as member. Since you're assumedly inside your EnumObjects callback, the GUID is in your instance object: for (int i = 0; i < sizeof (guidNames)/sizeof (guidNames [0]); ++i) { if (guidNames [i].Guid == instance->guidType ) cout << "---------------------------------------" << guidNames [i].GuidString << endl; }
  9. Endurion

    DirectInput GUID compare

    MAKEDIPROP treats the parameter as a pointer to a GUID. dwObj isn't one. instance has guidType however, so this should work: if ( GUID_XAxis == MAKEDIPROP( &instance->guidType ) )
  10. The release settings should automatically link only release libraries. Any dependencies that pull in the debug libs?
  11. NuGet Packages usually bring class libraries, and these are always additional dlls. Visual Studio always copies all required references into the bin folder. There are ways to embed assemblies (ILMerge) so you end up with one executable, but it's somewhat cumbersome.
  12. Endurion

    Visual Studio C++ Question

    So you basically don't want the project folder inside the solution folder? That's a checkbox when creating a new solution with project. You can manually copy the project folder to the solution folder level and then remove and re-add the project in Solution explorer. Note that you can have only one project cleanly in the solution folder then.
  13. Check the timestamp of the file (if it's odd, too old or in the future) and make sure it's included in the project. You might try to crank up the build output to diagnostic. It'll show pretty every decision it makes, there might be some reason why in there.
  14. Endurion

    Targeting both Win32 and UWP

    It's coming with VS 2015 (probably in earlier versions too). Just create a new project, it's under C++, Generic, Shared Items Project. For other projects including this, right click on the project in the Solution Explorer, "Add Reference". There should be an option now, "Shared Projects", set a check mark and you're done. The shared project itself has no build action, it's just a container for the files.
  15. Endurion

    Targeting both Win32 and UWP

    It's a container of shared code. All the files in the shared project are treated as simply being included in the other projects. Which also means they're compiled separately for every project that references them.
  • Advertisement

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!