Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 09 Dec 2005
Offline Last Active Yesterday, 02:52 PM

Posts I've Made

In Topic: Why are there no AAA games targeted towards the young adult audience?

Yesterday, 08:08 AM

YA which tends to be a bit more even gender wise

YA books tend to be targeted to adolescent and preadolescent women, because that's who reads them.  Like any genre fiction, most of them are cookie-cutter plots (young female teen protagonist suddenly thrust out into the cold cruel world without parental support, often having responsibility for some dependent, and some powerful but hidden secret) but there are some notable breakouts.  YA books are not targeted at young adults, don't get confused by the marketspeak.


So, by and large, a lot of video games are targeted at adolescent boys and feature fantasy men as protagonists, and a lot of YA literature is targeted at adolescent girls and feature fantasy women as protagonists.  When I talk with kids in the youth groups I work with, they tend to fall into these categories (boys play games, girls read books) but lines get crossed, and the type-A people tend to do both.  The question that comes to my mind is: do boys play games and girls read books because of how they're written and marketed, or is the writing and marketing reflecting actual preferences?

In Topic: messing up the functions from inherited classes from two different base classes

05 February 2016 - 10:41 AM

Apparently WoopsASword is right - you can't do OOP without some globals

I do not see where he said that.
Try passing your currentChar to your Stage1::logic() as a parameter instead.  Something like the following.

int main()
    Ryu currentChar;
    Intro introState;
    GameState* currentState = &introState;

In Topic: Read one text line without limit correctly

05 February 2016 - 07:07 AM

Using fgets you can read one line correctly but you need to know the max line size possible.
How read one line without limit correctly ? Read each character until '\n' is the only way ?

If you're reading from a C standard library FILE object, yes, that's the only portable, reliable way.  Use the fgetc() function to read one character at a time until it returns EOF or static_cast<int>('\n').  Don't worry, a C FILE object performs buffered input, so it's not actually inefficient.  The fgets() function is probably implemented that way underneath.

In Topic: messing up the functions from inherited classes from two different base classes

05 February 2016 - 06:59 AM

1st question goes to Wooh: Are you suggesting that I should make a third base class and inherit all the levels (without the menu and intro ) from it? Because I already have a base class for the different screens( like intro, menu, character select, and the stages where you fight ). I really don't think it's a good idea to make another base class. I think i should somehow find a way to call the ryu logic() function into the Stage logic() function. I already have GameStates that should deal with everything, 3rd base class is ugly, in my opinion.
2nd question goes to WoopsASword: Ryu's logic is in the ryu class in the function logic(). And I've already made a base class Character. And what do you mean by 'register and instance to the level class'?

Sounds like you need to understand the difference between a class (a description of data and the rules for operating on those data) and an object (a realized instance of a class).  An object of your Stage class needs to be able to ask an object of your Character class to do its logic().  Inheritance is not the right tool for this job.

In Topic: Who vs. whom

03 February 2016 - 10:46 AM

I'm asking because I'm not a native speaker and I try to follow the grammar rules as much as possible, but the use of "whom" doesn't always sound right to me and it seems like many native speakers don't even use it.

Unless you like to wear tweed jackets with leather patches on the elbows and hold a teaching position at the University of Oxford, you can generally get away with never using 'whom' and always using 'who.'

Unlike many languages, there is no central government authority in English that decides what correct grammar is. We leave that primarily to people called 'prescriptive grammarians' who like to discuss these things at length in the free time they have because they do not get invited to parties or social events in general.

There are a number of style guides you can choose to use for your writing. "The Elements of Style" by E. B. White and William Strunk Jr. (casually known as 'Strunk and White') says to just relax and use 'who' everywhere, so if that's what you choose to do, you can do that with impunity and cite that as a reference.