game – Tetris clone in C

I just finished writing an ncurses-based Tetris clone in C. It’s only my second project of this size, the first being a Snake clone. I would really appreciate any and all suggestions/improvements as I’m relatively new to C and I would like to improve.

As this is a 300-plus-line codebase, anything I can add to this question to more easily facilitate its review will be added upon request.

The code is located here.

For this code to properly function on macOS, you must compile it with -D_XOPEN_SOURCE_EXTENDED -lncurses. On Linux, you must compile it with -lncursesw. This is due to its usage of wide characters.

3d – What technology is used to recreate cities in game maps?

I am doing the coursework on some technology and it’s used in this world. For example, I want to do technology to recreates and renders huge locations. Watch Dogs 3 has a huge London map and I’ve heard that it has not been done by hand. Some tech was used to render all of it into the 3D model.

Thank you

unity – Does anyone want to test my game?

Dear Game Devolepment Conumity I am a 14 year old game developer and have developed a game called Super shadow cube myself.
My game is a 3D parcour game where you have to jump on invisible objects with a cube to reach the goal. Every invisible floating platform, staircase or random object leaves a perspective shadow.my game is a 3d parcour game in which you have to jump with a cube onto invisible objects to reach the destination. Each invisible floating platform, stairs or random object leaves a perspective shadow
If someone wants to test my game and could write a short feedback I would be very happy.
link:

https://play.google.com/store/apps/details?id=com.Lomusire.SuperShadowCube

Screenshot

python – Higher or Lower guessing game

After an extended absence from coding, I decided I would make something to try and get back on my feet again. I ended up making a project that I have made several times before, a higher-lower guessing game. Now while the coding process went well and I came out with something that works quite well, I feel like I fell into a lot of my old bad coding practices. I feel it would be good that before I move onto bigger projects that I post this here and see where I’m screwing up.

I would just like to know if there are any just general bad practices or things that could be made better.

from random import randint


def find_min_max() -> list:
    """Find ths minimum and maximum values for the number to be between"""
    while True:
        try:
            min_max = (int(input("Please enter the min value: ")), int(input("Please enter max value: ")))
            if min_max(0) < min_max(1):
                return min_max
            else:
                print("Make sure the min number is smaller than the max number.")
        except ValueError:
            print("Please enter numbers only.")


def find_guess_limit():
    """Finds if the user wants a guess limit, and sets it if they do"""
    while True:  # Finds if the user wants a guess limit
        guess_limit = input("Would you like to limit your guess's? (Y/N): ").lower()
        if (guess_limit == "y") or guess_limit == "n":
            if guess_limit == "n":
                return None
            while True:  # Gets what the user wants the guess limit to be
                try:
                    guess_limit = int(input("What would you like the guess limit to be: "))
                    if guess_limit > 0:
                        return guess_limit
                    else:
                        print("Make sure the number is greater than zero.")
                except ValueError:
                    print("Please enter only a number.")
        else:
            print("Please only enter Y or N.")


def setup():
    """Sets up the game parameters"""
    min_max = find_min_max()
    guess_limit = find_guess_limit()
    return min_max, guess_limit


def play_round(num: int) -> bool:
    """Goes through one guess by the player"""
    while True:
        try:
            guess = int(input("What number is your guess: "))
            if guess == num:
                print("You got it!")
                return True
            elif guess > num:
                print("The number is lower.")
                return False
            elif guess < num:
                print("The number is higher.")
                return False
        except ValueError:
            print("Please only enter a number.")


def reset() -> (bool):
    """Checks if the player wants to quit, and if they don't, checks if they want to change the rules"""
    while True:  # Checks if the user wants to quit the game
        close = input("Would you like to exit the game? (Y/N): ").lower()
        if (close == "y") or (close == "n"):
            if close == "y":
                quit()
            else:
                break
        print("Please only enter Y or N.")
    while True:  # Checks if the user wants the rules to be changed
        rule_change = input("Would you like to change the rules? (Y/N): ").lower()
        if (rule_change == "y") or (rule_change == "n"):
            if rule_change == "y":
                return True
            else:
                return False
        print("Please only enter Y or N.")


min_max, guess_limit = setup()
while True:
    num = randint(min_max(0), min_max(1))
    if guess_limit is None:
        while True:
            if play_round(num):
                break
    else:
        for _ in range(guess_limit):
            won = play_round(num)
            if won:
                break
        if not won:
            print("Sorry, you ran out of guess's")
    if reset():
        min_max, guess_limit = setup()

In a visual novel game with optional sidequests, how to encourage the sidequests without requiring them?

Context

I’m working on a small visual novel-style game, telling the story of a defense attorney and investigator. The story is split into chapters, with each chapter being a new case, and there are also recurring characters who develop throughout the story. It’s a mini Phoenix Wright-style experience, with some point-and-click detective work mixed in.

As part of the game, you can embark on optional character-based sidequests, each of which focus on a different character and showcase some development between them and the protagonist. A few of these sidequests unlock after completing each case, and are usually related to the case that just happened. For example, after finishing a case involving a video game convention, you unlock an optional sidequest where you can take one of the supporting characters (the “tough guy who’s secretly a dork on the inside”, of course) to the convention before it leaves town.

I want to make these sidequests optional, and not force the player to do all of them or make them feel like they have to say “yes” to all of them – that is, I want to establish that they’re free to decline an invitation if they don’t like a particular character as much as the others and would rather not take them out for ice cream. However, I still want to make sure the player does some of them, because I feel many of them, if missed, would cause the player to miss out on really neat parts of the game. (If it helps, the game doesn’t have a “completion percentage” or anything, just small achievements for doing certain things.)

My question

Given this design, I have a conundrum. I want the player to do at least some of the optional sidequests, but I don’t want to force it or make them feel like it’s necessary to see every single one of them. I don’t want to place an arbitrary “you must do 3 sidequests to proceed” roadblock, but I also don’t want the player to skip all of them and do the entire story without developing any of the characters. That obviously defeats the point of a heavily character-based visual novel! So, this is my dilemma:

What game mechanics in a visual novel are best to encourage optional sidequesting, but not require it for story progression or completion?

I have a couple ideas for this, since a lot of games have offered solid solutions for this problem already:

  • Making the sidequests optional, but having rewards for doing them. This is the approach that most games take nowadays. You don’t have to do the sidequests, but maybe if you do one, it unlocks a palette swap, an item, or a hint coin.
  • Affinity mechanics. Maybe if you do enough sidequests for your prosecutor buddy, he gets closer to you and gives important hints in a later cases. This would work similarly to “friendship” in other games, where there’s a number that keeps track of how good your relationships with different characters are and doing quests increases that number. At the same time, I think this encourages too much of a “metagame” approach, where players will just do every sidequest for a character all at once to unlock their bonus. It also makes the difficulty curve of the game wonky, since I want the cases to start easy and get progressively harder, and giving substantial bonuses in the late game might mess with that design.
  • Requiring the player to do at least X of them. This is the roadblock approach – blocking the progression of the story until the player does at least 1, 2, or 3 of the available sidequests. I dislike this because it feels like I’m being arbitrary and might frustrate the player if they don’t like the current sidequest options and really want to do the next case.

Ideas and other suggestions are welcome!

game design – How to make Isometric Tile Generator?

I’m planning to make an Isometric Game. For example consider a city simulating game. I’m going to use PyGame. What I want is, only one player sprite should be there but should duplicate itself as tiles and each tile should be accessible individually. But I don’t know how to do it.

Hope this question is understandable.

Thanks in advance.

unity – WaitForSecondsRealtime() question – Game Development Stack Exchange

Was reading the documentation and I’m trying to get some timing down for a few animations. My question is, is the WaitForSecondsRealtime dependent on machine lag or anything. A friend of mine said that WaitForSecondsRealtime was invoked at the kernel level and thus would be ass accurate as possible.

Like I said I’ve read the documentation but they don’t really go into the specifics about how that works. Anyone have any insight?

architecture – Is Dedicating A Thread To Inputs A Good Idea In Game Design?

You don’t gain any benefit from polling for input faster than you act on it.

Even if you read the input early on your input thread, it’s just going to sit in queue for the next game update step to pick it up, accomplishing nothing in the meantime.

So the situation is equivalent to the game update thread just reading all the input since the last update, and applying it directly to the current update step.

Keeping input on the game update thread is architecturally simpler, and avoids the risk of variations in thread timing making your controls feel inconsistent. (eg. with a 200 hz input loop and a 120 hz game update loop, sometimes your update loop gets 2 input samples, sometimes it gets 1, creating a beat frequency in your control responsiveness)