[CODE]<html> <style> #playingArea { position: absolute; top: 1; left: 1; border: 5px solid black; width: 750; height: 720; z-index: 2; } #basket { position: absolute; top: 650; left: 228; width: 64; height: 16; } </style> <script type="text/javascript" language="Javascript"> var basket; var basketLeft = 228; function keyListener(e) { e = window.event; if (e.keyCode==37 && basketLeft > 0) { basketLeft -= 8; basket.style.left = basketLeft + 'px' ; } if (e.keyCode==39 && basketLeft < 436) { basketLeft += 8; basket.style.left = basketLeft + 'px' ; } } function init() { basket=document.getElementById('basket'); document.onkeydown=keyListener; fall(); } grphcs=new Array(5) Image0=new Image(); Image0.src=grphcs[0]="1.gif"; Image1=new Image(); Image1.src=grphcs[1]="2.gif"; …

Member Avatar
Member Avatar
+0 forum 21

hey everyone! I am working on a project in which i will be using cocos2d for developing a game for android. I am new to cocos2d. Can anyone tell me how to write a simple Hello World app on cocos2d using Eclipse( for Android ). I have already installed Android SDK and Eclipse. Do i have to install cocos2d also ? please help! regards, Bis!

Member Avatar
+0 forum 0

can any one help me wright the code for any simple java games, choose one from the selection below plsss (using jav -Base Conversions -Lotto 649 -Mastermind -Hangman -Deal or no -Deal -Who Wants to be a Millionaire -Card Games -Theatre Seating -Morse Code Instant/Fortune Teller -Pay Stubs -Educational Game -Trivia Quiz -Other by teacher approval

Member Avatar
Member Avatar
-1 forum 4

I'm working on a small concept demo for a friend and I'm stuck on the UI. I'm trying to build something akin to an FPS interface (using mouse-look and the iconic WASD). I'm working in a Windows environment (Win7 to be precise), so I figured I'd use the standard Windows messaging system. So far I've managed to make use of the mouse effectively enough. However, I'm having problems with WASD. From what I can tell (yes, I use MSDN), character keys will be processed into WM_CHAR messages. That "wouldn't" be a problem if they weren't capital sensitive making "w" and …

Member Avatar
Member Avatar
+0 forum 1

hi i started coding battle ship when i was done i noticed that the user and computer always misses, even if they hit, i dont know what i did wrong [CODE]import java.util.Scanner; public class Battleship { public final static String USER = "user"; public final static String COMPUTER ="computer"; public final static char HITVAR = 'H'; public final static char MISS= 'M'; public final static int NORTH = 1; public final static int SOUTH = 2; public final static int EAST = 3; public final static int WEST = 4; public final static int AIRCRAFT_CARRIER_SIZE = 5; public final static …

Member Avatar
Member Avatar
+0 forum 20

So I'm trying to make my own version of Pokemon simulator and this is what i have so far.. [CODE] /* Pokemon.cpp */ #include <iostream> #include <vector> using namespace std; void battle( int enemyHealth, int Health, int enemyAttack, int Attack, vector <string> &att, vector <string> &enmAtt ); int main() { cout << "Pikachu! I choose you!" << endl; int enemyHealth = 100; int Health = 100; int enemyAttack; int Attack; vector <string> att(4);//your attacks att[0] = "ThunderShock"; att[1] = "ThunderWave"; att[2] = "Agility"; att[3] = "Quick Attack"; cout << endl; cout << "Your attacks:" << endl; cout << endl; //output …

Member Avatar
Member Avatar
+0 forum 2

Everything works fine except when you roll a non-instant win or lose, you always win on your next roll #include <iostream> #include "Crapsfunctions.h" #include <conio.h> #include <ctype.h> using namespace std; void main() { double Money; double Bet; long Roll; long Roll2; long Point; long NumRolls; char Answer; //prototypes long throwdie(); static void BackSpace (); double ReadDouble (); cout<<"Crap Game"<<endl; cout<<"Instructions:"<<endl; cout<<"Two die are rolled. If you roll a 7 or an 11, you win the round. If you roll a 2, 3, or 12, you lose"<<endl; cout<<"If you roll anything else, your total is now called a point. Now you …

Member Avatar
Member Avatar
+0 forum 3

Here's my code for a Hangman game I'm developing: #include <iostream> using namespace std; const char *const Words[]={"America", "Barrack", "country", "doctors","salamat"}; #define NWORDS (sizeof Words/sizeof (char *)) int main() { const char *toguess=Words[0]; char guess[15] = " "; int numguesses = 1; char ch; string str1; string str2; // string mychars(""); unsigned wordno=1; std::cout << "Welcome to Hangman!\nRaymund is to be executed for a crime he committed.\nTo save him, you need to guess any of the five words provided by the judge.\nYou are given only 15 tries to solve any of the 5 words.\nGoodluck!\n\nNow enter a number to select the …

Member Avatar
+0 forum 0

Hello everyone, I'm working on my game project and my aim is now to produce the interface part. I've found that there is an easy way to produce some text on the screen with [I]glutBitmapCharacter[/I] and it's working quite well except the font choice is a little bit restrictive. So in my interface code I've planned to use additional clipping planes to make sure that the interface "widgets" aren't drawing outside of their given space. It might be a bad idea but since I didn't found a better way I'll give it a try. So my problem happens when I'm …

Member Avatar
Member Avatar
+0 forum 3

i am pretty new to c++ and dark gdk. im trying to make a simple platform game to start off. i have the basic controls down, the animations, and collision. but i am having much trouble finding how to create the effects of gravity. please help.

Member Avatar
Member Avatar
+0 forum 4

I need to code a program for my friend and it has been giving me some difficulties. This needs to have two classes, one called Tester and another called Game. And the data in the Game class needs to be pulled to the tester class after the calculations are finished. The tester class out puts the sum of the two dice added together. Here are the directions: Directions: You are to write a class that represents a single di. Your class will contain a class variable that indicates the current side of the di. It will contain a method that …

Member Avatar
Member Avatar
+0 forum 1

[CODE] //************************************************************************************ //function playagain(); //parameters char cAns //resets game variables and board or exits game //************************************************************************************ void playagain(char cAns) { cout<<"would you like to play again?(y/n)"<<endl;//function call depending of the choice of the player cin>>cAns;//sts value to variable do { iTotalMoves=0;//resets # of moves ResetBoard();//resets game array cPlayerSymbol='a';//resets game char (so that function will ask the player X or O again) symbol(); // ask the player's symbol then calls the game function } while(cAns=='y' || 'Y');//but no matter what I type (as long as it's not y or Y, it loops into the game again return(0); }[/CODE] it's not exiting, …

Member Avatar
Member Avatar
+0 forum 4

i neez help manz. here is what i have so far: ------------------------------------ Dim x As Integer Private Sub cmdexit_Click() 'this will end the program End End Sub Private Sub picmario_KeyPress(KeyAscii As Integer) 'this will allow the user to use various keys to 'move mario 'this will move the mario up using the 8 key If KeyAscii = 56 Then picmario.Top = picmario.Top - 50 End If 'this will move mario down using the 2 key If KeyAscii = 50 Then picmario.Top = picmario.Top + 50 End If 'this will move mario left using the 4 key If KeyAscii = 52 …

Member Avatar
Member Avatar
+0 forum 8

In this program we are going to simulate a simple card game. The rules are that the player selects a card out of a deck of 52 cards. The computer picks a random card out of the deck. The person with the highest card face number wins. In this program it would be very helpful to use the examples of card games in the book. This will give you a majority of the code to setup this program. Then you need to add your own classes and code. You must have 2 classes in your program. One class will be …

Member Avatar
Member Avatar
+0 forum 36

We got to get this to compile and I really need your assistance! I got sick last week and missed the lecture on these subjects and it took all night but here it is..... almost done.... but the assignment specs below say that it HAS TO COMPILE OR I FAIL! [code]#include<cstdlib> #include <process.h> #include<ctime> #include <iostream> using namespace std; // FACE CARDS ARE DEFINED WITH ENUMERATION. enum Suit { clubs, diamonds, hearts, spades }; const int jack = 11; //from 2 to 10 are const int queen = 12; //integers without names const int king = 13; const int ace …

Member Avatar
Member Avatar
+0 forum 2

Hi. I have for a while wanted to know how to make games. Please could someone say what is a good [B]free[/B] programming language/software to use. i am not a begginer as i know quite a bit of vb.net, HTML, css and a small amount of other laguages like python, Java and some of the visual languges. Also if you can name a tutorial as well i will be very grateful.

Member Avatar
Member Avatar
+0 forum 2

I want to start graphics programming. I do SDL in C++, and took a look at OpenGL in C++, but it was like reading Greek! What functions handle graphics programming in Java? I am not very good at Java, and would like to bring it up to the level my C++ skills are at. I'll start small with triangles, quadrilaterals, and lines, and take it from there!

Member Avatar
Member Avatar
+0 forum 4

The End.