Hot answers tagged

4

According to this article by Microsoft, the first place where Windows will look for DLL files is always the directory with the .exe file that requested them. So you don't actually need to install the DLL files. You can just put these files into the same directory as the game executable.


3

Creating a seamless open world without loading bars is not an easy task. There are lots of small and large problems which need to be solved. This is not a beginners project! The basic approach is usually to divide the world into sections and only load those sections which are around the player. When the player moves around the world, new sections and their ...


3

The Visual Studio Tools for Unity are primarily for writing C# scripts. They don't expose a C++ scripting API. The reason they show up when you're working with C++ in Visual Studio is they're related to VS, not C++ specifically. VS will let you develop in several different languages in a single installation, so they don't rule out the possibility that you ...


2

You create a window with default hints and context. See glfw documentation. Solution: first give the hints, then create the window. glfwInit(); glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 4); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 4); glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); glfwWindowHint(GLFW_RESIZABLE, GL_FALSE); glfwWindowHint(...


2

This is not done with angles. This is done with vectors. Well, actually you could do it with angles... In any case, the ball has a velocity vector at the instant of collision, and will have a new velocity vector from the collision resolution. There are a few ways we can go about getting that new velocity vector: You can use vector projection to extract ...


1

I've tested the application under Windows 7, and it takes about 8MB RAM (under linux it was about 50MB) moreover the FPS is higher: about 600, while in linux it was about 370. I presume the performance drop in linux is due to poor GPU driver support, that can result in higher memory consumption and lower FPS, furthermore I am printing some output to a ...


1

It seems like you're over-thinking your requirement when all that you really need is just a simple installer. Among other thing, an installer can: Check system requirements. Resolve library dependencies. Ensure correct library versions. Make sure everything goes in the correct folder. Make sure that the whole thing co-exists peacefully with other programs ...


1

There are multiple topic to discuss here. "portable" do I mean cross-platform executable = Cross platform portability How can I make my game a single .exe which installs = Easy to distribute Cross platform portability Try to wrap platform-specific functionality in your "Game engine" layer as much as you can. Never let game code touch platform specific ...


1

Put your objects into a std::vector (or even std::array) and then use std::sort with a custom comparator. After that, if necessary, you can assign the indices in the list to the corresponding objects. std::sort(objects.begin(), objects.end(), [](const auto& a, const auto& b) { return a.score > b.score; }); Now objects contains the items ...


1

It turns out that the library I was using (SFML) has the stencil buffer disabled by default. All I had to do was pass a sf::ContextSettings object with the stencil buffer argument set to 8 to a sf::RenderWindow constructor to fix everything.


1

A possible solution for your problem might be using stencil testing. Here is a link that explains it. It also describes how object outlining is done. You basically need to populate the stencil buffer while rendering your object. Then you render your object slightly scaled up a second time while using a simple single color fragment shader. During the second ...


1

To set this in C++, you need to create a UPROPERTY in your C++ code then write a function to set this property. In your C++ header file: UPROPERTY(BlueprintReadWrite, Category = "FVectors") FVector MyCPPVector; UFUNCTION(BlueprintCallable, Category = "FVectors") void SetFVector(FVector VectorIn); And in your cpp file void SetFVector(FVector VectorIn) { ...


1

There are a few approaches you could take for testing rendering output. First, you could create a test mock version of your renderer, that instead of plotting things on the screen, would instead perhaps store some kind of representation of the rendering output, such as lists of renderer elements that you could assert against. This sort of approach is often ...


1

What I would probably do is using the inheritance mechanism of C++ and have a level superclass which level subclasses inherits from. The superclass contains virtual functions for creating, destroying, updating and rendering a level. You can then have a pointer to the current level so that only a single level is updated and rendered at a time. If each level ...


1

In your text shader, you've forgot to set the sampler2D uniform's index. Each sampler in a shader need to be set to a specific index value, either at the creation of the shader (at the startup of the application) or each frame (not necessary, but possible). Whenever a sampler should be used in a shader, OpenGL needs to know what sampler to use, depending on ...


1

To add to Alex Coultas's solution, the final UProperty in the FSkeletalMeshMergeParams struct has to be BlueprintReadWrite like the others, otherwise you get yellow warnings in the output box. // Skeleton that will be used for the merged mesh. // Leave empty if the generated skeleton is OK. UPROPERTY(EditAnywhere, BlueprintReadWrite) class USkeleton* ...


1

You can render your minimap scene to the framebuffer texture, than render this texture on a 3D quad in front on the screen. This way you can create a cool looking 3D HUD for your game. You can learn more about this technique here.


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