Hot answers tagged

29

You can't. At least, not as a game developer. As a gamer, you can purchase more expensive keyboards with "anti-ghosting" features, but otherwise the limitation is part of the hardware itself, so there's nothing you can do in software to solve it. Check out this demo page to see how keyboard ghosting works, plus a demo: https://web.archive.org/web/...


19

Looking at my disk, I have 1 game that saves savegames in %APPDATA% 1 game that saves savegames in %LOCALAPPDATA% 2 games that save "other stuff" in %APPDATA% 3 games that save "other stuff" in %LOCALAPPDATA% 2 games that save savegames in %UserProfile%\Saved Games 21 Games that save savegames and loads of other stuff in %UserProfile%\Documents, not ...


7

Generally timeGetTime() is best for timing game logic - GetTickCount isn't quite high enough resolution, and QPC & RDTSC are a lot more trouble than they are worth for that purpose. For profiling on the other hand, either RDTSC or QPC can be quite worthwhile. I prefer RDTSC over QPC, though microsoft recommends QPC. The four common time functions ...


7

GDI (Graphics Device Interface) is the software renderer under Windows. Basically any language/runtime platform under Windows that is not GPU-accelerated is going to be using GDI under the hood at some level. While Java AWT might use GDI directly via the C code that the Java runtime is written in, something like Flash running in Chrome will OTOH be using GDI ...


7

Yes, but keep in mind the default frame buffer will always be the same size of the window. What you can do is to render your scenes internally into an off-screen (400x300) frame buffer, and then up-scale it to (800x600), you can do this by rendering this into a texture and applying it on a full screen quad, the advantage you will get is your shaders will run ...


7

I've found a workable approach. I grabbed the DS4Tool source and copied the bits I needed into my Unity project so I could read the reports from the device directly. (That's the NativeMethods class to interface with Kernel32.dll, the device enumeration from HidDevices, and reading the report from the HidDevice class. I cut out the rest to keep things as ...


7

UnityEngine.dll and UnityEditor.dll can be found Editor\Data\Managed subfolder of your Unity installation. UnityEditor.iOS.Extensions.XCode.dll is in Editor\Data\PlaybackEngines\iossupport and UnityEngine.Ui.dll is in Editor\Data\UnityExtensions\Unity\GUISystem\Standalone


6

Games like that are called screenmates or desktop pets. They are a type of digital pet that interacts with desktop windows. Positioning Desktop pets query the host operating system's windowing system for window positions. The windowing system is typically DWM on Windows and X11 on Linux. On Windows, you can include Windows.h and use EnumWindows to get a ...


6

Specifically for Unity, you're correct that AssetBundles cannot update script code. You can use bundles for updating data, but any actual code changes will require a new version of the main game .exe to be installed. This can be an even bigger problem on non-desktop platforms, as releasing a new executable version on platforms like iOS can take a lot of time ...


5

Actually, starting with Windows 7, Direct3D 11 is your answer. Of course the API defaults to using a GPU if you have one, but you can create a Direct3D device targeting the Windows Advanced Rasterization Platform (WARP), which is meant to be a high performance software rasterizer supporting the Direct3D API. You should not expect performance anywhere as ...


5

I suggest you save yourself a lot of pain and grab the ARM Mali OpenGL ES Emulator, or the PowerVR Graphics SDK v3.3. This way you will be ready to roll in minutes. This of course assumes that you do not need your ES setup to run natively on Windows machines, e.g. when your game goes to market. If you do need to the code to run natively on Windows, you ...


5

It depends on what algorithm you are using to generate your dungeon. There are algorithms which by their very nature ensure that everything is reachable: Algorithms which start with one room and then keep attaching new rooms at random to already existing rooms Algorithms which use recursive division (you start with a huge, empty room and keep subdividing by ...


5

The current operating system stats on Steam tell us that only 35% of Steam users even use Windows 10. And of those who do use Windows 10, not everyone regularly use the Windows store to shop for new games. This might be a kind of chicken/egg problem. There aren't many interesting games on the Windows store, so nobody goes there to look for games, so nobody ...


4

If you have VSYNC on, and if you handle windows events in the same thread where you handle rendering, you will experience some small but noticeable input lag. The SwapBuffers() function will wait for vertical sync, which slows down main loop, which again slows down recieving of windows events. There are several different solutions. The easiest one would ...


4

Having the exactly same issue here - the following code snipped works perfectly fine: private void DoRenderSkybox (GameTime Time) { this.Device.SetRenderTarget(this.GridTexture); this.Device.SetRenderTarget(null); // compute a temporary transformation matrix containing // the combined world and projection transfromation Matrix WorldViewProjection ...


4

What shapes are you using? If your shapes are convex (like circles, squares, rounded rectangles), you can just draw versions of different size and clip them to a triangle whose diagonal goes from upper right to lower left. I.e., zoomed in, light-to-dark: and dark-to-light: Then clip that: And then combine the two bezels: and finally draw the original ...


4

SDL is a cross-platform library, so as long as your code is cross-platform(i.e. no OS specific calls, use '/' in directories instead of '\', etc.), yes you should be able to copy and paste without too many issues. If you end up using a different compiler, it might be more or less lenient about certain things, but they are probably minor.


4

I don't care to recall the number of games I've had to start over after a backup/restore or similar thing because I moved all my important files from my documents, but totally forgot about user application data such as save files because it's often in with the program files or other weird places (like in a hidden folder such as appdata). Personally for ...


4

It depends GLFW is just a wrapper around the Windows API calls, so whether you create a window using GLFW or create one using the API, the same calls are ultimately being made. However, a wrapper such as GLFW can be expected to be robust, to do error-checking, to select optimal formats, and so on, which you may not do if you just wrote the code yourself. ...


3

Just build the XNB file on your personal machine, and use that file in your project. Remove the .spritefont file from your content project. Then add the built XNB file to your game project, in an appropriate directory (generally "Content") and set its properties (select it and press F4) to "Copy if newer". This is off the top of my head. So look at the ...


3

PlayerPrefs provides a key-value store implemented in a platform appropriate manner.


3

I've created a solution to this myself. It's called JoyShockLibrary, and reads from DualShock 4, Switch Pro Controller, and Joy-Cons. It's open source, MIT license, and works well, although Bluetooth support for the DS4 was only added recently and is still improving. It's used in JoyShockMapper, which is an input-mapping tool, and JoyShockOverlay, which isn'...


3

Is it safe to assume that most users' desktop resolution is the same as their native resolution You're asking the wrong question. Is it a "safe" assumption? Yes. The real question: is it safe to actually try to use the "native" resolution without the user explicitly telling you to do so? Absolutely not! If not, does it really matter? What matters is ...


3

Yes, you can do this with no expensive trig at all. Steps: Find the distance between the 2 circles. Find the combined radius between the 2 circles. Subtract the distance from the combined radius to get the depth of the penetration. Multiply the direction between the circles by the penetration depth. I.e.: Circle c1; Circle c2; float Distance = (c1....


3

The issue you're describing is due to a lack of Vertical Sync (v-sync). Your drawing is not in sync with your monitor's refresh rate. From my research there is no way in the Windows API by default to force VSync in anything but a DirectX application. https://stackoverflow.com/questions/2448831/how-to-eliminate-tearing-from-animation You have two options ...


3

It seems like you're having several points where you're confused, so I'll go one by one: Not all LIB files are self contained. It depends on how the DLL is compiled and linked, but it is possible, and very common for some LIB files to simply contain stubs to the necessary functionality, which is provided by a DLL. This seems to be the case. The error as you ...


3

Buy a better keyboard. Ghosting is caused by the hardware itself. Even many gaming keyboards will still have this problem; they only invest in fixing the problem for "common" keys like WASD (but not 'K' for instance). http://www.microsoft.com/appliedsciences/antighostingexplained.mspx


Only top voted, non community-wiki answers of a minimum length are eligible