Help with returning

Pages: 12
Apr 25, 2011 at 7:22pm
Yeah, I'll never listen to people on Yahoo answers EVER AGAIN!!!!

Anyways, would you like to try the program? xD

It's still pretty crappy, on terms that it has only 3 possible fights and 6 possible outcomes, but if you want to try it and give me some feedback it would be appreciated xD... Also, repeat, how do I share these files with other people? Is there a file share site, or something, I can upload them to?
Apr 25, 2011 at 7:47pm
http://sourceforge.net/

EDIT: Also I'll give it a try.
Last edited on Apr 25, 2011 at 7:47pm
Apr 25, 2011 at 8:15pm
A few minutes while I figure out how to use Sourceforge, then I'll put the link here :D
Apr 25, 2011 at 8:33pm
Last edited on Apr 25, 2011 at 8:59pm
Apr 25, 2011 at 9:12pm
It's not a terrible start, you have some things you can work on like not quitting because of invalid data being entered. This is about the extent of what you can do with writting games for a CLI though, most people on this site can help with SDL, Allegro or SFML and any one of those would be a good step after the tutorial on this site.
Apr 25, 2011 at 10:24pm
@computergeek01's post

What the **** do those words mean?

What does SDL, Allegro, and SFML mean (more descriptive)?


As for the tutorial, I'm trying to continue on it, but every time I read 5 words, I fall asleep and can never wake up :'(, so for now I'll set my goal to finish that tutorial, then to learn about this SDL, Allegro, and SFML stuff, and then get cracking on a larger scale version of this battle sim xD (hopefully)
Apr 25, 2011 at 10:33pm
Sorry,

SDL is Simple DirectMedia Layer

Allegro is not an acronym

SFML is Simple Fast Media Layer
Apr 25, 2011 at 11:34pm
Oh, so SDL, SFML (Made me think of fuck my life), and Allegro are all programs to allow keyboard capabilities and media such as music and videos?
Last edited on Apr 25, 2011 at 11:34pm
Apr 25, 2011 at 11:37pm
Wrong terminology but you have the right idea. They're called Libraries and yes, that is what they do. Don't get too far a head of your self though, it's easy to get discouraged if do.
Apr 26, 2011 at 12:21am
Well, I have a goal list set out xD

Goal List:

1: Make a game, no matter how basic (Check)

2: Give the game all the features I like, other than graphics, action, and sound/visual FX

3: Give the game graphics (so the players don't just see words stating the obvious all the time)

4: Give the game sound/visual FX (Background music, if not already done, and noises and actions for certain attacks/sequences)

5: Finally, give the game action, so you're not just pressing the same 1, 2, 3, or yes/no, all the time, and can use the mouse/arrow keys or other buttons.

Although, 5 isn't really a goal since that ruins some pen & paper RP games, but others make it tons better.
Apr 26, 2011 at 1:16am
Also, quick question, how do I make a windowed application? Is there a tutorial you could recommend?
Apr 26, 2011 at 2:51am
try SDL SMFL or Allegro... lol
alternatively if you wanna be a drag and drop noob make a windows form in VC++

however i reccomend sticking with what youre doing now before you get into anything too complicated

no offense because youve just started programming and are doign well, but if you cant implement simple things like loops into your program i wouldnt delve into anything too deep.

also doing things like sounds/graphics and visual fx is out of the scope of programming the actual game and more in graphic art and music so wrong forum for that. theres tons of free spritesheets and music to rip off of the internet though :)

EDIT: also just realized your using getline wrong, or at least not too its fullest. the parameters are

cin.getline(where to store data, number of characters to store from the stream, character to end input, generally '\n' which represents the newline)


EDIT EDIT (lol):
try to avoid using strings when you can and use char arrays instead because conceptually there the same thing but you can manipulate char arrays much more. just my opinion but i never use strings :)
Last edited on Apr 26, 2011 at 2:57am
Apr 26, 2011 at 3:07am
try to avoid using strings when you can and use char arrays instead because conceptually there the same thing but you can manipulate char arrays much more. just my opinion but i never use strings :)


what can you do with a c-string that you can't do with an object string? i'd argue that you can do a lot more with object strings, they're easier to implement and they're less error prone
Apr 26, 2011 at 3:33am
ascii, I really hate to say this, but I think I speak for quite a few of us when we say that we don't appreciate you teaching others sub-optimal coding habits in C++.

C++ is the type of language that tries to avoid potential problems without excessively babying the user, and to that end C++ gave you strings which deal with all the memory management internally while continuing to offer you a considerable level of control via its iterators (which are a lot like pointers).

In the future, could you please be more sensitive of what is and what isn't a good coding habit in C++? Thanks. :/

-Albatross
Last edited on Apr 26, 2011 at 3:36am
Apr 26, 2011 at 4:19am
Ugh, the three of you got me confused. So should I use strings or should I use char arrays?

Also, cin.getline (string name) is another way of doing cin>>(string name)? Please explain further, because the tutorial isn't telling me anything (doesn't have verbal programming).
Apr 26, 2011 at 4:28am
For dealing with variables, I usually recommend std::strings. For dealing with constants, I generally recommend C-style strings. :)

What cin.getline(var, size, delim = '\n'); and getline(cin,var,delim = '\n'); do is get entire lines. >> will stop on any whitespace, not just the newline. The getlines by default will stop on newlines only (you can, of course, change this by changing delim). The difference between the two is that the first is for char*s, the second for std::strings.

-Albatross
Apr 26, 2011 at 4:44am
Thank you Albatross!
Topic archived. No new replies allowed.
Pages: 12