get user?

Pages: 12
#include <iostream>

I really don't think you need that...

#include <string> should have worked just fine even with the #include <ncurses.h>

I don't understand... :P
it just plain old wouldnt compile when i used the code i use to compile programs with ncurses. i use this gcc -o GAMESTART GAMESTART.cpp -lncurses and i even tried taking away the -lncurses and it still didnt work. by then i had of course had to take out ncurses and i just for the sake of time entered in iostream in case it would of needed that and did make GAMESTART and it worked fine lol. would u like to try the game seiza? ive been working on it since like the beginning of march
what's the game? :P
heres a download link :) http://www.mediafire.com/download/i32ymm9f19eveeg/building+game+with+ncurses.zip if im correct it should be ready to run straight out of the folder. even if you dont have ncurses possible it will still run. im not sure tho because i really cant test that kind of stuff with only one computer xD

tell me what u think of it once u got it :D. just to mention i did create all of the game myself except for what you just showed me and i think thats it
Last edited on
About that... :P

1
2
3
4
5
6
7
8
9
10
11
12
13
#include <iostream>
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <term.h>
#include <string.h>
int main()
{ 
std::string home = getenv("HOME");
std::string gamefiles = home + "/ncursesgame/files";
chdir(gamefiles.c_str());
system( "gnome-terminal -e ./buildinggame" );
}


I would use a shellscript, rather than using a program for it.
System is absolutely not flawless.

This would have saved you the trouble:

script.sh:
1
2
3
#!/usr/bin/env bash
cd ~/ncursesgame/files
./buildinggame


Anyway... I managed to launch the game... not sure what was the purpose of it. :P
Last edited on
lol i know system was bad. i didnt want to use any other programs to run it. to play the game: you can place stuff by pressin space bar. you can scroll through the different things by pressing b and v. if you place the # you cant walk through it. if you place the & it acts like a player. if you walk up to the player it will ask you if you want some pie. click y or n. if you click y it gives you some pie and displays it. if you place a : it acts like a ladder. the main goal of the game is to make something cool. use t and g to scroll through the menu. press enter to choose an item in the menu. if you click on load, it will load the cool city map i made. you can click on mode in the menu and it will change ur mode to either survival or builder. if your in survival, you wont be able to press up. thats when the ladders come in handy :) also you click on new to erase the ma your on, and click on save to save whatever you have created. theres a backup of the city world in a folder btw
you can delete stuff with wasd too
Last edited on
i tried the script.sh file btw. the purpose of the gamestart file is so that you can launch it without opening the terminal first. i made the script.sh file nd marked it as executable and as far as i can see, the only way to run it is through the terminal which defeats the purpose
I believe you can do a lot of things out of this.

There is probably a lot of things you might want to check out in your code to make it clear and simple. ;)

Have fun!
u mean clean up the code? or easilier state the controls
Last edited on
also i kinda wanna post it somewhere here on the forums to get feedback from people like you. where can i do so?
Both...

as for the forum, no idea.
Topic archived. No new replies allowed.
Pages: 12