Skip to main content

Timeline for Work-In-Progress RPG

Current License: CC BY-SA 4.0

12 events
when toggle format what by license comment
Feb 25, 2021 at 3:38 comment added Casey I would argue that there doesn't even need to be a Player class at all. Conceptually it's a Character that is controlled by the user but is otherwise the same. Both PlayerTurn and Battle can be handled by Game or Map that just take Character* types: Game::HandlePlayerInput(Character* player);, Map::Battle(Character* a, Character* b);
Feb 24, 2021 at 23:56 comment added Edward @Mark, yes, there are many legitimate criticisms of <random>, but as with many things in C++, a little work in deriving something "better" (whatever that means to you) often pays dividends well beyond the initial work involved.
Feb 24, 2021 at 23:35 comment added Mark In regards to your comments about <random>, I've looked at it, I've stared at it, I've rolled my eyes at it, and I've gone back to the easy-to-use rand(). It's a horribly over-engineered monstrosity if all you want is a sequence of arbitrary numbers.
Feb 24, 2021 at 22:54 comment added Herodegon I see what you mean. When it comes to the Coord class, that's an unfinished class which I was planning to use to store the coordinates of characters on a 2d vector, but I haven't figured out how I want to do it yet.
Feb 24, 2021 at 20:49 comment added Edward I've added more information to the answer to attempt to address your questions. As for your project requiring that members be initialized through constructors, these still are; it just takes a form you might not yet be used to seeing. Generally, it is good practice to have private member variables, but trivial getters and setters as you had, defeats the purpose and so you're better off without them in this case, and likely with your Coord class as well.
Feb 24, 2021 at 20:40 history edited Edward CC BY-SA 4.0
added more info on derived classes and Battle() simplification
Feb 24, 2021 at 19:07 comment added Herodegon 2) Part of the reason I made this was for a project where we a) could not use public member variables and b) had to initialize members through constructors. However, I think your point about my readability is valid despite these factors, and I'll take that into consideration when revising my code. 3) I don't wholly understand the point you made about having a direct pointer to a private member, or what a "base class" is. Pointers are something I struggle with, but even so if you could explain your point a bit more, I would greatly appreciate it!
Feb 24, 2021 at 19:00 comment added Herodegon Thank you for your advice! I'll definitely take this advice to heart and revise some of the things you mentioned in my program (the one about AddCharArch() is especially intriguing to me, and could help with how I've been managing class vectors). However, two notes: 1) The bleed-through in my case list was intentional, but considering you're the second person to mention it, I should have a comment mentioning it at the very least.
Feb 24, 2021 at 18:44 vote accept Herodegon
Feb 24, 2021 at 15:31 history edited Edward CC BY-SA 4.0
added better Intro version
Feb 24, 2021 at 15:21 history edited Edward CC BY-SA 4.0
add section on overloading
Feb 24, 2021 at 14:50 history answered Edward CC BY-SA 4.0