Improve company productivity with a Business Account.Sign Up

x

Game Programming

Game programming is the software development of video games. Game programming requires substantial skill in software engineering as well as specialization in simulation, computer graphics, artificial intelligence, physics, audio programming, and input. Like other software, game development programs are generated from source code to the actual program by a compiler. Source code can be developed with almost any text editor, but most professional game programmers use a full integrated development environment (IDE).

Share tech news, updates, or what's on your mind.

Sign up to Post

Hi
I am bewildered by some of my Python bugs today, with a new approach of my Python chess engine.

The ChessBoard class doesn't connect with my ChessPiece data members.ChessBoard.pyChessPiece.pyChessGame.pyChessPlayer.py

The board tries to instantiate ChessPiece objects that are a white pawn, like ChessPiece.PIECE_PAWN
PIECE_PAWN is a totally valid data member in the ChessPiece class,
but the error states it is a non-existent attribute - PIECE_COLOR... too

Maybe I'm being poisoned by my Java old habits, eg there are no public static equivalents

How does my code look, also, style wise? My code must be stylistically proper! What have I missed, attached?
Does my ABC player look okay?

Thanks
0
The 14th Annual Expert Award Winners
LVL 7
The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

Hi
When my dad saw this claim, attached JPG, seemingly from my website trademark managers, he said he thought it looked like a scam.
I thought it was plausibly, possibly legit, but bec I'm not doing the website anymore, I was disinclined to care. Im not paying another $2,000 into this thing.
Did some Nigerians find my domain info and send me this bill? I already paid all the bills they said I'd need to pay. I was concerned about being fined.

Is this sheet some kind of phishing scam? It looks like a standard commercial building in Manhattan.  (244 Madison Realty Corporation (glotrade)

I don't remember the glotrade name. I'm a hawk on scam scents now after being taken before. I'm not paying it. I'll send Luca Brasi, or Joe Pesci up there to explain it to for me.
Thanks
0
Hi
I am not certain if League of Legends is an RTS type network server, or an FPS? The player movements are well spaced out, so I'd think RTS

In Summoner's rift, is it only 5 people/champions playing? Is that the practical limit on players, in most network games?

If I port my working Java RTS server that I finished a little while ago to Python, could I expect any performance shift? It is TCP messaging, with UDP duplicates sent afterwards for speed.

Thanks
0
Hi
In all my Java games, I have used code like :
public static int STAR_TYPE_RED_DWARF=1
public static int STAR_TYPE_WHITE_DWARF=2
public static int STAR_TYPE_BLUE_GIANT=3
public static int STAR_TYPE_SUPER_GIANT=4
and many more game object constants

What is the best way to replicate this in python, so these constants are automatically associated with its object when writing code?
I haven't seen anything like this yet

Thanks
0
Hi
My Python RTS server reboot from my finished Java one needs some clarifications.

The example networking code at this Python page doesn't work, when it clearly should, code below

here

The line with bind() is where it raises exceptions and it's baffling me! - cut and paste!
My code that won't compile is...
import socket, sys


if __name__ == "__main__":

    print('__main__')
    port_num=1234

    try:


        # Create a TCP/IP socket
        sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)

        # Bind the socket to the port
        server_address = ('localhost', port_num)
        print ('starting up on %s port %s', server_address)
        sock.bind(server_address)

    except:
        print('Error')
        exit()

Open in new window


Did I miss a step in pyCharm settings?

Thanks
0
I am trying to create a 2D board game.  To move a game piece, you click on the game piece to select it, then move the mouse to the square you want the piece to move to.

I am wanting to draw a "path" as the mouse moves to the potential destination square, showing which squares the piece will move to, taking into account any obstacles the game piece will need to navigate around.

The part I am struggling with most is how to draw the path line.  For example, the line will look different based upon the game piece moving SOUTH (indicated in blue) vs moving EAST (indicated in red).

[NOTE:  I am not sure what this is called in gaming circles (the shape of the lines themselves).  Is it called aliasing?  Anti-aliasing is supposed to "smooth"-out the "jagged" stair-step look of the lines formed (lines drawn at an angle, or circles).  I know that the letters I am typing, when zoomed up to like 800% of normal size appear very jagged. ]

I am just wondering what the algorithm is called and where I might go for help on this (including here on EE, of course).


Example:
draw-line.png
0
Hi
All the best modern games are pseudo 3D, like League of legends and Starcraft 2.

Is it pseudo 3d? - It is 2D images used smartly at correct locations?

How do Starcraft 2 and League of Legends achieve their 3D feel?

Would Python be able to do decent game-play FPS & updates in time with my client networking class?
MIT and everyone is teaching CS100 in Python, and I've seen some promising 2D demos.
Thanks
0
Hi
Considering the RTS project many of you helped me complete,

Java had no problem being an abstract base class client engine,
and the JFrame was smooth.
Will a Python GUI do adequately with a client engine abc ? The abstract method can update a GUI's objects. Will I need to do double buffering on a GUI?
Could I make a Python effort approach  League of Legends quality? I'm keeping the server in Java, but the client abc will be ported to Python.
Thanks
0
Hi

I've been playing League of Legends with no problems,
and all of a sudden it gets into this 'Attempting to reconnect' mode at the re-spawn altar after my champion gets served
and the game is essentially locked and I cant move my primary dude. I can move the camera, but not my champion.

Is that something I did wrong in my game-play?

Thanks
0
Hi I am trying to get my games to output the current time in seconds that the game is running for as a score for the player in the canvas but I keep getting an undefined var instead of the number?

Does anyone have any idea whats wrong with my code??


Thanks, See code below.

HTML5 Canvas
JS
var Game = {
    canvas : undefined,
    ctx : undefined,
    backgroundImage : undefined,
    backgroundMusic :undefined,
    soundImage: undefined,
    soundImagePosition : { x : 750, y : 10 },
    vy : 0,
    rocket : undefined,
    rocketPosition : { x : 350, y : 400 },
    dxSpeed: 7,
	dySpeed: 3,
	keyboard : { keyDown : -1 },
	keys : {
    A: 65,     B: 66,      C: 67,      D: 68,       E: 69,      F: 70,
    G: 71,     H: 72,      I: 73,      J: 74,       K: 75,      L: 76,
    M: 77,     N: 78,      O: 79,      P: 80,       Q: 81,      R: 82,
    S: 83,     T: 84,      U: 85,      V: 86,       W: 87,      X: 88,
    Y: 89,     Z: 90, 	   LA:37,      UA:38, 	    RA:39,      DA:40,
 }
};

function handleKeyDown(evt) {
    Game.keyboard.keyDown = evt.keyCode;
}

function handleKeyUp(evt) {
    Game.keyboard.keyDown = -1;
}

Game.start = function () {
    
    document.onkeydown = handleKeyDown;
    document.onkeyup = handleKeyUp;

    Game.canvas = document.getElementById("myCanvas");
    Game.ctx = Game.canvas.getContext("2d");
  

    Game.backgroundMusic = new Audio();
    Game.backgroundMusic.src = "assets/audio/start.mp3";
    

Open in new window

0
Free Tool: Site Down Detector
LVL 12
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Hi

If I put my keyboard listening in pygame in my drawing/game loop, it obviously won't be checked constantly.
I must obviously have a Thread listening for keyboard input, mouse movement to play my game and update internal game variables.


Is this just a new class I must make with two methods each to listen to pygame keyboard/mouse activity. Case closed?


Thanks
0
Hi

If Python can be run in a browser,

Will my RTS client's game window be playable? - how? - browser window? - in its own window?
It looks like printf's are written to the browser window, but will Threading occur normally?
I'll keep my invulnerable RTS server in Java. And do a client in pure Python now. Will it be as good as in Java?
Thanks
0
Hi

Someone has pics for me on photo bucket.
Do I have to pay? it seems so.

Is this a legit site? I am sick of scams

Thanks
0
Hi
Python array/list instantiation, import and other declarations are confusing me!

In my code attached, I have a main class for holding the data structures for a platform game level, basically x,y, positions and length of the platform, for now,
I don't understand why the 'module' object is not callable - error? It seems it should be trivial. What does that mean? I intend to end up with a list of terrain objects
In platform.py, must I do 'import platform as platform' is that telling me how to call methods, get data from that class?

Thanks
platform.py
mainclass.py
0
Hi

If I'd like to make a platform game like Contra,

Are there any acceptably decent animated GIF's somewhere out there for me to choose from?
or some adequate transparent ones for me to do alpha coding with? Something close to a predator, an alien, Arnold, terminator, Robocop, scorpion, rancor! tauntaun, ewok gungan

What do most coders use for these place-holders?

Thanks
0
Hi

I finished our colossal collaboration of a network game with a central server, a while ago. I will convert it to python now that I'm shifting to it as well. Is that unadvisable - python might not be optimal for a game server?

I know that MIT had an RTS AI coding contest, before.
There's also ORTS, open rts
There seem to be many similar links on Google.
The MIT contest was geared to a confusing, un-watchable mess of a game, in my opinion.

Do these types of contests have any traction? now? Any of them non-college?
I have many ideas, some non 3D war.
Thanks
0
Hi

I have had my cards hacked enough times to get really annoyed.
I receive balance sheets with card purchases in Rhode Island, or California, and I live in NC !

I paid with Paypal today, which means, my card was never exposed to direct hackers, I think.
Is that correct? VISA always refunds these fraudulent charges ( >$5,000, total, one time, over a few months)
Do hackers steal my paypal login?
Must I always do (card) online payments with paypal? I'm sick of cancelling cards for safety's sake
Thanks
0
Hi

I have my pygame ready and I'm going to start being a coding-personal-trainer teacher for nearby kids.
No doubt, there are many books for me to gain wisdom on how to proceed? Or, is there a good web-site done?
I asked some previous questions in this sphere, but some additional references/syllabus would be useful.
Thanks
0
Hi
I am nearly ready to begin my foray into games in Python. However, is it more advisable to incorporate a JFrame for the game Window? Is Python GUI up to speed?

Thanks
0
Free Tool: Port Scanner
LVL 12
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Hi
All of a sudden, my battle.net is saying

Your connection will be run through a proxy server because of your network setup"

This is new.
Things seem to be hinky. I cant join or create games (that are seen by others).
I cant think of anything I've changed
What might be causing this?
Thanks
0
We have an 11 year old that is very creative and loves doing things on the computer. At a book fair earlier in the year, he chose to get a book on building websites and really enjoyed it. I'm toying with the idea of getting him a coding program for Christmas and wondered if anyone had suggestions for that age. He likes video games as well so I really think he'd like one that allows him to build and play his own game, if that helps.

Thanks.
0
Hi
I need to be able to install Pygame in Pycharm (4.0.5), but it seems Pycharm has come out with newer versions.
Pygame is no longer in 2.9, but 3.3

One example on Youtube suggested I re- install Python? Will this all automatically link up in pyCharm?
Last time it tried, the console installation instructions didn't seem to affect the behavior in pycharm.

What is the best way to get it working in Pycharm?
Thanks
0
A question about making puzzles for bridges (also known as Hashiwokakero or Hashi).  https://en.wikipedia.org/wiki/Hashiwokakero

Is there an algorithm to generate a puzzle given the size of grid?  Please provide algorithm or link to one if it exists.
0
Hi
I have addressed this a little already.
I have completed my audio/video upload site. I am not going to go public, because of the $500 / hr legal fees of all the attorneys I'll need to pay to draft up TOS and copyright needs for users and their music, and safety for my site being the forum for violations.

So, the months of questions there have come full circle, Thanks

But, I have seen comments here and there on the net about nobodies getting serious exposure for their music. What is the best way to do this for my music? My site was not for my music, but anybody's uploads..

My music is not recorded, but could be soon. I don't have a band. I'm quite happy being a loner.
I get the impression that there are forums out there for young people to listen to new music coming out, where artists can add their music to a queue of sorts for playback to listeners?
Are there real ways to advance new music?

Thanks
0
I have a samsung galaxy note 3 32GB Internal 64GB sd card

I format the sd card for portable storage and all is ok I see my 32GB internal and the 64GB sd.

If I format the sd card to merge with the inetrnal storage it shows:

Total space available; 90GB

Internal 32 GB (It should say 90GB right)

sd card shows 64GB but unavailable for file manager (which is ok)

I connect my android to the PC and it shows only internal (which is ok) but it only shows 32 GB of space.

My idea was that if formatted as internal the available sorage would show up as 90GB, so from my PC I cant really know what the actual available space is.

Am I doing somethong wrong? Or that is the way sd card as internal space works? Is there a workaround?
0

Game Programming

Game programming is the software development of video games. Game programming requires substantial skill in software engineering as well as specialization in simulation, computer graphics, artificial intelligence, physics, audio programming, and input. Like other software, game development programs are generated from source code to the actual program by a compiler. Source code can be developed with almost any text editor, but most professional game programmers use a full integrated development environment (IDE).