[Webinar] Streamline your web hosting managementRegister Today


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


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?

The new generation of project management tools
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

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
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


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?


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?

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


On our last RTS we did, Java, the networking worked perfectly and the GUI worked seamlessly in time w it.
Will a Python GUI handle  a game window adequately? - as well as possible
What about with TCP and datagrams underneath it all?
Another question already suggested I keep the server in Java, for now.

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?


I finally got Python images to be plopped on the screen, just blitting, a lonely mutalisk, but not flapping.
To make my mutalisk flap its wings in python, or any of my many animated GIF's, for that matter, must I blit them frame by frame? I was surprised it wasn't automatic flapping, like in other situations.

Here is the blit code that finally worked. . .


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?


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.
Free Tool: Subnet Calculator
LVL 11
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.


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

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.
the requirements for the game is :

a single player playing against the computer.
The computer automatically generates its fleet locations
The single player enters via keyboard the location of her or his fleet.
Fleet components:
Battleship: 5 spaces (1 battleship)
Crusier: 4 spaces (1 cruiser)
Submarine: 3 spaces (1 submarine)
Destroyer: 2 spaces (1 destroyer)
Trawlers/spy ships: 1 space each (5 trawlers)
The board size: 10 spaces x 10 spaces
The human player starts by guessing a location. If a miss, the computer tells the user it was a miss. If a hit, the computer tells the user it was a hit. If a hit sinks a ship, that ship type is identified. The user's shot display is updated with the location of the hit and/or miss.
Both the user's screen and the user's guess screens are displayed for the user and updated during game play.
The game continues, alternating "shots" on the opposing fleet.
The game is over when either the user's or the computer's fleet is totally sunk.
User interface requirements:
two fleet screen matrixes
User's fleet positions
user's shot record (and hit/miss pattern)
a running count of number of shots, number of hits, and number of misses.
May be either text-based or GUI
Program requirements:
All course standards met, to include internal documentation
All variables validated and no out of range errors experienced during gameplay
method calls, parameter passing and returns to main(), properly prototyped and called.
computer …
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?

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?
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.

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?
game wouldn't work
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.
Receive 1:1 tech help
LVL 11
Receive 1:1 tech help

Solve your biggest tech problems alongside global tech experts with 1:1 help.

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?

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?
Hello Experts!!!

How do you get individual cards out of an image where they are all together (see attached pic)...  Is this the standard way of generating cards, is there a better way?  (Like having individual graphics in a resource file)

I'd like to know the how, the why and the best practices;  References are awesome, experience is awesome (er), lol

Thank you in advance,

I will be given a set of X/Y points and their corresponding Z values. Z = f(X, Y), but I do not know the function f. The points will be clustered together and I don't expect pathological conditions. The local maximums and minimums will have extra sample points to help make the interpolation better. The goal is to come up with a smooth surface that represents the function f as close as possible.

The analyst providing me with the set of points of known XYZ points will also give me an XY rectangular grid; and at all the intersection points of horizontal and vertical lines, I need to provide a z-value.

One thought I had was to consider a point and look at 4 quadrants, and take the closest point in each quadrant, and using those 4 points or more to try to interpolate. Prefer to be able to use a curved surface to get the results rather than linear planes. One rule is that the final results will match the given XYZ points . The given points are known as anchor points or knots.

I am just looking for something functional. I am not interested in speed.

 I am not allowed to use binaries, so I will have to build from source code in Linux or Windows.

Thanks in advance.
Once upon a time at a core conference this happened. It is one of those amazing moments when Experts get intrigued by a fun puzzle to solve.

Do you have a favorite question or other piece of content like this?  Would you like to see us facilitate more items like this or have an idea that would make your time here more enjoyable? Let me know by commenting on this post or messaging me.
LVL 18

Expert Comment

by:Kyle Santos
TIL: AngelIII is not 'Angel 3' but Angel Eyes.

My latest blog is finished.
It is a musicians' upload blog, with a general theme/topic for discussion, and quarterly contests for a user-made topical video for five or some thousand dollars.

Is this a potential hornet's nest? lots of legal risk ? What are the hornets?


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).

Vendor Experts

Gil FeldmanMonday Learn more about Monday