game-development

Photoshop's "Screen" mode in DirectX

Edit: Problem solved! See end of post. How to implement "Screen" blending mode from Photoshop in DirectX 8? Info, i've found on this topic (http://www.ziggyware.com/readarticle.php?article_id=228): Result = 1 – (1 – destination) * (1 – source) Result = 1 – (1 – source – destination + destination * source) Result = 1 – 1 + source + de...

How to prevent cheating in our (multiplayer) games?

If you are writing a game you should think about cheaters and how to prevent them from cheating. I don't think only the mmo multiplayer games but also singleplayer or "home-brewed" p2p mp games too. When the game is based on completely a server-client architechture, the job is almost done I think, but there is also wall hacks or someth...

In what ways is JavaScript restricted when making a Facebook app?

I've been asked to do Facebook apps. Before I commit to anything, I want to know how easily a game can be moved to Facebook? (I'm completely comfortable making games in JavaScript in the browser.) Does Facebook filter the JavaScript in some way? Can I use jQuery or other JS libraries? Can I do animation by altering the DOM on the fly? ...

Best practices for Alt-Tab support in a DirectX app?

When writing DirectX applications, obviously it's desirable to support the user suspending the application via Alt-Tab in a way that's fast and error-free. What is the best set of practices for ensuring this? Things that need to be addressed include: The best methods of detecting when your application has been alt-tabbed out of and w...

Game Programming as Hobby, should I use Java or C++

Hello Presently, i am learning Java from the book The Art and Science of Java and following Standford's Programming Methodology Course. I would like to do game programming, but only as a hobby. I was thinking, would Java be a good choice or is C++ the defacto in game programming. ...

How do I go about implementing nine man morris game

How do i go about implementing nine man morris game without doing exhaustive search of all the solution space. ...

How to build a solvable level of Same Game (aka. Chain-Shot, aka. Clickomania)

I'm building a game such as Same Game, when I have to create a new level I've just run an algorithm to fill the board with N colors, this algorithm fills the board at random, but obviously the levels generated this way are not all has a solution. I have to make a function to resolve this problem, so the game can be played by a perfect p...

Generating non-uniform random numbers

Can you tell me any ways to generate non-uniform random numbers? I am using Java but the code examples can be in whatever you want. One way is to create a skewed distribution by adding two uniform random numbers together (i.e. rolling 2 dice). ...

C++ slow, python fast? (in terms of development time)

I'm thinking of trying to make some simple 2d games, but I've yet to choose a language. A lot of people recommend either C++ with SDL or python with pygame. I keep hearing that developement on C++ is fairly slow, and developement time with Python is fairly fast. Anyways, could anyone elaborate on this? What exactly makes development in ...

Gaming protocol

Are there any standard protocols with witch you could make games with (like http, ftp), as i had problems when I tested a connection on a random port (1024-65300) out (I had to forward ports on my router and it only works with one computer at a time). There should be, im programs use something and there is no need to set up any ports......

Howto manage the game state in face of the EDT?

I'm developing a real time strategy game clone on the Java platform and I have some conceptional questions about where to put and how to manage the game state. The game uses Swing/Java2D as rendering. In the current development phase, no simulation and no AI is present and only the user is able to change the state of the game (for exampl...

Javascript game; slowing down and freezing! How to solve it?

Hi, I'm starting to program a javascript tower defense; so far i have the movement of the minions over a trajectory. But I have a very big trouble, the game suddenly freezes for a couple of seconds. I'm guessing that is the garbage collector doing its job, any ideas on how i can solve this will be very good since i plan on adding a lot m...

Anyone know why nextEventMatchingMask:untilDate:inMode:dequeue: take many ms to return an event?

In a OS X game calling this was recommended as the way to get keyboard and mouse events. NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; for(;;) { NSEvent* event = [NSApp nextEventMatchingMask:NSAnyEventMask untilDate:nil inMode:NSDefaultRunLoopMode dequeue:YES]; if(!event) break; processevent(event); ... } [...

Java Game Programming: JOGL vs LWJGL?

I am currently writing a Turret Defense style game using the GTGE engine, this engine has the ability to use either JOGL or LWJGL to drive the graphics and so I was wondering, which one should I use? What are the pros/cons of each? What factors should I consider when deciding? ...

Vsync in Flex/Flash/AS3?

I work on a 2D shooter game with lots of moving objects on the screen (bullets etc). I use BitmapData.copyPixels(...) to render entire screen to a buffer:BitmapData. Then I "copyPixels" from "buffer" to screen:BitmapData. The framerate is 60. private var bitmap:Bitmap = new Bitmap(); private var buffer:Bitmap = new Bitmap(); private f...

Is P2P or client-server architecture better for my game?

I'm about to develop a simple 2D game something like chess, checkers, or reversi. There are only simple animations of the players pieces. No complicated math nor graphics therefore I'm wondering if it is better to go with P2P over a client/sever approach. The game will be an iPhone/iPod Touch game (and later on run in a Web browser game...

Simple 2d physics tutorial for terrain collision detection

Hi, I am looking for a tutorial which will show me how to do simple 2d physics like the ones in this (http://www.teagames.com/games/tgmotocross/play.php). The part that I am most interested in is how the collision detection is done between the character / player and the terrain, as well as how to store / generate the terrain. The langua...

Game development on iPhone using Unity engine

Hi, Im very new to game development on the iPhone... And I have a question: If I was to unity, how would that work... Would I use objective-c in unity? or is all of it like just click it, and add properties, no code (that may be a stupid question, but im just wondering) And once your done with the unity app, does it automaticly complil...

How to tell which SHIFT key was pressed?

In my game, I want to be able to use the right and left shift keys for different functions. In Java (or another language), is there any way to distinguish between those two? The KeyEvent class has only VK_SHIFT, which corresponds to both left and right shift keys. Same with Control, Alt, Enter, etc. My primary concern is someone may be...

how to get into game dev(part time)?

I am doing CS undergrad, with the intention of pursuing a masters and maybe later a phd in neural networks, so that is certainly my main area of interest, but I am also good in fine arts and enjoy gaming so I want to start a little bit of 3d artwork and game dev in my free time. Problem is I don't know where to start.can anyone in the fi...