C++ :: How To Create Text Based Game Running On Console

Mar 12, 2013

I want to create a text-based game with C++, running on the console. I have made some other text-based console games.

Which is the most interesting text-based game to learn how to program for beginners?

View 2 Replies


ADVERTISEMENT

C :: Create Console Based Application That Can Join And Split Bitmap Image

Jun 27, 2013

i have to create a console based application in c language that can join and split bitmap images. the requirements of the application are as follows :

1. Split Image
Enter number of parts:
Enter source image path:
Enter destination folder:
2. Join Images (all images should be of same width and height)
Enter image path:
Join more Image (y/n):
3. Exit

Take care of following things:

- Application should show number of images processed while running.
- Acceptable Image format is BMP only.
- Application should give all the validations for correct image name, type, size, path, etc.

View 2 Replies View Related

C++ :: How To Make A Game Map In Console Using Text

Oct 25, 2014

How would I make a game map in the console using text? The map is to be changed on a turn-based system. I've been thinking about using arrays.

View 1 Replies View Related

C++ :: Text Based RPG Game - Saving Integers And Strings

Jul 14, 2013

I am working on a text-based RPG game and I want to allow the player to save his progress. So I need to save several integers and a string. And my problem starts here "How can I save integers and load them?". I read the tutorial but I dont understand. I need to write a function to save game?

View 8 Replies View Related

C/C++ :: Text Based Game - Adding Players Names?

Mar 28, 2015

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: ";

[Code].....

View 9 Replies View Related

Visual C++ :: Running / Debugging Console App That Needs Admin Privileges

Nov 4, 2012

I see there's something called a manifest file but VS C++ EXPRESS seems different than non-express. The solutions I've seen show applets/tabs that I don't have in Express.

In one of my physical DEBUG folders are some .manifest. files and some a .res and .rc file.

I know you need to edit the XML and change asInvoker to requiredAdministrator (or something like that).

The confusing part is if I go into Project Properties, MANIFEST TOOL caret/tree, under INPUT AND OUTPUT, it shows this .manifest file is OUTPUT. It's as if it rewrites it every time with some defaults? I have edited it, but I see it's back to asInvoker. There is a spot to put in a ADDITIONAL manifest file (or .res file).

Does a manifest somehow affect the physical .exe file (something is imbedded in it??)?

How do I change my project to make sure that the .exe always runs as Admin? Will doing this ALSO allow me to DEBUG it in VS C++ EXPRESS without having to do anything different (play with manifest or run VS outright with Admin level)?

View 2 Replies View Related

C++ :: Converting Console App To Larger GUI Based App

Oct 12, 2012

We never got into any gui stuff. It was strictly console apps. That being said I have been able to create a few small apps. I would like to start to create GUI based apps but I am kind of overwhelmed at the choices. I dont know where to go from here. Since I have c++ experience I would think Visual C++ would be the choice but i have been reading a lot of forums and getting other info.

Is there another language I should look at the would allow me to convert my program quicker or easier?

The console program I already created is very very simple and want to make a gui for.

Quick break down.

Reads file
Changes file contents based on search string,
saves and closes file
and kills a windows service
exits

Only thing I want to add would be the ability to run the file from a remote site within the company LAN(not a priority though). Currently it needs to be run locally on the server.

View 5 Replies View Related

C++ :: Ball Collecting Game - EXE Not Running Outside Code Blocks

Apr 13, 2014

I have created a game.It is working fine in codeblocks, but when I am trying to run it outside codeblocks, it opens and closes immediately. I have pasted all the necessary files and dlls in root folder and debug folder. Here is the code:-

#include <iostream>
#include <SDL/SDL_mixer.h>
#include <SDL/SDL.h>
#include <SDL/SDL_ttf.h>
#include <sstream>

const int WINDOWS_Height = 480;
const int WINDOWS_Width = 640;

[Code] .....

View 2 Replies View Related

C++ :: Creating 2 Dimensional Console Base Game

Jun 13, 2013

what i got so for my code.

#include <iostream>
#include <windows.h>
using namespace System;
using namespace std;
int refreshDisplay(int , int);
const char wHole = '@';

[code]....

count <<" The oblective of the game is for the player to move around a 2 dimensional playing field and capture the star withought falling into a black hole or walking off the edge of the playing field. The controls are W = up S= down A=Left D=Right" <<endl; how implement 3 black hole X characters and 2 wormhole characters on field @ and a star *. all these char has to be randomly generated.

View 1 Replies View Related

C/C++ :: Rock Paper Scissors Console Game

May 14, 2014

I made a rock paper scissors game in c++. How to make it better, and what i can do differently

#include <iostream>
#include <string>
using namespace std;

int checkConvertInput(string signs[], int wins, int draws, int losses);
void calculateWinner(int playerSign, string signs[], int &wins, int &draws, int &losses);
void endResult(int wins, int draws, int losses);

[Code] .....

View 1 Replies View Related

C++ :: Tile Based Game Display

Apr 10, 2013

I have been writing a fairly simple turn based rpg game in c++ and at the moment it has a 2d integer array for the map, which I can display using periods for the blank areas and letters for the various people in the game, and I am trying to figure out how to upgrade to a tile based display.

View 3 Replies View Related

C++ :: Tic Tac Toe Console Game - If Statement Does Not Make Correct Decision

Feb 18, 2015

I recently wrote a "Tic Tac Toe" console game, and i seem to have a problem in my winning conditions, as when it checks if the player won (should have won) it doesn't take the appropriate action.

The winning conditions are in CoreLogic.cpp

here's the code, might not be the most pretty and clean code ever but it works for me.

there are more files i just didn't feel the need to include them all since the problem is only within CoreLogic.cpp and possibly in main.cpp

pos1-pos9 have been declared in the UserInterface.cpp and are being used to determine the correct decision to do within CoreLogic.cpp

Nothing happens when you win at this point it just exits the program.

View 19 Replies View Related

C/C++ :: Creating Two Dimensional Terminal Based Game?

Apr 4, 2014

i am working on class project in which i have to save the tank from canon....imy tank is moving only when i press the moving key.. and after that i see blank screen what should i do to run my process when i am not pressing moving keys....

View 8 Replies View Related

C++ :: Turn Based Game - How To Make It Cross Platform

Sep 12, 2014

I am starting a turn based battle (similar to pokemon) app. How could i make this and make it cross platform. Also is it possible to make it access gps and allow other devices with the same app communicate with each other?

I have done things on the command line but i never made anything with images so i dont even know where to start for this app.

View 4 Replies View Related

C++ :: Two Player Strategic Battle Turn Based Game - Assigning Controls

Nov 1, 2014

I am making a game which is a two player strategic battle turn based game..... The game will require each player to choose a attack. What would be the best key configuration for set of four attack. Like

player 1: 1,2,3,4;
player 2: 7,8,9,0;
where 1&7 are for kick 2&8 are for punch etc.....
or
player 1: q,w,e,r;
player 2: u,i,o,p;

View 2 Replies View Related

C++ :: Create A Binary File Based On HEX Data

Apr 24, 2013

I want to create a binary file based on some hex data :

Ex Input Hex :54313032202020303030

Out put like :6      

View 2 Replies View Related

C Sharp :: Unable To Type Into Text Box While Running The Application?

Mar 24, 2013

actually it is the windows application .When i'm running my program it is not allowing me to enter the data into textboxes means the cursor is not appearing

View 1 Replies View Related

C++ :: Create Dynamic Pointer Based Array Of Class

Nov 29, 2014

I have a class called Book and I am trying to create a dynamic pointer based array of the class. When I try to run the program I keep getting the error: pointer being freed was not allocated at the line of code that says "delete [] A;". I am using Xcode to run the program.

Book *changeArraySize(Book *A, int &size, double factor) {
int i;
int newsize = size*factor;
Book *A2 = new Book[newsize];

[Code] ....

View 7 Replies View Related

C++ :: Create A Map Based Hash Table For A Sparse Matrix?

Jul 24, 2014

I have this assignment where I have to create a map based hash table for a sparse matrix. The professor has provided some code and I'm supposed to fill in parts of it to make it work.

He has given us a class sparseMatrix which we need to provide a hash function for. This hash function is to be defined in a Class TupleHash which is inside sparseMatrix. I think I got that part down. What is really confusing me is what he has done with some typedefs.

For one of them I had to declare an unorderd_map that maps a struct Tuple on to the class template argument Object. I did that like so:

typedef unordered_map<Object,Tuple,TupleHash> HashTable;

The next typedef was given to me like so:

typedef typename HashTable::value_type valueType;

This is giving me a world of unintelligible error messages. This is how it starts.

In instantiation of 'struct std::__detail::__is_noexcept_hash<int, sparseMatrix<int>::TupleHash>':|
recursively required from 'struct std::__and_<std::is_default_constructible<sparseMatrix<int>::TupleHash>, std::is_copy_assignable<sparseMatrix<int>::TupleHash>, std::__detail::__is_noexcept_hash<int, sparseMatrix<int>::TupleHash> >'|

View 1 Replies View Related

C++ :: Create Matrix Of Data That Add Values Based On Reading Get From DVM

Apr 22, 2012

Ok I'm trying to create matrix of data that I can add values to based on a reading that I will get from a DVM. I'm using a 3d vector to do this. I need to keep track of the serial number, the day and within day I need to take two readings at different temps, this will continue for 7 days.

The rows of my 3d vector will be the days, the colums will be the serial numbers the depth will be the reading at the different temps.

What I need to do is compare the first element (days) and when it is greater then or equal to 4 I will perform calculations of the readings. So all I want to do is compare the first element of the vector, How do I do this?

Here is what I got

Code:
#include <vector>
typedef std::vector<double> Double1D;
typedef std::vector<Double1D> Double2D;
typedef std::vector<Double2D> Double3D;
#define HEIGHT 5
#define WIDTH 3

[Code]....

View 7 Replies View Related

C++ :: Adding Image Into Text Console

May 6, 2013

I would like to add an image to this code where the arrows are:

#include <iostream>
#include <cstdio>
#include <cstdlib>
using namespace std;

/*VARIABLES*/
float menuoption;
float minecraftoption;
int mobdetail;

[Code] ....

What is the code for adding an image (btw- I can't use Visual Studio C++ cause it lags so much!)

If code has some errors in it - I had to shorten it because it was 10,000 letters!

View 1 Replies View Related

C++ :: Loop In A Text-Based RPG

Feb 13, 2013

I am working on my first RPG. Nothing fancy so far... I haven't developed a story or anything, just trying to get the gameplay hammered out. Anyway, I have a couple of NPCs and Items and I was wondering how I should program these interactive spots. I'm unsure whether I should loop the Room info or continue forward with if statements. With Items, I want to prevent the player trying to use the option to get the item again (after you pick up the item, the option is gone. Here are a couple examples of where I have the problem

else if(playerloc == 3)
{
cout << "There is a hooded figure in the corner. "
<< "The person waves you over.
";

[Code]....

What I want to do after the character interaction is complete is continue forward with the option to go south or east. I could return to the room menu, or continue by coding forward and allow the option to go east or south with more if-else-if chains..

In the next bit, I want to program the item to be picked up and then the treasure chest will be empty.

else if(playerloc == 5)
{
cout << "There is a treasure chest in the Northwest corner of this room.
"

[Code].....

View 1 Replies View Related

C/C++ :: Create A Program That Prints A Certain Number Of Asterisks Based On User Input

Apr 12, 2015

I need to create a program that prints a certain number of asterisks based on user input. The user inputs 5 and I want my program to output "*****". How would I do this in C? I've tried printf("%#**", myvariable) but this does not work it only prints "*".

View 1 Replies View Related

C/C++ :: Changing Text Color Of Only One Line Of Console?

May 13, 2014

I try to change the text color of console in C++. I know some commands like .

system("color fg");

But I want to change the color of only one line of console. Is this possible?

View 4 Replies View Related

C :: Create A Hangman Game With Timer

Mar 21, 2013

I want to create a Hangman game with timer.. If the user cannot guess the word with in 1:30 min the game will stop and the word will be printed.

View 5 Replies View Related

C++ :: Create 3D Game Engine With OpenGL?

Jul 19, 2013

What i'm trying to do is create a 3d game engine with opengl and i want to be multi platform. I'm trying to use code-blocks for this reason but i'm having trouble setting up opengl for code-blocks

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved