Jump to content
  • Advertisement

Endurion

Member
  • Content count

    3816
  • Joined

  • Last visited

Community Reputation

5454 Excellent

3 Followers

About Endurion

  • Rank
    Contributor

Personal Information

Recent Profile Visitors

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

  1. 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.
  2. 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.
  3. 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.
  4. 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 ); }
  5. 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; }
  6. 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 ) )
  7. The release settings should automatically link only release libraries. Any dependencies that pull in the debug libs?
  8. 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.
  9. 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.
  10. 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.
  11. 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.
  12. 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.
  13. Endurion

    Targeting both Win32 and UWP

    They way I did it was to add a "shared project" with the game's main logic and code. Then add a UWP and a Win32 project with the added reference to the shared project. The UWP and Win32 project respectively only contain the main entry point and a few additional classes required for their platform (like the main game loop) What annoyed me majorly: Sharing assets. UWP can only load from the project folder itself, so I fudged the Win32 project to have the project folder of the UWP project as working directory. This way I only have the assets around once. Unfortunately right inside the code folders. I would have preferred to have a separate asset folder.
  14. Endurion

    I have recompiled everything!

    In newer versions of VS you can set the build output to diagnostic (or other levels). I don't know about MSVC 6, if such an option exists. It will output quite a lot, but it will tell you why it thinks a file needs to be recompiled. Otherwise, check, if any file has a modification date in the future, or is included, but does not exist, that could cause this effect.
  15. Endurion

    Messagebox gives errors after compiler installation

    Also, Community Edition is not only for students, and you may sell your developed games/apps. Unless you are a bigger company which you from the sounds of it aren't. It's pretty clear actually: https://www.visualstudio.com/license-terms/mlt553321/
  • 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!