• Content count

  • Joined

  • Last visited

Community Reputation

5433 Excellent


About Endurion

  • Rank

Personal Information

  1. C++ buffer or vector issue

    Not entirely sure, but the moment you call erase on an vector iterator the iterator is invalid. It happens that you seem to be able to access it's content, but you really shouldn't. Put the erase call as last code before the break.
  2. Blast from the past: While checking my different renderers I've come upon a problem in a Direct3d8 renderer, which I'm pretty sure worked fine already a while ago. Basically I'm drawing a 2d quad with pretransformed vertices, but the first triangle's texture coordinates seem off. I'm offsetting the coordinates by -0.5,-0.5 as per spec and there's not much more to it. The same part with D3D11 using shaders works fine (well, duh). Anyhow, I'm still curious, as the DX8 renderer is still my final fallback and it currently is supported quite well. Anybody see any glaring mistake? The code in question is this, the texture is a 16x16 pixel sized cut out from a 256x256 texture, these values are used. FWIW I'm running on Windows 10 with some AMD Radeon 5450. iX = 22 iY = 222 Texture rect from the full texture are is (144,0 with 16x16 size) The drawn box is drawn scaled up to a size of 40x40 pixels m_DirectTexelMapping.offset is a 2d vector with values -0.5, -0.5 I've set min-, mag- and mip-mapping filter to nearest. struct CUSTOMVERTEX { D3DXVECTOR3 position; // The position float fRHW; D3DCOLOR color; // The color float fTU, fTV; }; CUSTOMVERTEX vertData[4]; float fRHW = 1.0f; GR::tVector ptPos( (float)iX, (float)iY, fZ ); GR::tVector ptSize( (float)iWidth, (float)iHeight, 0.0f ); m_pd3dDevice->SetVertexShader( D3DFVF_XYZRHW | D3DFVF_DIFFUSE | D3DFVF_TEX1 ); vertData[0].position.x = ptPos.x + m_DirectTexelMappingOffset.x; vertData[0].position.y = ptPos.y + m_DirectTexelMappingOffset.y; vertData[0].position.z = (float)ptPos.z; vertData[0].fRHW = fRHW; vertData[0].color = dwColor1; vertData[0].fTU = fTU1; vertData[0].fTV = fTV1; vertData[1].position.x = ptPos.x + ptSize.x + m_DirectTexelMappingOffset.x; vertData[1].position.y = ptPos.y + m_DirectTexelMappingOffset.y; vertData[1].position.z = (float)ptPos.z; vertData[1].fRHW = fRHW; vertData[1].color = dwColor2; vertData[1].fTU = fTU2; vertData[1].fTV = fTV2; vertData[2].position.x = ptPos.x + m_DirectTexelMappingOffset.x; vertData[2].position.y = ptPos.y + ptSize.y + m_DirectTexelMappingOffset.y; vertData[2].position.z = (float)ptPos.z; vertData[2].fRHW = fRHW; vertData[2].color = dwColor3; vertData[2].fTU = fTU3; vertData[2].fTV = fTV3; vertData[3].position.x = ptPos.x + ptSize.x + m_DirectTexelMappingOffset.x; vertData[3].position.y = ptPos.y + ptSize.y + m_DirectTexelMappingOffset.y; vertData[3].position.z = (float)ptPos.z; vertData[3].fRHW = fRHW; vertData[3].color = dwColor4; vertData[3].fTU = fTU4; vertData[3].fTV = fTV4; m_pd3dDevice->DrawPrimitiveUP( D3DPT_TRIANGLESTRIP, 2, &vertData, sizeof( vertData[0] ) ); God, I hate this borked message editor, it's so not user friendly. This POS message editor really loves to f*ck up code formatting.
  3. A Windows Store Story - Part #3

    A few days have passed since I uploaded the game. I did no advertising whatsoever, but the two blog entries I had here. So I've been watching the dashboard closely, to see if somebody actually looked at and installed the game. And a handful (literally) did Joy! I even got a feedback which can all be conveniently inspected in the dashboard. Unfortunately I've also got crash reports. In one case I received a stack trace. I have a hunch what might be the cause (I've called QueryInterface without checking the HRESULT. I should've known better!) Currently I'm on vacation and have only access to a Windows 7 laptop. And unfortunately on this Visual Studio 2015 prefers to crash when I try to create new packages. I'm pretty happy I can actually compile though; and also the manual package creation via command line does work fine. Go figure. Downside, I obviously can't test or debug the compiled game at all. So I have to wait before uploading a fix to the store. In the meantime I got access to a Windows mobile phone (which is actually pretty good IMHO). Just for kicks I deployed the game and it worked perfectly. If you disregard no possible keyboard entry or back button support. Over the last few days I've made a few adjustments to the code so now back button works, and overlay touch controls are also available (for phone only). I have also tried to add tilt support (both via Gyro and OrientationSensor - the first one is not supported by that phone, and the latter seems to be lagging quite a bit). Once I manage to get keyboard support I also have to try to make the game GUI somewhat more phone friendly (a tree control isn't really all that fit for big fingers). Overall I'm pretty satisfied as how well the same app performs as pure Win32, as UWP app on desktop and on phone.
  4. Well, there's the ominous 0th law, that Giskard(?) abstracted on his own: A robot may not harm humanity, or, by inaction, allow humanity to come to harm. That ones would be able to override lower laws, e.g. might a being be harmed to avoid harm to humanity. But I seriously doubt AI will ever get that far to grasp rather philosophical concepts.
  5. Awesome, kind of Thanks a lot for re-testing. I'll have a look about the fullscreen issue. I owe you one!
  6. October 2017 GameDev Challenge: Arcade Battle Arena!

    Replaced the D for next level with Shift-D. Now that shouldn't interfere with WASD anymore. Uploaded and replaced the old file. Thanks for the feedback!
  7. I think I found the cause. The crap laptop I have here has a problem getting a proper IDX11Device2. Since I didn't even require it to be 2 I replaced that with a plain IDX11Device and it works. I've uploaded the replaced file to the same link: http://www.georg-rottensteiner.de/files/GDMissileCommand.zip If you could try to see if that one works that'd be awesome. Thanks a lot!
  8. I'm on a cheap laptop the next few days, so probably hard to get a video up. Regarding the crash, I'll have to look. It's compiled with VS 2015, defaults to DX11 for the renderer, but will automatically fall back to DX9 and/or DX8 if that fails. I'll try to see what could cause the crash. Are there any details in the crash message? Oh, and thanks for letting me know!
  9. October 2017 GameDev Challenge: Arcade Battle Arena!

    I'm a genius Let me guess, you used WASD? I've hard wired D as level complete, sorry! I'll see to up a fixed version!
  10. Search broken?

    My bad, seems Ghostery blocked the Google Search API link. I had deactivated AdBlock for GameDev, but obviously not Ghostery. Works now, with lots of ads in between
  11. I'm just trying to look for threads about XAudio2. I've tried both XAudio and XAudio2 as search terms. In both cases the results page is totally empty. I know for sure there are threads about those topics, so I doubt the result is correct. Is there a known issue? FWIW I'm using Windows 10 with Edge.
  12. Here goes my entry! Right now it's more or less a straight Missile Command clone. I couldn't help it but use the trophy image as the in game missile Per default use the mouse and keys 1, 2, 3 to fire the cannons. Protect and survive! Download from http://www.georg-rottensteiner.de/files/GDMissileCommand.zip Edit: Updated archive with source code (only the main game code, not the overall library code, sorry!)
  13. Had that one as well, notified KHawk already.
  14. Marshal is your friend, here's a sample: https://stackoverflow.com/questions/188299/marshal-c-struct-array-into-c-sharp
  15. A Windows Store Story - Part #2

    Let's get back to the creating an app package and uploading part, as that is where I experienced some difficulties. I had an locally working Universal Windows Platform game, a Microsoft account and Visual Studio Community 2015. So per instructions you'd right click on your app in Solution Explorer, choose "Store->Create App Packages". Sounds easy, but didn't work. A dialog came up and showed an error about not being able to connect to my account and Visual Studio actually hung. I had no idea why that part wouldn't work. Restarted Visual Studio, updated the SDK, rebooted, nothing changed. Than, after reading that dialog more focused, it dawned to me. A plain Microsoft account does not suffice, you need an actual developer account. This is two different things! So off on developer.microsoft.com I created an account, paid the required license fee (something akin to 9 Euros) and voila, the dialog would suddenly work! From here on I created the App Packages, which required a few more settings to enter. Here's another stumbling block I encountered: You need to provide a few logos/badges/icons. All in a gazillion formats, scaled 100% and 200%. Here I wish you could provide one image and have the other formats auto-created. From there you could still polish up or replace the uglier ones. If you ever want to modify the settings of your app either double click "Package.appxmanifest" or via menu Project->Store->Edit App Manifest" Finally my app packages compiled successfully (per default you'll have x86, x64 and ARM). Then came the Application Verifier... The Application verifier will run your app several times, check your icons/badges and after a few minutes return a result of either "failed" or "passed". The link behind that will show you the details why something failed. The listed errors are also linked to a web site explaining the messages in detail. For example one of my failures was explained as "The first pixel of the icon is not 0xffffffff or some other value)". What that message actually means: Those particular icons are supposed to be two colors only. You'd expect that to be shown when you select that image in the app properties. Next time more details about the uploading part.