Podcast #128: We chat with Kent C Dodds about why he loves React and discuss what life was like in the dark days before Git. Listen now.

Hot answers tagged

29

GLFW is modern and has a very well defined scope. It's also under very active development. SDL on the other side is rock solid and has a lot features in different scopes but is somewhat lacking in all of them (for example: SDL can do audio, but you might prefer using OpenAL because its far superior in that matter). It might be notable that SDL was ported to ...


16

Sure you can, it's just not trivial to get it sounding "nice". I don't know how to do it in Linux, but if you can play a PCM buffer, all you have to do is fill it with whatever you want. So supposing your buffer is set to play in monaural, signed 16-bit samples, at 44100 samples per second, creating a pure (sinusoidal) A4 sound (440 Hz) is as simple as ...


10

One of the most common ways to render into another application's GL or D3D rendering context is to hook the creation of the context or device objects in that application's process. This will let you gain access to the returned context or device pointer. You can then hook the actual rendering invocation methods (for example, Present() in D3D) and inject your ...


8

A singleton for your main engine class is perfectly normal. It's even quite acceptable to have one singleton for each of your game's major systems, like graphics and input. I personally prefer a single Engine singleton with all systems as members of that object, but really there's very little difference. A singleton can just be a static global object, ...


7

Try Shader Maker or Lumina.


7

What matters is not the number of threads, but their CPU time Probably you do not need your threads to have full utilization. If you do, get better hardware. In fact, you can use CPU utilization as an ad hoc metric to decide when to improve your hardware. Let us say that your server threads have to complete a tick each 50ms, yet, your CPU is fast enough ...


6

My TexturePacker currently supports Ubuntu. What Linux would you need? The command line works too - and it has all the features you need.


6

1) giving JS end-users direct access to your terminal is the scariest idea ever, in terms of security, and is 100% impossible without some interfacing server language/framework (php/perl/ruby/c#/python/java/c++/NodeJS), because it is so scary. 2) running exec() on user-input, directly, rather than building an interface in your server language is 100% as ...


6

Though similar issues are often caused by clipping, the near plane is not the issue here. If it would be, the disappearance would be per pixel and not per triangle. In your animation the triangles exactly disappear at the moment all of its three vertices get outside of the screen. Your algorithm may be based on the false assumption that triangles are hidden ...


6

There's a way to just custom make what you need to do. Put the following code inside a script with the same name (doesn't have to be on a game object). using UnityEngine; using UnityEditor; using System.Reflection; public class MenuItemsExample { [MenuItem("Edit/Rename _F2")] private static void Rename() { var type = typeof(EditorWindow)...


5

The main problem with static and global objects in C++ is that they are created before the application's entry point (i.e. main), but their constructors are called in a completely unpredictable order. The same is true for their destructors, at the end of the application. This is clearly a problem because often we will have objects that depend on each other, ...


5

This is a general post about why static classes cause you more trouble than they are worth. And this includes singleton classes which are just a fancy way of doing the same thing that avoids construction order problems. No advice fits all cases, so take it as advice, not as an instruction that it is always better to do it this way. In general code shouldn't ...


5

Generally speaking, it depends on how the game is programmed. In the case of Source-engine games, they used a multi-tier software architecture, and moved everything platform-specific into /tier0 in their code. When they need to port something, at least by the original engine design, they just swap out /tier0 files for platform-specific ones, and reimplement ...


5

The OpenGL setup is rather straightforward under linux, in comparison to windows. If you link to -lGL you will dynamically link to whatever OpenGL library is installed and should be used, so under a X11-Environment with nvidia driver it will link to the NVidia specific libgl, with a ATI driver to the ATI specific libgl, the OpenGL libs of the different ...


5

It's important to note that glxinfo -v only reports the supported values for the default OpenGL framebuffer, the one that represents the visible screen itself. It's common for other configurations (ones not reported by glxinfo) to be supported in offscreen framebuffer objects (FBOs). As you've noticed, most video cards do not support a 32-bit depth buffer ...


4

OpenGL and SDL are both open source and cross platform. For C#, there is also a Mono library, which attempts to be a game library like XNA but cross-platform. I have not used Mono, but heard bad things about it. PyGame is another popular cross platform library. I don't know much about Java libraries, but Java itself tends to be easy for simple beginner ...


4

You might need to bind your vertex attribute id's to your shader, look at glGetAttribLocation. In your 4.0.0 version you have the layout statement telling it what will be in what id's. The program needs to know that "in_Position" is for attribute 0. It's possible that your implementation will default to using the first attribute as vertex coordinates and the ...


4

For chiptune sound effects, there's one definite answer: sfxr. It's a standalone application that you can use to generate samples, but the source code is also available should you want to integrate it to your code.


4

I'll share our experience of porting a certain game to Linux (and Mac). System-specific APIs - window creation, rendering, audio, networking, input, non-trivial filesystem access etc. The other answers go into details. I'll just say that portable libraries (SFML, SDL, but also things like boost) help a lot. Driver bugs - happen on Linux a bit more often ...


4

So long as you are fine sticking to the version of GL provided by VirtualBox Guest Additions you should be okay. Performance will be a worse than native but even professional-grade GL apps and games can work quite well inside a VirtualBox VM. I'm been led to believe that VMWare Player has better GL support for guests but I have not personally compared them....


4

So far it seems it is an OpenGL driver issue. I don't have other computer to test this on to confirm. If I force software rendering by $ export LIBGL_ALWAYS_SOFTWARE=1 The problem goes away. Probably I need to look around bugs with Mesa.


4

It seems that my bug report on Github has been responded to. If this is being read before the next official version is released, this fix will most likely contained in the development branch of the repository on Github. All that you have to do is pull down the repo and dependencies from Github and then build Monogame using Protobuild (this requires Mono to ...


4

81.76% of worldwide computers run Windows 13.49% of worldwide computers run macOS 1.68% of worldwide computers run Linux 3.07% - Other/ChromeOS Take a guess why developers prefer Windows and Mac over other operating systems... Even if Linux was some super OS with magic powers it still doesn't help that less than 2% of the population uses it. ...


3

I don't think there's much to evaluate, really. Performance / responsiveness comes first, especially on an installation of this sort. You can use either DirectX or OpenGL deferred rendering / render-to-texture (RTT). To do so, render the shell underlay to the default frame buffer (the front / onscreen buffer), render your active game overlay to a screen-...


3

Don't make it too easy for hackers by putting each individual image in its own file or whatever, but don't bother with encryption because the determined ones will just break it, and pushing it to slow them down will just slow down your game and its development. Blizzard's MPQ format has encryption, and it has been cracked. The big name games tend to use ...


3

I would recommend starting by looking at X11, since SDL runs on top of it for Linux. My guess is that SDL will call straight to X11 for window creation and management. It's the protocol you'll be implementing in any case. If you get a window going in assembly, your graphics routines could look like anything, so SDL would merely be inspiration at that ...


3

I'd recommend going through these two tutorials: Event Driven Programming (SDL) http://lazyfoo.net/SDL_tutorials/lesson04/index.php Mouse Events(SDL) http://lazyfoo.net/SDL_tutorials/lesson09/index.php If you still have problems after going through these tutorials, let me know - I'd be glad to help you out :)


3

Have you checked TexturePacker? It has a considerable list of features and at first sight seems to cover all or most of the features you listed. For instance, it seems to work under linux and has a command line tool that you can plug into your build process. Also seems to be capable of detecting and handling duplicates. As for the price, it states on the ...


3

XGrabKey if you're using an x environment (you probably are, unless you know otherwise)


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