opengl – Difference between Game Engine vs Physics Engine vs Geometric modeling kernel

I am currently studying the game development.

“The rendering engine generates animated 3D graphics by any of a number of methods (rasterization, ray-tracing etc.).

Instead of being programmed and compiled to be executed on the CPU or GPU directly, most often rendering engines are built upon one or multiple rendering application programming interfaces (APIs), such as Direct3D, OpenGL, or Vulkan which provide a software abstraction of the graphics processing unit (GPU). Low-level libraries such as DirectX, Simple DirectMedia Layer (SDL), and OpenGL are also commonly used in games as they provide hardware-independent access to other computer hardware such as input devices (mouse, keyboard, and joystick), network cards, and sound cards.” – Game Engine

“A geometric modeling kernel is a 3D solid modeling software component used in computer-aided design packages” Geometric Modeling Kernel

I am struggling to understand an underlying architecture of a geometric modeling kernels compared to the game engines and physics engines.

Questions:

1) Am I understand it correctly, that the geometric modeling kernels, are actually the low-level APIs, more specifically, a kernel loadable extensions, used specifically to handle the rendering of a geometric operations, like creating a boundary representation of an objects on the screen?

2) Am I understand correctly, that the geometric modeling kernels, like ACIS, Parasolid are continuing to use it’s own low-level modules, instead of OpenCL/OpenGL, or they are kind of mixed?

3) What is the architecture of the Physics Engine, in terms of an APIs. Is it using the OpenGL or other derived low-level graphics APIs? Let’s say, Havoc, is it relying on other low-level API, say Direct3D?

Physics’s system – Game Development Stack Exchange

Thanks for contributing an answer to Game Development Stack Exchange!

  • Please be sure to answer the question. Provide details and share your research!

But avoid

  • Asking for help, clarification, or responding to other answers.
  • Making statements based on opinion; back them up with references or personal experience.

Use MathJax to format equations. MathJax reference.

To learn more, see our tips on writing great answers.

array – How does the computer place ships in random locations in the battleship game in Java?

There will be two players in the game, one will be human and the other will be a computer. The game board will be 10×10. At the beginning of the game, two players will have 5 ships:
1 of size 1,
1 of size 2,
1 of size 3,
1 of size 4,
1 of size 5.
The ships are randomly placed on the board by the computer. The computer, (1 ship 1 point in length, 1 ship 2 points in length, 1 ship 3 point in length, 1 ship 4 points in length and 1 ship 5 points in length) will place these 5 ships in random places and these ships will be horizontal or they can be vertical, but not adjacent to each other. How does the computer place ships in random locations in the battleship game?

public static void printBoard(){
    System.out.println();
    System.out.print(" ");
    System.out.println("0123456789");
    //Middle section of Ocean Map
    for(int x = 0; x < grid.length; x++) {
        System.out.print(x);

        for (int y = 0; y < grid(x).length; y++){
            System.out.print(grid(x)(y));
        }
        System.out.println();
    }
    System.out.println();
}

My group is too big for my game, how to manage this situation?

Instead of playing 3 or 4 encounters in a session, try slowing each encounter down and playing 2 or 3, but having each one last longer. By slowing the pacing of the game down you may find that you can roleplay the situations you enjoy, and give everyone a part in the game, without running overtime. This does slow down your story development, so you will need to make adjustments. In my experience, this doesn’t feel much slower as a player, since you spend the time socializing and roleplay to the same degree.

One game I’m playing at the moment has gone that way due to the pacing change when moving from IRL to online. In a normal session, we get about 2 encounters done, down from about 6. Yes, less gets done per week, but in the end, it works and we still get to play. The campaign just takes a bit longer.

Shorter scenes

There are many ways to cut scenes short. Adding time pressure in-game, or out of the game can induce this easily.

During combat, you could introduce a turn timer. You have 10 seconds to state what you are going to do, or initiative moves on. This forces players to pay attention and make decisions when it isn’t their turn.

Out of combat, you can add time pressure by having an imminent event looming over the party which progresses at your discretion. For example, if the party has an audience with the king, have the king be impatient, introduce an aide who informs the king a more important guest is here. If they can’t figure things out fast enough, have the king end the scene. If the party is in a dungeon, roleplaying some camping, have thumping footsteps approach. Give the party something to react to, which develops when you want it to.

Whoever shows up, plays

Another solution I’ve used before is to allow a large number of players to join the game, knowing that it’s unlikely they will all be there every session. Yes, this may lead to you running 5 player sessions, but in my experience often someone can’t make it. If you make it clear to the group that it’s totally ok if they don’t show up, then halfhearted players won’t feel as pressures to show up (we all know what it’s like to have a long day, then jump into a game that you are honestly too tired to play, but you don’t want to let your mates down).

I had a particular PF group a long time ago where some players were pretty flakey. It was actually an 8 player game, but we ran with 4 or 5 most of the time. Often the monk spent weeks at local monasteries, and the dwarf spent many adventuring days sleeping off a drunken night.

Compromise

Spending time with your friends is something you probably enjoy, whether you play or not. Likewise, just because your perfect game is suited to 4 players, maybe you can make some changes and play with 5. Ultimately you may not be able to come to a perfect solution, but playing your game with some changes to make it work with 5 may be worth it so you can play with your friends.

You may find that it’s worth sacrificing a little of the situations you like, and the roleplaying you prefer, so you can have everyone together hanging out.

roblox – How do I run a client-side script on a game that’s not mine?

I need to run an exploit script, but I won’t get caught, because it’s not for cheating. What’s the best exploit script runner for mac?

The client-side script is:

for i, v in pairs(game:GetDescendants()) do
    if v:IsA("Sound") then
        print(v.SoundId)
    end
end 
game.DescendantAdded:Connect(function(Obj)
    if Obj:IsA("Sound") then
        print(v.SoundId)
    end
end

I need to run it.

How?

Making a ‘Darkvision’ Mechanic for a Unity C# Game, Not Sure Where to Start

I am endeavoring to make a small multiplayer dungeon crawler and would like to introduce a mechanic like ‘Darkvision’ from table-top RPGs. The desired effect would be that where there is some illumination, it would be brighter, and where there is no illumination, there would be a black-and-white FLIR effect out to a little distance from the player (~20 meters/units) and nothing after that. This would only be for some players and not for everyone.

Thank you for your time,
Bob

Conway game of life implemented with C++/OpenCV

Here is an implementation of Conway’s Game of Life. It is kind of a brute force but it works fine. I have a special question about the method cv::Mat render() const, which renders and returns a cv::Mat. Should I return a reference cv::Mat& render() const or allocate an object on the heap and return the pointer? I would also appreciate any constructive feedback about my coding style (especially about how I handle and access memory), which is very influenced by Java IMO.

#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/imgproc/imgproc.hpp>
#include <opencv2/opencv.hpp>
#include <cstdlib>
#include <ctime>
#include <vector>
#include <random>
#include <windows.h>
#include <iostream>
#include <functional>
#include <stdio.h>
#include <stdlib.h>
#include <map>
#include <assert.h>
#include <vector>
#include <set>

#define UPSAMPLING 10

/**
 * Generating random number
 */
inline int random(int bottom, int top) {
    std::random_device dev;
    std::mt19937 rng(dev());
    std::uniform_int_distribution <std::mt19937::result_type> dist(bottom, top - 1);
    return dist(rng);
}


/**
 * Board game
 */
class Board {
public:
    std::vector <std::vector<bool>> cells;
    int width;
    int height;

    Board(int width, int height) : width(width), height(height) {
        this->cells = std::vector < std::vector < bool >> (height, std::vector<bool>(width, false));
        std::random_device dev;
        std::mt19937 rng(dev());
        std::uniform_int_distribution <std::mt19937::result_type> distX(0, width - 1);
        std::uniform_int_distribution <std::mt19937::result_type> distY(0, height - 1);
        for (int i = 0; i < (width * height) / 2; i++) {
            int x = distX(rng);
            int y = distY(rng);
            cells(y)(x) = true;
        }
    }

    inline int aliveNeighbors(int x, int y) const {
        int ret = 0;
        for (int yi = y - 1; yi <= y + 1; yi++) {
            if ((yi >= 0 && yi < this->height)) {
                for (int xi = x - 1; xi <= x + 1; xi++) {
                    if (xi >= 0 && xi < this->width) {
                        if (xi != x || yi != y) {
                            ret += cells(yi)(xi);
                        }
                    }
                }
            }
        }
        return ret;
    }

    void nextRound() {
        std::vector <std::vector<bool>> ret(this->height, std::vector<bool>(width, false));
        for (auto y = 0UL; y < this->cells.size(); y++) {
            for (auto x = 0UL; x < this->cells(y).size(); x++) {
                int aliveNs = this->aliveNeighbors(x, y);
                if (!cells(y)(x)) {
                    if (aliveNs == 3) {
                        ret(y)(x) = true;
                    }
                } else {
                    if (aliveNs < 2 || aliveNs > 3) {
                        ret(y)(x) = false;
                    } else {
                        ret(y)(x) = true;
                    }
                }
            }
        }
        this->cells = ret;
    }

    cv::Mat render() const {
        cv::Mat ret = cv::Mat::zeros(width * UPSAMPLING, height * UPSAMPLING, CV_8UC3);
        std::vector<std::vector<int>> classIdentites = HkCluster(this->cells).hk_cluster();
        std::map<int, cv::Vec3b> colorMaps = generateColors(classIdentites);
        for (auto y = 0UL; y < this->cells.size(); y++) {
            for (auto x = 0UL; x < this->cells(y).size(); x++) {
                if (cells(y)(x)) {
                    cv::Vec3b color(random(0, 255), random(0, 255), random(0, 255));
                    for (auto kx = 1; kx < UPSAMPLING; kx++) {
                        for (auto ky = 1; ky < UPSAMPLING; ky++) {
                            ret.at<cv::Vec3b>(x * UPSAMPLING + kx, y * UPSAMPLING + ky) = colorMaps(classIdentites(y)(x));
                        }
                    }
                }
            }
        }
        return ret;
    }
};

int main() {
    int size = 100;
    Board board(size, size);
    cv::namedWindow("Conway game of life", cv::WINDOW_AUTOSIZE);
    while (cv::waitKey(1) != 27) {
        auto frame = board.render();
        cv::imshow("Conway game of life", board.render());
        board.nextRound();
        Sleep(100);
    }
    cv::destroyAllWindows();
    return 0;
}

c# – How to properly manage game music and sounds?

I’m developing a WinForms customized version of Pac-Man for a Software Engineering project and I reached the point where I have to implement music and sound effects. I used the MVC architectural pattern, so almost every entity in the game has: a model, a view and a controller (for example, I have a MainMenuModel, a MainMenuView and a MainMenuController).

In order to play music and sounds I decided to use the System.Windows.MediaPlayer class (because the System.Media.SoundPlayer one cannot play two sounds simultaneously). More specifically, I put in every controller the related MediaPlayer objects. So, for example, in the MainMenuController I put: the MenuBackgroundMusicPlayer, the MenuItemSelectionSoundPlayer and the MenuItemOpeningSoundPlayer.

This solution works fine, but I would like to know if it is considered bad design to have multiple instances of MediaPlayer spread all over the controllers, instead of having a single static centralized MediaPlayer instance that handles everything. The problem with having a single instance is that I don’t know then how to play two or more sounds simultaneously, because a single MediaPlayer object can handle a single media at a time.

lighting – Why is there grey haze that appears when game is simulated in viewport, and how do I fix it?

For some reason when the game runs in the regular viewport (not it’s own) a grey haze slowly appears. This never used to happen. The level architecture (code) changed recently and then this started happening. However, none of the assets or visual build configurations were changed. This problem does not occur when the game is running in a separate viewport, but the fact is it wasn’t an issue in the default viewport before. Does anyone know what is causing this and how to fix/prevent it?

Any help would be really appreciated.

Click on this text to see picture examples showing the problem.