So I have made a menu and a guy helped me, We have used enum in the menu is there anyother way i can do it, cause my teacher is not allowing me to use classes, files and arrays, please help, if u guys have anything simple and better i need it urgently.. here is the code:- enum MenuState{MenuPlay,MenuHelp,MenuExit}; // the idea of using enum is that instead of using an int to represent a set of values, a type with a restricted set of values in used instead. MenuState ms=MenuPlay;cout<<" *-=MOD=-* v1.0\n\n\n\n\n"; char ch=0;//or anything other than '\r' while …

Member Avatar
Member Avatar
-1 forum 1

Hello, I want to move a panel smoothly like a form. anybody can help me please? thanks ^_^

Member Avatar
Member Avatar
+0 forum 3

i've been working on a game project, its a slider platformer and i've been having problem with getting the movement working, the movement is time based instead of being fixed to the frames per secound so the movement is consistent. the movement was working when i was testing out the algorithm lazily in the main file but i've put it all into a class that handles movement and collision detection and now it doesn't want to work, instead of object moving smoothly around the screen it goes flying right off the screen instead. i've tried to find the root cause …

Member Avatar
Member Avatar
+0 forum 3

I'm using winapi function GetTickCount() with delta time and I'm calculating the displacement of an object on screen like this: number_Of_Pixels_To_Move_On_Screen = (speed*delta_Time)/number_Of_Pixels_Per_Milllisecond but I get uneven movement.Sometimes it moves a litle faster ,sometimes slower . Can someone tell me how to get the object to move at a constant rate?

Member Avatar
Member Avatar
+0 forum 1

Hey guys, I'm trying to make an AI character perform a pattern movement when a certain action occurs rather than have him do it all the time. I call two different methods, one to move him left, then move him right, the problem is the first method is still active when the second is called and it cancels out the movement and he stands still. Any suggestions??

Member Avatar
Member Avatar
+0 forum 1

I'm having some trouble making my snake move :D I can move one point in any direction but the whole body of the snake is where I'm confused , if(a == (char) 119 || a == (char) 87 || a == 72) { y=y--; gotoxy(x,y); PrintVector(v); } thats works just fine if my vector consists of only one point , but other than that it doesnt work , I know if I Want its body to move right I gotta use puch_back and pop_back but I just need a little help or a hint :D another thing i'm making my …

Member Avatar
Member Avatar
+0 forum 16

I m creating an app! in which if the user moves the cursor the message should be displayed! But I m using setcursorpos() in my form to set cursor position which display the message! I dont want message to be displayed when mouse is moved through function, I want message to be displayed when user moves the mouse through hardware only (i.e moving mouse with hand)

Member Avatar
Member Avatar
+0 forum 10

[CODE]int realX = winSize.width + (projectile.contentSize.width/2); float ratio = (float) offY / (float) offX; int realY = (realX * ratio) + projectile.position.y; CGPoint realDest = ccp(realX, realY); [_projectiles addObject:projectile]; projectile.tag = 2; [projectile runAction:[CCSequence actions: [CCMoveTo actionWithDuration:realMoveDuration position:realDest], [CCCallFuncN actionWithTarget:self selector:@selector(spriteMoveFinished:)], nil]];[/CODE] In this simple app, I am trying to make a projectile flying from the middle of the screen to wherever the user touches, and beyond, to the edge of the screen. For whatever reason, the projectile will only fly to destinations with positive x coordinates, no matter when the user presses. If you imagine an x y plane, …

Member Avatar
+0 forum 0

I have 2 images, one is supposed to be on top of the other. This works fine until one of the "movement" keys are hit (a,s,d,w) [CODE]import sqlite3 as sqlite import wx username=None class MainWindow(): def drawmap(self): self.map4_31="C:/python27/game/4_31.gif" self.map1=wx.Image(self.map4_31,wx.BITMAP_TYPE_GIF).ConvertToBitmap() height=self.map1.GetHeight() width=self.map1.GetWidth() self.map1.map4_31 = wx.StaticBitmap(frame, -1, self.map1, (270, 170), (width,height)) def char(self,username): con=sqlite.connect('Characters.sqlite') cur=con.cursor() sql="""SELECT locationx,locationy FROM Characters WHERE name=%s""" % \ (username) cur.execute(sql) data=cur.fetchall() positionx=str(data[0][0]).replace(" ","") positiony=str(data[0][1]).replace(" ","") positionx=int(positionx) positiony=int(positiony) self.playerFile = "C:/python27/game/player_tile.gif" self.playerbmp = wx.Image(self.playerFile,wx.BITMAP_TYPE_GIF).ConvertToBitmap() height=self.playerbmp.GetHeight() width=self.playerbmp.GetWidth() self.playerbmp.playerbitmap = wx.StaticBitmap(frame, -1, self.playerbmp, (positionx,positiony), (width,height)) def OnKeyPress(self,event): keycode=event.GetKeyCode() con=sqlite.connect('Characters.sqlite') cur=con.cursor() sql="SELECT locationx,locationy FROM Characters WHERE name=%s""" % \ (username) cur.execute(sql) …

Member Avatar
+0 forum 0

hello guys.. can you help me on how to make 45 angle shoot or 45 angle movement of bullet in vb.net

Member Avatar
Member Avatar
+0 forum 1

Hi, How to move a form without controlbox? Help please ... Thanks

Member Avatar
Member Avatar
+0 forum 4

(I'm using Vis Studio 2008 and a textbook written for VB2008) Okay, so this problem from my textbook requires me to "animate" (read: move a picture box) a picture of a "robot" finding it's way to a wall and returning to it's original position. I have the logic of the program itself mostly figured out, but the moving of the picture box is alluding me at the moment. My code is as follows: [code=vb] Private Sub btnStart_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnStart.Click Dim totalCount As Integer = 0 Dim isTouchingWall As Boolean = False Dim armsRaised …

Member Avatar
+0 forum 0

The header file [code=c] #ifndef DRAUGHTS2_H #define DRAUGHTS2_H #include <SFML\Graphics.hpp> #include "TwoPlayerGame.h" #include <iostream> enum state{intro, playing, gameover}; //the states found within the game enum squareValue{green, red, blank}; //the draught square values on the board class Input { public: Input(); void setInput(unsigned int,unsigned int); unsigned int getX(); unsigned int getY(); bool inputStatus(); protected: unsigned int x; unsigned int y; bool inputReceived; }; class draughtPiece { public: draughtPiece(); draughtPiece(double,double,double, int);//Draught(X, Y and radius) //set the positions of the draughts void setPosX(double); void setPosY(double); void setRadius(double); //void setPieceNum(int); //get positions, velocity and radius of the draughts double getPosX(); double getPosY(); double getRadius(); …

Member Avatar
Member Avatar
+0 forum 1

Two users are connected with a server if user A move his mouse on his browser window than the shape on user B browser Window should be move. Any idea how i can do this.

Member Avatar
Member Avatar
+0 forum 1

I want to make a native win32 program that simply moves the cursor to x=100 y=200 on the screen, and then clicks the left mouse button once. Where do I start? For once, Google got me nowhere. I use VC++ 2010 to compile.

Member Avatar
Member Avatar
+0 forum 7

Greetings! I'm almost finished in creating a geometry wars like game (except that you cant move =P ). For the last few days I've been stuck doing the diagonal movement of the bullets. I wish someone could help me =D here's the constructor of the bullet class x & y is the starting position of the bullet, while destinationX & Y is where the bullet should go. [CODE] public Bullet(int x, int y, int destinationX, int destinationY, GameEngine Engine) { super(x,y,Engine); setImage("graphics/bullet.png"); destX = destinationX; destY = destinationY; curX = x; curY = y; calculate(); }[/CODE] [CODE] private void calculate …

Member Avatar
Member Avatar
+0 forum 2

The End.