Jump to content
  • Advertisement

Steven Ford

  • Content count

  • Joined

  • Last visited

Community Reputation

131 Neutral

About Steven Ford

  • Rank

Personal Information

  1. HI Eddie, looking at the images, my 2 cents would be: - on the base images, you've got what looks to be metallic shapes. Could you add a height / normal map to add some more 'visualness' to it, or even use tessalation? - Same with the grass. This looks excessively repetitive, can you have a number of different textures and then randomise them? Dry patches? darker patches etc. - on the item with the rings, the rings appear to be highly lit but then they cast a shadow, that looks a bit weird to me Obviously neither of the above make any difference to the gameplay, but they would add to the initial appeal. Steve
  2. Steven Ford

    Migrating from Win32 (DX) to UWP

    Thanks guys, very much appreciated. I think the templates are indeed the way to go. I'll see what I can do.
  3. Hi all, I've been working on a game for sometime now, and it's getting close to completion. Thinking about the target market of the game, I'd like for it to be able to work on the X1 and Windows Store to make it more accessible. There's a screenshot below if you're interested, one has to get the fluid from the top to the bottom, solving various puzzles as you go along. The main advantage of the X1 would be sofa-based multi-player where players are racing against each other, each with their own instance of the level. The game itself is structured that it there's a layer of abstraction between the Win32 inputs (keyboard etc.), Win32 message queue etc. so I now have, essentially, an orchestrating layer which gets initialised with the DX items (swap chain, RTVs) and presents the caller with a frame method to handle everything. I'd like to have both the UWP version of X1 as well as standard Win32 for Win7 machines / Steam etc. Looking at the documentation for UWP, I'm a little bit lost for a simple example which allows me to fully understand the way it works. By background, most of my coding is via WinForms / C#; I've only used the combination of Win32/C++ on this project. Does anyone know of a good tutorial site which I can use to educate myself please? I'm looking to be able to: 1. Specify the use of full screen (presumably Win10 only) 2. Specify the screen resolution / refresh frequency - I've been lazy in the game and sync the game loop to the 60Hz refresh rate of the screen (the fluid movement is very discrete in its movement capabilities) 3. Handle key-presses outside of Win32 messages I'm assuming that XInput functions exactly the same. The next follow up question would be looking on the following link (MS's ID@XBox overview), there appears to be the implication that I have to allow users to sign in / interact with the user identity etc.. Any good recommendations of where to start for looking at these etc. And finally, if anyone knows of any good web sites / additional forums for this sort of things, then please do let me know Thanks Steve
  4. Steven Ford

    Recent Files Feature for WinForms editor

    Thanks @desiado. You've given me the key hint of jumplist though, I didn't know what the feature is called, at least now I know what I'm meant to be searching for. I'll do some more research over the weekend and let you know how I get on. Thanks again Steve
  5. Steven Ford

    Recent Files Feature for WinForms editor

    Hi @desiado, thanks. That confirms that it's definitely something that the framework will provide for me automatically if I can find out the magic keyword to use to let it know that I've done the load internally to the app. Cheers Steve
  6. Hi, I've written a level designer in C# / WinForms. As part of this, I'd like to add the ability to report the set of recently used files so that when a user right clicks on the task bar, they get a list of the recently used files / possibly a set of tasks (such as create new level). This'd match the behaviour of apps like Visual Studio and the browsers etc. Looking on google, I can see there's a UWP API (Windows.Storage.AccessCache) which would appear to be what I want, but I don't see what the WinForms equivalent would be. Does anyone know what the equivalent would be / where to look? Thanks Steve PS This is independent of the adding the entries to the ribbon's home area
  7. Steven Ford

    DX11 - Problem with SOSetTargets

    Thanks guys, I've gotten it working now (Well, the DrawAuto call isn't working as I'd expect, but that's a small issue). @galop1n - I have a large array representing a 2D water space (up to 200,000 points, each represented by 4bits), and was looking to use a GS to simply transfer that array to the GPU, and then run the GS over it to output the instance information (location / fluid colour) into a stream out buffer and then render that, using instancing to achieve the fluid representation. As I need to do the filtering, I was under the impression that the only way to do this on the GPU was to use geometry shaders they have conditionality? The background to this project is to learn how the whole environment fits together so I can do the next project much quicker One other option which has been cropped up in my mind would be to copy the array to a buffer, and then bind it as a form of texture and then render a single quad covering the entire level and have a pixel shader look up in my array based off where its screen position and either discard for empty values or pick the appropriate colour. Although having said all of this, even on my old netbook, the CPU implementaiton of the looping through this data and building the instance buffer in CPU space in a single threaded approach still allows me to hit 60fps so I think it may well be an [admittedly quite interesting] optimisation too far.
  8. HI all, I'm currently stuck on something which should be rather simple. I'm trying to use the Stream Out functionality to offload a set of calculations to the GPU but I'm having enormous difficulties in getting it to work. The code that I have to create my buffer (once, not per frame) is as follows: // Member variable.. Microsoft::WRL::ComPtr<ID3D11Buffer> _streamOutBuffer; // Create the buffer which will be used to handle the stream output stage { D3D11_BUFFER_DESC bufferDesc; ZeroMemory(&bufferDesc, sizeof(bufferDesc)); bufferDesc.ByteWidth = WATERMANAGER_GRIDX * _gameEngine->getWidth() * WATERMANAGER_GRIDY * _gameEngine->getHeight() * sizeof(WATERRENDERERERBASE_DROPLETINSTANCE_DETAILS); // This evaluates to 307200 bufferDesc.BindFlags = D3D11_BIND_FLAG::D3D11_BIND_STREAM_OUTPUT | D3D11_BIND_FLAG::D3D11_BIND_VERTEX_BUFFER; hr = dxDevice->CreateBuffer(&bufferDesc, nullptr, &_streamOutBuffer); if (hr != S_OK) return; } The code that I have to use the buffer subsequently is: // Set the target output UINT offset = 0; context->SOSetTargets(1, &_streamOutBuffer, &offset); context->Draw(vertexCount, 0); // Reset the buffers ID3D11Buffer* buffers[1] = { 0 }; context->SOSetTargets(0, buffers, &offset); The problem that I have is that on the first call to 'SOSetTargets' the value of _streamOutBuffer gets set to being a null pointer which I simply don't understand why. If I use an intermediate value to store a copy of the pointer, then on subsequent frames I get access violation exceptions so it appears that something destructive is happening to the object. NOte that manually calling 'AddRef' didn't stop this. Looking on MSDN (Getting started and Method doc) it doesn't appear that I'm doing anything different to the examples that I can find (including Frank Luna's DX11 book). Can anyone shed any light as to what could be going on here / point me in the right direction please? If it's helpful, the following is the following per frame code: // Set all the inputs context->IASetInputLayout(_inputLayoutExpanding.Get()); context->VSSetShader(_vertexShaderExpanding->shader.Get(), nullptr, 0); context->GSSetShader(_geometryShaderWithSO.Get(), nullptr, 0); context->PSSetShader(nullptr, nullptr, 0); auto pointer = _vertexBuffer.Get(); UINT vertexStride = sizeof(unsigned int); UINT vertexOffset = 0; context->IASetVertexBuffers(0, 1, &pointer, &vertexStride, &vertexOffset); // Set the constant buffers ID3D11Buffer* vertexShaderCBs[1] = { _vertexShaderConstantBuffer.Get() }; ID3D11Buffer* geometryShaderCBs[1] = { _geometryShaderConstantBuffer.Get() }; context->VSSetConstantBuffers(0, 1, vertexShaderCBs); context->GSSetConstantBuffers(0, 1, geometryShaderCBs); context->IASetPrimitiveTopology(D3D11_PRIMITIVE_TOPOLOGY::D3D_PRIMITIVE_TOPOLOGY_POINTLIST); // context->RSSetScissorRects(0, nullptr); ID3D11DepthStencilState* depthStencilStates[1]; UINT stencilRef; context->OMGetDepthStencilState(depthStencilStates, &stencilRef); // Initialize the description of the stencil state. D3D11_DEPTH_STENCIL_DESC depthStencilDesc; ZeroMemory(&depthStencilDesc, sizeof(depthStencilDesc)); Set up the description of the stencil state. depthStencilDesc.DepthEnable = false; depthStencilDesc.DepthWriteMask = D3D11_DEPTH_WRITE_MASK_ZERO; Microsoft::WRL::ComPtr<ID3D11DepthStencilState> noWriteDepthStencil; this->_device->CreateDepthStencilState(&depthStencilDesc, &noWriteDepthStencil); context->OMSetDepthStencilState(noWriteDepthStencil.Get(), 0); // Set the target output UINT offset = 0; context->SOSetTargets(1, &_streamOutBuffer, &offset); context->Draw(vertexCount, 0); // Reset the buffers ID3D11Buffer* buffers[1] = { 0 }; context->SOSetTargets(0, buffers, &offset); context->VSSetShader(nullptr, nullptr, 0); context->GSSetShader(nullptr, nullptr, 0); context->OMSetDepthStencilState(depthStencilStates [ 0 ], stencilRef); Thanks Steve
  9. Unfortunately, just dropping it within a panel, setting that to AutoScroll=true requires my control to be anchored to top, left (if anchored to bottom / right, then the scrollbars disappear). This doesn't handle centring nicely. So currently, I've done the above and said that it's a tool for me and so I can deal with the ugliness. Given that I want to, shortly, add a zoom feature into the custom control, I guess I'll park this complexity and come back to it. Get the rest of the functionality working before worrying about the prettification
  10. Thanks @ApochPiQ. It's now vaguely working - I'm now needing to get the control embedded within a centring control with scrollbars, but I think that's a slightly different question! :-)
  11. Hi, I'm currently writing a level designer for my 2D game*. To do so, I'm writing this using c# / WinForms. The editor is designed to look a bit like VS, ie. a set of tool boxes surrounding a central panel to show the various tiles and game objects. I've got this central panel as a custom control (inheriting directly from Control) using custom rendering. The development machine that I'm using is using a 27" 4k display and so I've set Windows up to use a text zoom of 150% to avoid killing my eyes. Unfortunately, when I use my standard drawing code of (within the OnPaint override): var location = new System.Drawing.Point( offsetX + (tilePair.Key.X * tileLayer.TileSize.Width ), offsetY + (tilePair.Key.Y * tileLayer.TileSize.Height ) ); var destRectangle = new Rectangle( location, tileLayer.TileSize ); if( pe.ClipRectangle.IntersectsWith( destRectangle ) ) { pe.Graphics.DrawImage( tilePair.Value.Image, destRectangle, tilePair.Value.TileRectangle, GraphicsUnit.Pixel ); } The actual rendering is being done at 150% size of the destRectangle (~96 pixels vs. 64 that's expected). This isn't necessarily a problem so long as I can source that scale factor in advance so I can ensure the appropriate resizing / layout code. Googling doesn't lead to much info on how to source this information and there's nothing obvious that I can find in intellisense as to give me pointers as to where to investigate further. So... does anyone have either any ideas as to how to solve this or links to places where I can investigate this sort of issue. Thanks in advance Steve *originally, I was using Tiled - which is rather good, but for various reasons I wanted to write my own. 1. so I can define custom objects with a fixed set of properties for level designers who aren't that technical to use and 2. to use it as a learning exercise around the command pattern.
  12. Steven Ford

    Issue with the binding of 2 texture

    HI Snake, I'm more thinking about doing the following in your code: ID3D11ShaderResourceView* srvs [2]; srvs[0] = backFaceTexture.Get(); srvs[1] = volumeTexture.Get(); deviceContext->PSSetShaderResources(0, ARRAYSIZE(srvs), srvs) Rather than changing any of the shader code. Although doing a quick google search, this link implies that your code and mine are equivalent (was hoping that it would be something like that). The only other thing I can suggest is having a look at the Rastertek series - Multitexturing. And see if there's anything obvious between that and your code. Good luck! Steve
  13. Steven Ford

    Issue with the binding of 2 texture

    Hi Snake996, looking at the documentation for the call - MSDN it implies that you can pass in the calls in a single array, have you tried passing both in in a single call? Cheers Steve
  14. Thanks Hodgman / unbird, These were the first set of shaders that I'd ever written (as part of a learning process to learn DX) so it's quite likely that I was attribute happy! I'll make the suggested changes and go through the debugging info. I wasn't aware that different formats were optional (I had assumed that maybe it's an int thing). Time to start debugging. Cheers Steve
  15. Thanks Khatharr, I'll check it out
  • 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!