game design – Which systems use a dice pool *and* highest score mechanic?

EvilHat Productions’ Don’t Rest Your Head has a dice pool mechanic that does essentially that. You roll a number of d6s that come from three different sources, and must be distnguishable. The total number of successes is determined (successes are 1-3), and then it is determined which pool dominates (domination has both mechanical and storytelling effects). Dominating is determined by which pool has the most 6s, and ties are broken with subsequent values. The players have three pools (Discipline, Madness, and Exhaustion) and the GM has one pool (Pain). Discpiline is the most inherent and limited pool. It’s a good thing when it dominates (for the player). Exhaustion and madness ramp up a player’s power, but at the cost of bad things happening when those pools dominate. Successes are tinged with bad effects, and you risk running into permanent trouble. Pain dominating means that you may succeed at what you set out to do, but something else goes horribly wrong.

It’s a very dynamic system, that I haven’t had too much chance to play with, since I’ve had a little trouble sculpting anything coherent from it. it’s a great read, and a fun setting. Just not sure about how to scale encounters etc…

boot – Multiply claimed blocks repeating themselves with no end I can see they are game files what do I do 20.04 I have tried multiple times to fix it reins


Your privacy


By clicking “Accept all cookies”, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our Cookie Policy.




javascript – websocket server multiplayer game using two mouses?

I am trying to build a multiplayer game using javascript/websocket/node.js/heroku, and I suppose players may use mouse to control their character (on mouse move).

I wrote code like this:

client.js:

game.draw(dataFromServer);

ws.send(JSON.stringify(localMouseData));

server.js

client.on('message', (data) => {
    let parseData = JSON.parse(data);
    if (parseData.login === false) {
      CACHE.clients.push(parseData);
    }
    for (let i = 0; i < CACHE.clients.length; i++) {
      if (CACHE.clients(i).id === parseData.id) {
        CACHE.clients(i) = parseData;
      }
    }
  })
  
setInterval(() => {
    wsServer.clients.forEach((client) => {
      client.send(JSON.stringify(CACHE));
    });
  }, 1000 / FPS);

But here comes the problem, the game performance is good when running locally, but getting delay (about 1 second) after deployed on heroku.

I guess the problem is about the server speed, but I also wonder if there is any solution for this case, because I used to see this kind of feature before(in other program, like figma), player can see their cursor and other player’s cursor, but I just can’t figure out how those developers solve the problems about server delay.

If anyone can give suggestion, I will be very appreciated, thanks!

Macbook auto adjusts gamma in game

I’m playing Starcraft 2, and like playing it on high gamma. However, when I set the gamma in the setting, after a couple of second the graphics become very dark again. It is not a problem of the game, since the screen is dark but the gamma slider did not move in the game. And when I just click (not adjust) the gamma slider, it goes back to what it should be for a second, but then it auto-darkens again.

Is this some OSX setting? Could it be related to the dual GPU’s in the macbook pro?

How to get started in game development with Lua without LOVE or any game engine

Recently, I’ve been wanting to get into Lua, and I just started to. I was wondering if it is possible to make a game, without the LOVE engine, like are there any built-in libraries I can use or external libraries? How would I install these libraries?

I am using the ZeroBrane Studio IDE, not plugins for Java IDEs.

I know this is pretty vague, but I have done some research, and most of it is either Roblox tutorials or LOVE tutorials.

Thank you

game – Submitting highscore in PHP

So, I am interested, what is the proper way to submit a highsocre (such as of a Pacman game) in PHP? Here is what I tried:

<?php
if (array_key_exists("HTTP_USER_AGENT", $_SERVER)) {
    $browser = $_SERVER('HTTP_USER_AGENT');
} else {
    $browser = "none";
}
if (substr($browser, 0, strlen("Opera")) !== "Opera" &&
        substr($browser, 0, strlen("Mozilla/5.0")) !== "Mozilla/5.0") {
    exit("Please access this URL with a proper browser! As far as I know, no browser in which you can actually play that PacMan has User Agent that does not start either with "Opera" or with "Mozilla/5.0".n");
}
if (!array_key_exists('HTTP_REFERER', $_SERVER) || $_SERVER('HTTP_REFERER') != "https://svg-pacman.sourceforge.io/") {
    exit("Your browser did not set the HTTP referer header to the URL of the PacMan game, so we cannot save your highscore. Sorry about that!n");
}
session_start();
if (!array_key_exists('first_random_number', $_SESSION) || !array_key_exists('second_random_number', $_SESSION) || !array_key_exists('sumOfRandomNumbers', $_GET) || $_GET('sumOfRandomNumbers') != $_SESSION('first_random_number') + $_SESSION('second_random_number')) {
    session_destroy();
    exit("The session does not seem to be properly set! It can be both a server error or a misconfiguration of your browser. " .
            (
            (array_key_exists('first_random_number', $_SESSION) && array_key_exists('second_random_number', $_SESSION) && array_key_exists('sumOfRandomNumbers', $_GET)) ?
                    "The random numbers sent to JavaScript in "<code>pacman.php</code>" were"
                    . $_SESSION('first_random_number') . " and "
                    . $_SESSION('second_random_number') .
                    ", and your browser claims the sum of them is " . $_GET('sumOfRandomNumbers') . ". " :
                    "") .
            "Unfortunately, we cannot set the new highscore!");
}
session_destroy();
?>
<html>
    <head>
        <title>Saving the highscore for PacMan in JavaScript</title>
    </head>
    <body>
        Attempting to save a highscore...<br>
<?php
$player = $_GET('player');
if (strpos($player, " ") !== FALSE || strpos($player, "<") !== FALSE || strpos($player, ">") !== FALSE || strpos($player, "&") !== FALSE || strlen($player) == 0 || strlen($player) > 12)
    $player = "anonymous";
$score = intval($_GET('score'));
$datoteka = fopen("pachigh.txt", "r");
$current_highscore = intval(fgets($datoteka));
fclose($datoteka);
if ($score <= $current_highscore) {
    ?>Sorry about that, but higher highscore has already been submitted!<?php
        } else {
            $hash1 = $_GET('hash');
            if (is_numeric($score) && $score < 100000) {
                $hash = 7;
                for ($i = 0; $i < $score / 127; $i++) {
                    $hash += $i;
                    $hash %= 907;
                }
                if ($hash - $hash1) {
                    ?>Invalid hash!<?php
                } else {
                    $datoteka = fopen("pachigh.txt", "w");
                    if ($datoteka === FALSE) {
                        ?>Server error: cannot open the &quot;<code>pachigh.txt</code>&quot; file for writing!<?php
                    } else {
                        fprintf($datoteka, "%dn%sn", $score, $player);
                        fclose($datoteka);
                        ?>
                        Successfully saved the new highscore!
                        <script type="text/javascript">
                            window.close();
                        </script>
                <?php
            }
        }
    } else {
        ?>
                Server error!
                <?php
            }
        }
        ?>
    </body>
</html>

Guide to Free Game Server Control Panels

lowendtutorial

Hosting a game server may not be easy through a terminal, though even experienced cannot handle the game servers through Command Line Interface when hosting a large number of game servers. In this case, using a game control panel provides ease of access to your game servers along with good security measures. While some may not be able to afford premium game control panels, we have prepared a list of free game control panels that are as good as premium, and some of them even provide much better features than premium game control panels. Some game control panels may not provide all the game servers, but they always provide extended functionality to create the desired game template which can be achieved in most control panels.

Pterodactyl Game Server PanelPterodactyl
An open-source and one of the most secured game control panel available out there in the market. Every game server instance runs on an isolated docker container, hence providing greater security. Such functionality cannot be seen in any premium game control panel. It is built with PHP, NodeJS and provides a good-looking interface to administrators. This makes it perfect for personal and even for hosting companies that provide game servers. Resource limits can also be placed for each game server.

If you are providing game servers to your customers, then Pterodactyl makes it easier for you! It has a WHMCS and Blesta integration which allows you to automate it completely. However, Pterodactyl may not support all the game servers, but there are many game server configurations available made by their developers but are not official or may not support all the features, which are known as “eggs”. Installation and setup of Pterodactyl is not easier work and requires an experienced system administrator. It is frequently updated and security is on the priority every time, developers are very active in this project. So overall, this is a perfect choice for hosting companies and developers. You can learn more about Pterodactyl on their website.

Easy-Wi Game Server PanelEasy-wi
Another open-source game control panel, which is user-friendly and provides numerous features along with game servers function. It is not widely used but based on its functionality, it is kept in second place. Game servers can be easily limited by slots, RAM, and disk space. Ports are also assigned automatically during game server creation. Such ease provided by the control panel is rare, as some game servers usually have more than port and sometimes it takes a longer time to determine what is the port that will be used for it, whereas Easy-Wi does it automatically which is a great feature. Along with how user-friendly it is, it also provides a good-looking interface that also consists of many features such as sub-users, fast-downloading, and other addons which can be installed through one click.

It supports a wide range of game servers by default, and game server templates can be also created easily.

Since it is not much used, automation modules cannot be easily found, but the WHMCS module is available so it is good for game server hosting companies. However other billing platforms do not support it yet. It is also not much updated frequently but developers are active on Discord and provide good support to users. You can learn more about Easy-wi on their website.

Open Game Server PanelOpen Game Panel
It is an open-source game control panel, supports various game servers so compatibility is great. Open Game Panel has been in the game server industry for a long time and their community forums are also active which means that you can find many good extensions and addons which adds the additional useful features that are required. Documentation is also detailed, and a proper guide is provided on their GitHub page which shows that OGP is user-friendly and easy to install. Easy-installers are also available which can install it in a single command. The user interface for the Open Game Panel is not friendly, and a little hard to navigate. But there are themes available in their community forums.

However, automation is not that greatly provided in Open Game Panel, but it provides WHMCS integration. Placing limits on game servers is an essential part, however, OGP does not do that properly, so we can recommend this for individuals who are looking to host game servers for their usage. You can learn more about Open Game Panel on their website.

Bright Game Server PanelBright Game Panel
Another open-source game panel, which is also user-friendly and provides all the basic functionality which is required to manage the game server. Unfortunately this project is no longer active but we have not found any security flaws. It is also designed using a Bootstrap, which makes it look good. Installation is easy, and so the management is quite simple which makes it perfect for personal usage. We do not recommend using it for companies as it has not been updated for a long time, and also does not have integrations. Other restrictions such as slots and RAM cannot be placed on servers so hosting game servers in a shared environment for game servers can be risky. You can learn more about Bright Game Panel on their website.

Conclusion:

So going to the conclusion of game control panels, based on the features and functionality it provides, Pterodactyl and Easy-Wi are perfect for both game server hosting companies and personal usage, however, they may require some great knowledge of system administrator for management. At the same time, both keep the security at priority. Whereas, Open Game Control Panel and Bright Game Panel is a fine option for personal game server usage.

Jon Biloh

I’m Jon Biloh and I own LowEndBox and LowEndTalk. I’ve spent my nearly 20 year career in IT building companies and now I’m excited to focus on building and enhancing the community at LowEndBox and LowEndTalk.

game recommendation – What online collaborative communication tools have the most components for roleplaying away from the table?

I run a lunchtime game session once a week. Due to temporal constraints, we try to keep our sessions around the table limited to the more active aspects of encounters; for example, those that require maps, charts, spreadsheets, figurines and/or copious amounts of dice rolling. As such, we move much of the actual roleplaying away from the table and onto alternative forms of collaborative communication.

Until recently, the method of choice for these interactions was Google Wave. However, with its impending death, we now find ourselves without an adequate communication tool for PC/NPC interactions (i.e. plot development).

What now is being lauded as the best communication tool for RPGs and what are the compelling features? I’m looking for web-based options more specifically, since my players use differing OSes and the web is a universal platform.

game design – What makes a good jump scare?

Another technique that it very effective is to lull the player into a false sense of security by having them repeat an action several times, then jumpscaring them on the last time.

For example, in Outlast, I very distinctly remember a scene where you have to walk past a guy who is sleeping in a wheelchair. When I first played it, and in several let’s play videos I have seen, the first time walking past him, you are very uncomfortable. Everybody expects him to jump up out of the wheelchair and attack you. He doesn’t. 5 minutes later, when you have to walk by him a second time to get back to where you were, no one expects him to do anything. So they will just blindly walk right by him. When he jumps out of the chair and attacks you, it is a lot more terrifying because you were not expecting it.

Overall, anything you can do to make the jumpscare unexpected makes it scarier.

Sample Breakout Game to introduce students who have covered the AP CS A syllabus to Java Graphics:

I am an AP CS A teacher but as the syllabus does not include Graphics this is really my first time in using Java graphics. I am looking to produce a project not far above the realms of the AP CS A syllabus (classes, inheritance, interfaces, abstract) that will give students an insight into how to produce their own simple games using Java graphics.

I have seen many tutorials on the net but so far nothing as simple as this that I can get my head round and actually truly understand.

Any suggestions on how I could improve the code below without getting too complicated?

Notes:
I am not particularly happy with the infinite loops for example.

Any suggestions would be appreciated.

public class GameTest{
    public static void main(String() args) {
        Game pg = new Game();
    }
}
import java.awt.Dimension;
import java.awt.Image;
import java.awt.Graphics;
import java.awt.Color;
import java.awt.event.KeyEvent;
import javax.swing.JFrame;
import java.awt.event.KeyListener;

public class Game extends JFrame implements KeyListener{

    private final int gWidth = 500;
    private final int gHeight = 400;
    private Dimension screenSize;
        
    private Image dbImage;
    private Graphics dbGraphics;
    
    private Ball ball;
    private Brick()() bricks;
    private Paddle paddle;
    
    private Thread ballThread;
    private Thread paddleThread;
    
    public Game() {
        screenSize = new Dimension(gWidth, gHeight);
        this.setTitle("Let's Play Game!");
        this.setSize(screenSize);
        this.setResizable(false);
        this.setVisible(true);
        this.setBackground(Color.BLACK);
        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        addKeyListener(this);
        
        bricks = new Brick(2)(10);
        for (int row = 0; row < bricks.length ; row++) {
            for (int col = 0; col < bricks(0).length ; col++) {
                bricks(row)(col) = new Brick((col*50), (100 + (row * 20)));
            }
        }
        
        paddle = new Paddle(450, 390);
        
        ball = new Ball(250, 200, bricks, paddle);
        ballThread = new Thread(ball);
        ballThread.start();
        paddleThread = new Thread(paddle);
        paddleThread.start();
    }
    
    public void paint(Graphics g) {
        dbImage = createImage(getWidth(), getHeight());
        dbGraphics = dbImage.getGraphics();
        draw(dbGraphics);
        g.drawImage(dbImage, 0, 0, this);
    }
        
    public void draw(Graphics g) {
        ball.draw(g);
        paddle.draw(g);
        
        boolean allBricksGone = true;
        for ( Brick() row : bricks ) {
            for (Brick brick : row ) {
                if (brick.getActive()) {
                    brick.draw(g);
                    allBricksGone = false;
                }
            }
        }
        
        if (allBricksGone)
            System.exit(0);
        
        g.setColor(Color.WHITE);
        
        repaint();
    }   
    
    public void keyPressed(KeyEvent e) {
        paddle.keyPressed(e);
    }
        
    public void keyReleased(KeyEvent e) {
        paddle.keyReleased(e);
    }
    
    public void keyTyped(KeyEvent e) {}
}
import java.awt.Color;
import java.awt.Graphics;
import java.awt.Rectangle;
import java.util.Random;

public class Ball implements Runnable {
    
    private int xDirection, yDirection;
    
    private Paddle paddle;
    
    private Brick()() bricks;

    private Rectangle ballRect;
    
    public Ball(int x, int y, Brick()() bricks, Paddle paddle){
        Random r = new Random();
        
        int rXDir = r.nextInt(1);  
        if (rXDir == 0)
            rXDir--;
            
        setXDirection(rXDir);
            
        int rYDir = r.nextInt(1);
            
        if (rYDir == 0)
            rYDir--;
                    
        setYDirection(rYDir);
        
        ballRect = new Rectangle(x, y, 15, 15);
        
        this.bricks = bricks;
        
        this.paddle = paddle;
    }
    
    public void setXDirection(int xDir){
        xDirection = xDir;
    }
    
    public void setYDirection(int yDir){
        yDirection = yDir;
    }
    
    public void draw(Graphics g) {
        g.setColor(Color.PINK);
        g.fillRect(ballRect.x, ballRect.y, ballRect.width, ballRect.height);
    }
    
    public void collision(){
        if(ballRect.intersects(paddle.getpaddleRect()))
            setYDirection(-1);
            
        for (int row = 0; row < bricks.length ; row++) {
            for (int col = 0; col < bricks(0).length ; col++) {
                if(bricks(row)(col).getActive() && ballRect.intersects(bricks(row)(col).getbrickRect())) {
                    bricks(row)(col).setInactive();
                    setYDirection(-yDirection);
                    break;
                }
            }
        }
    }
                
    public void move() {
        ballRect.x += xDirection;
        ballRect.y += yDirection;
            
        if (ballRect.x <= 5)
            setXDirection(+1);
            
        if (ballRect.x >= 480)
            setXDirection(-1);
        
        if (ballRect.y <= 30)
            setYDirection(+1);
        
        if (ballRect.y >= 385)
            setYDirection(-1);
    }
    
    public void run() {
        try {
            while(true) {
                move();
                collision();
                Thread.sleep(4);
            }
        }
        catch(Exception e) { 
            System.err.println(e.getMessage()); 
        }
    }
}
import java.awt.Color;
import java.awt.Graphics;
import java.awt.Rectangle;
import java.awt.event.KeyEvent;


public class Paddle implements Runnable{

    private int xDirection;

    private Rectangle paddleRect;

    public Paddle(int x, int y){
        paddleRect = new Rectangle(x, y, 50, 10);
    }
    
    public Rectangle getpaddleRect(){
        return paddleRect;
    }

    public void keyPressed(KeyEvent e) {
        if(e.getKeyCode() == KeyEvent.VK_LEFT)
            setXDirection(-1);
                
        if(e.getKeyCode() == KeyEvent.VK_RIGHT)
            setXDirection(1);
    }
    
    public void keyReleased(KeyEvent e) {
        if(e.getKeyCode() == KeyEvent.VK_LEFT || e.getKeyCode() == KeyEvent.VK_RIGHT)
            setXDirection(0);
    }

    public void setXDirection(int xDir) {
        xDirection = xDir;
    }
    
    public void move() {
        paddleRect.x += xDirection;
        if (paddleRect.x <= 10)
            paddleRect.x = 10;
        if (paddleRect.x >= 440)
            paddleRect.x = 440;
    }
    
    public void draw(Graphics g) {
        g.setColor(Color.CYAN);
        g.fillRect(paddleRect.x, paddleRect.y, paddleRect.width, paddleRect.height);
    }
        
    public void run() {
        try {
            while(true) {
                move();
                Thread.sleep(2);
            }
        }
        catch(Exception e) { 
            System.err.println(e.getMessage()); 
        }
    }
}
import java.awt.Color;
import java.awt.Graphics;
import java.awt.Rectangle;

public class Brick {
    
    private int x, y;

    private boolean active;

    private Rectangle brickRect;


    public Brick(int xVal, int yVal){
        x = xVal;
        y = yVal;
        brickRect = new Rectangle(x, y, 45, 15);
        active = true;
    }
    
    public boolean getActive(){
        return active;
    }

    public Rectangle getbrickRect(){
        return brickRect;
    }

    public void setInactive(){
        active = false;
    }
    
    public void draw(Graphics g) {
        g.setColor(Color.WHITE);
        g.fillRect(brickRect.x, brickRect.y, brickRect.width, brickRect.height);
    }
}