Lets say that I try and make a BASIC game with c++, how do I make the animations/graphics for the game (i.e the characters ) Do I need a specific complier/ide (I am using visual studio)
How would you create a video game in c++? I'm not sure really how to display the graphics and set properties and do all that stuff. I don't have money to buy a book about so how do you?
I am making a text based rpg for school and im having troubles with it. Ineed to add an inventory into my game and im not to sure as to where or how.. this is what i got for player
#ifndef PLAYER_H #define PLAYER_H //console Util.h includes <iostream> , <string> and <window.h> and defines //the NOMINMAX macro. As a result of including ConsoleUtil.h, PLayer will // also knaow about thoes objects. #include "ConsoleUtil.h"
I am trying to make a very simple text based game and I want the players to be able to name their characters. Thus, I am trying to have the game ask "how many players will be playing:" and then taking that number (X) and create a place to store that information. I'm trying to get the game to ask, "What is the name of Player1?" Then once the user enters the name it would ask "What is the name of Player2" and that cycle would continue until PlayerX has entered their name. Is what I am doing close?
Here are the errors:
error C2143: syntax error : missing ';' before 'string'(ln 29 col 1) Error2error C2678: binary '<<' : no operator found which takes a left-hand operand of type 'std::basic_istream<char,std::char_traits<char>>' (or there is no acceptable conversion) (ln 30 col 1)
int NumberOfPlayers; if (Response1 == "Yes") { cout << " How many players will be joining us on our adventure: ";
Trying to define some global colors so I can use the one instance though-out my application. Here is my color code:
<Color x:Key="GlobalTextColor">#E0E0E0</Color>
But this color doesn't display in the list when I start to type {StaticResource ...}
This is the code where I'm trying to reference the color, see Stroke="{StaticResource GlobalTextColor}". GlobalTextColor doesn't actually come up in the list so won't work.
I'm working on my first video game. So far I have a few classes in the game starting with the Game class which includes a list of GameObjects (another class). There are several classes that inherit from GameObjects used to implement things like bullets, explosions, various enemy types, etc.
The game essentially iterates through the list of GameObjects to update/render them. I would like to provide access to the Game's list of GameObjects inside another class (like the Bullet class) so I can put new objects on the list. For example, when a bullet hits, I want to add an explosion to the Game's GameObject list it can be updated/rendered.
How this should be setup? I was considering adding a pointer to the Game or GameObject list to the GameObject class (and methods to access it), but I was wondering if there is a better way to set this up?
I would like to make a program for calculating the total price of a game station, and a game. I made a program like this for just the price of a game in class, but I want to make one that does the game system as well.
So I've got a sensor (contains a gyroscope, accelerometer, and magnetometer) that outputs quaternion data. I'm looking to take that data and use it to display the rotation of my sensor in the form of some object on the screen. I've seen instances where programs use a cube, but I'm hoping to figure out a way to have a little more control over what the object I'm rendering is.
how to get started? Are there any software packages that might be able to accomplish this?
I use visual studio 2012. When I asked what I should use in order to put graphics into my program, I was told by the community that SFML works well. My only problem is that now I have SFML, where and how do I unpack it?
I'm new to c++ So I have a project to make. I need to make a cursor like an arrow that will move when inputs are given. e.g if input is given 500 spaces UP it will move up and so on. it should rotate as well like 45 degrees and so on. how to make this arrow WITHOUT USING GRAPHICS.
I have been learning Direct3D for a while now (DX11), and I ran into a bit of a dead end. I have Frank Luna's book on D3D programming, but I feel like I could find a better tutorial out there. I am at the point of writing the vertex shader (the first one he goes over)
Currently, I am using .fx files to write the shaders. Is that right?
I am new to grpahics progamming in/under Borland C. I have included the "graphics.h" header file but i am unable to take input on the screen. If I try to move my cursor to a specified position using gotoxy() function the pointer doesnt moves to the specified location and starts taking input at (1,1) coordinate.
I am trying to produce a image using GD graphics library. I can succesfully display my image, however I cant display this image along with a printf function too?
I'm trying to create a GUI with Open graphics Libraries.I have made a basic GUI that exits the program or shows the instructions if a option/Polygon is marked (A bigger one is behind them)But what I'm trying to do now is the following:
0. Start the direct access on the desktop 1. Screen: Press any key to continue 2. Select one option 2.1 Option one: Go to the circuit selection menu 2.1 Option two: View the instructions (Cleared) 2.1 Option three: Exit the game (Cleared) 3. Select a circuit 4. Go to the car selection menu 5. Select a car and start the race 6. Pause menu if Spacebar has been pressed
From the pause menu:
6.1. Go to the main menu 6.2. Restart the race 6.3. Exit
I know that it is OpenGL, but what i'm looking for is C++.How I could do that? What I have cleared is with IF but I'm looking for better alternatives.
I'm trying to find the errors in my emulation of VGA VRAM concerning graphics modes.
(I'm testing it by doing plotting of all colors from x=0 to x=xsize-1 (where the color is relative, so 0=0 and xsize-1=maxcolor (in the case of 16 colors it's 15, etc.)))
VRAM Graphics management:
#include "headers/types.h" //Basic type support! #include "headers/hardware/ports.h" //Basic PORT compatibility! #include "headers/hardware/vga.h" //VGA data! #include "headers/mmu/mmu.h" //For CPU passtrough! #include "headers/hardware/vga_screen/vga_displaygeneration_crtcontroller.h" //For virtual width in bytes within VRAM!
I have a college project which is a car racing game using C++ and the old-school graphics library BGI. After I draw the map and placed the objects(Car,obstacles,road's borders etc..)I added Sleep(); function to the function named Obstacles(); but the problem is, I can't move the car with the right&left arrows.a
Another problem,If I added a cleardevice(); command all objects disappears only the obstacles function keeps working. the Code is here:
char c; do{ c = (char)getch(); if (c == KEY_LEFT) { x = x - 10, x1 = x1 - 10; } if (c == KEY_RIGHT) { x = x + 10, x1 = x1 + 10;
[code].....
note: this is not the whole code, it's only a small portion of it, not a debugging question only need a hint how to fix it.
What i'm trying to do is load an image from my database create some graphics to it. probably just some lines and marks and save it back to my database. here's so far what I got.
for creating graphics: } private void pictureBox3_MouseDown(object sender, MouseEventArgs e) { draw = true; } private void pictureBox3_MouseMove(object sender, MouseEventArgs e) { if (draw) { Graphics g = Graphics.FromImage(pictureBox3.Image);
[Code] ....
but the saving part doesnt work :( I think it only saves the image loaded to the picturebox but not the graphics created to it. how to merge it? i've tried to google it and found some sort of same cases but fails to make it work, something like converting it to bitmap.
The doubt is. I have a test_xpm function and I need to call this char array but this is so many pointers that I can't even figure out where I'm pointed to (?)
Code: int test_xpm(unsigned short xi, unsigned short yi, char *xpm[])
I tried something like read_xpm(xi, yi, *xpm[0]); but I'm guessing I need to index that array and run all those chars in order to show them.