[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

RPG PROGRAMMING PROJECT

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 201
Thread images: 5

File: Ill1.gif (1012KB, 500x750px) Image search: [Google]
Ill1.gif
1012KB, 500x750px
Hey all again. Last thread died so I'm making a new one. I'm wondering if any beginner programmers would like to team up and work on a console RPG together using C++. I literally just started the project last night. If you're interesting in becoming part of the project, message me on AIM: allpower2slaves

I will post updates here as long as the thread is alive.
>>
Update: Right now I'm implementing a switch function that will display some information about your race, depending on which race you choose
>>
Update: I've just added multiple comments on the switch statement so that it is easier for beginners to read
>>
>>44028187
Why a switch? That's so hard to maintain.

And I sure as hell won't do anything over email. Gitorious or Github or bust.
>>
Where's the code repo? Is it on github?
>>
>>44028248

why? if i wanted to add another race I would just add another case. There's more than 2 races so i dont want to just use an if statement
>>
>>44028285
create a map or something, and use it to pull up race information based on the key, which can be a string like "Orc" or some arbitrary handle.

That way you can just do like races["Orc"].getInfo(); or something.
And if you have a new race you simply insert it into the map.
>>
>>44028322
>And if you have a new race you simply insert it into the map.
By loading from a file I hope.
>>
>>44028339
That would be optimal, yes. Data driven > hardcoded.
>>
>>44028361
We should start our own RPG with blackjack and hookers.
>>
>>44028274

idk how to use github. I can just copy and paste you the code through AIM. Or you can just start adding shit to the game. No graphics just on the console. Haven't got to graphics yet. Yes, this is a very n00by beginner project
>>
>>44028339

how would i store a race in a file? like a text file?

>>44028322

i have no idea how to create maps bro. I literally just got done with my intro to c++ class. Started programming few months ago. I'll look it up
>>
Interested.
Which console? Because console sounds limiting.
Or console as in text based?
CLI or TUI?
These questions need answers.
>>
C++ is a bad choice for this kind of project unless you have at least a year of experience with that language. Java would be a much more reasonable option.
>>
>>44028428

the text based console black screen thing on windows
>>
>>44028378
You'll have to start using github. Go youtube and find out how it works. This is an absolute must. I'd quite like to actually join in on this project, but get a repo up. Otherwise you'll have all sorts of problems with managing code versions.
>>
>>44028448

I wanted to start out with c++ for my first language because i heard it was the most deepest and most challenging language to start out with, plus if you get good with it, everything else is easier.
>>
>>44028448
C# would be better
>>
>>44028484
than java? hardly. they're around equal ground.
>>
>>44028454
Its called the console anon. (the black windows screen thing)
Not trying to be an asshole. I think its great that you're learning C++ by doing something fun, and trying to involve us in your project. I'm genuinely happy for you.
For this to actually work you need to setup github though. I'd love to be part of this project but I'm not working over email and AOL instant messenger.
>>
>>44028460

do i put the code in the README.md file?
>>
>>44028463
I think it might just make you hate programming. He is right, Java would have been a lot better with this sort of project. No memory management to be worried about.
>>
>>44028516

im trying to get it set up anon!
>>
>>44028463
> plus if you get good with it, everything else is easier.
Pretty much.

Don't listen to people's language recommendations. Everyone want's you to learn their favorite language because it's what they like best.

If you like C++ stick with it. It's not as hard as people say if you learn it as your first language.

>C++ is a bad choice for this kind of project unless you have at least a year of experience with that language.

This is a flat out lie. I made something similar to this after about 2 months of studying C++, and I only had an extremely simple understanding of the language at the time.

If you're passionate about something, you can find a way to do it.
>>
>>44028558

yeah all i have done is a c++ intro class and we did a few assignments with dynamic memory allocating and using pointers

it's definitely a challenge but for doing this only for a few months so far, i think im making good progress. Plus I've always heard C++ is the most badass language, so i said fuck it! I'm diving in.
>>
>>44028448
>C++ is a bad choice for this kind of project unless you have at least a year of experience with that language. Java would be a much more reasonable option.

Want to be BTFO'd by a girl?
https://www.youtube.com/watch?v=FyOs7ilfAmY
Skip to 7 minutes

Also, fuck connection errors.
>>
>>44028592
>the people who say this are pussies

Waifu-tier
>>
>>44028592
>C++ is to hard as a first language
>no. The people who say this are either pussies or too inept to be programmers.

That girl is so fucking amazing.
>>
>>44028592
>woman in late 30s
>"girl"
>>
>>44028409
>i have no idea how to create maps bro

Have a (probably contrived) example on how to use them. Especially to ditch switch statements.
http://pastebin.com/zwCAheAU
>>
>>44028930
Building the (not defined )autist race would be easy.

RaceInfoPair buildAutistRace()
{
std::string raceName = "Autist";

std::string alignment("Extra Virgin");
AptitudeMap aptitudes;
aptitudes["Fighting"] = 1; //one way to set values in a map
aptitudes.insert(AptitudePair("Magic", 99 )); //on our way to wizardry

return RaceInfoPair(raceName, RaceInfo(alignment, aptitudes));

}


then simply add it at the beginning of main.
    RaceInfoMap ourRaces;
ourRaces.insert(buildHumanRace());
ourRaces.insert(buildOrcRace());
ourRaces.insert(buildAutistRace());
>>
>>44029012
of course you could add mor aptitudes too, by simply defining them.

which is of course useless in this example apart from printing them out, and useless in real world projects if the values aren't meaningful/used.

RaceInfoPair buildAutistRace()
{
std::string raceName = "Autist";

std::string alignment("Extra Virgin");
AptitudeMap aptitudes;
aptitudes["Fighting"] = 1; //one way to set values in a map
aptitudes.insert(AptitudePair("Magic", 99 )); //on our way to wizardry
aptitudes["Fapping"] = 150;
aptitudes["Shitposting"] = 999;

return RaceInfoPair(raceName, RaceInfo(alignment, aptitudes));

}
>>
>>44026836
>C++
>2014
>>
>>44029040
Anyway, if you look at it all, you will see that defining aptitudes and races and stuff is done by giving attributes names and values.

and that can be easily read from a file, allowing you to test/add races without recompiling if you write a function that parses race info files.
>>
>>44028500
But C# has a better performance
>>
>>44028528
no

fuck no
>>
>>44026836
dude OP, why don't you start a repository on bitbucket? or github?
I'll help then
And I'm sure alot of other anons would too
>>
>>44029074
Only on Windows.
>>
>>44028528
good trolling m8
good trolling
>>
>>44028528
No offense, but your project is a failure piece of shit
If you are a newbie, you shouldn't start on a project of this size
Learn every concept which has been told ITT, learn to use github
Come back then
>>
>>44026836
>console RPG
HA
>>
>>44029138

how do you know? you haven't even seen it. I'm just trying to think of something to program and work what I've learned so far
>>
>>44029221
ignore the faggots opp.
But github when?
>>
>C++
>not plankalül
Stay pleb OP
>>
>>44029221
just use the github program pls
>>
>>44029221
it's shit and you know that
go kill yourself fucktard, you are worthless in the world of programing.
Here are your options nigger:
1.Kill yourself
2.Kill yourself

I'll let you chose between those options, hope you chose the right one.
>>
>>44029303
And people wonder why saying you're a programmer is practically birth control.
>>
>>44029268
>>44029251

alright i think i got it but if i post the link can't people just fuck it up or delete the code? I don't really care if they did but trolls will be trolls. Plus i have the code in my visual studio anyway
>>
>>44029313
it's true, too.
you can fuck chicks all day and they just won't get pregnant.
>>
>>44029325
no they can't do anything
don't worry about it
whats the link?
>>
>>44029331
this nigga knows what he's talking about.
I fucked my wife endlessly for 5 years before she became pregnant
>>
>>44029303

ok so anyone who just started programming should kill themselves. Gotcha. Dude, leave the thread if you're just going to be an idiot. You must have some serious autismo going on. Go out and learn how to socialize with people. You fuckin suck, dude
>>
post the github repo already man, i gotta goto bed
>>
>>44029325
github fast and dirty:
You make a repository. (your code)
You save your changes to the repository.
github backs up your changes.
People fork your repository. (copy it)
People add to the forked version of your repository.
People offer a pull request
If you accept, the changes they made to the fork become part of your repository.
If you decline, nothing changes.

You can revert back to any backup at any time.
>>
>>44029313

why does saying you're a programmer mean birth control?
>>
>>44029398
Because you can reprogram your sperm to be cool and only come out for the show, not for work.
>>
>>44028930
>>44029012
>>44029040
Since this is a learning thread, can you give a map quick tutorial. I understand what you're saying, but i've never worked with map before.
>>
>>44029398
see
>>44029303
>>
alright here it is

https://github.com/crizilla/RPG/blob/master/main

if anyone wants to fuck around with it and tell me how shitty my programming is, please do. Just don't be a faggot
>>
>>44029436

are you making a joke about me or the troll?
>>
>>44029424
maps consist of two parts
a key which is used to index the values
and a value, which is the value associated with the key

that is why it is called an associative array/container.
you can associate handles to values.

these handles or values can be pretty much anything, with the caveat that the key needs to offer a method to compare itself to other keys.
(the reason for that is since it's a balanced binary tree, using divide and conquer and all that good shit so the algorithm needs a way to know if one key is > another)

maps are filled either with the index operator [] followed by an assigment
or by explicitly inserting a std::pair, that must take the same key and value type as the map.

using the [] operator, a map acts like an array that can be assigned to like map[key] = value;
or retrieved
value = map[key].
>>
>>44029480
>or by explicitly inserting a std::pair, that must take the same key and value type as the map.
so if you have a
std::map <int, float>
then you need a
std::pair <int, float>
for insertion.
>>
>>44029492
>std::map <int, float>
would be a map that uses integers as the key
and floats as the value
std::map <std::string, double>
would be a map that uses strings as the index (like in the example I pastebinned) and would store doubles.

etc.
it's easy peasy.
>>
>>44029468
I'm making fun about you're mom, fucking retired faggot
>>
>>44029440

put this into your pause() function.
it doesn't pollute the input stream.
  std::cout << "Press ENTER to continue...";
std::cin.ignore( std::numeric_limits<std::streamsize>::max(), '\n' );
>>
>>44029440
>>44029550
you will need to
#include <limits>
for that, though.
>>
>>44029520
That is amazing. Thanks anon, you are a great teacher.

>>44029440
Watching, will fork later. Im going to bed.
>>
is there a reason why people dont use:

using namespace std;


This'll save you the trouble of typing std:: before cout, cin and other standard functions
>>
>>44029583
It's considered bad practice. I don't know why but I've always been told that so I don't do it.
>>
>>44029602
really?
I've been told the exact opposite
and even if I hadn't been, how is it bad practice?
makes writing code so much easier and cleaner
>>
>>44029615
>I've been told the exact opposite
Don't listen to that person anymore.
http://stackoverflow.com/questions/1452721/why-is-using-namespace-std-considered-bad-practice
>>
>>44029525

no u
>>
>>44029618
Wow I fucked that up.

That's what I get for trying to be lazy and copypasting some SO answer instead of writing my own post, which I did in the end anyway.


>>44029583
>is there a reason why people dont use:
I'm used to typing it out and reading it.

I also usually merely shorten namespaces, by defining them with a shorter name, instead of not using them at all.

For example:
namespace easy = long::ass::fucking::namespace::name::with::thousand::levels;

and then go
easy::vector<foo> bar;
instead of
long::ass::fucking::namespace::name::with::thousand::levels::vector<foo> bar;
>>
>>44029583
This explains it perfectly:
http://www.youtube.com/watch?v=kXs9dgMAAbg

Besides that, its just industry standard.
>>
>>44029646
Although I do use function/method local namespace sets.
Or at least specific things from a namespace, like
void niggs()
{
using std::cout;
using std::endl;

cout << "Muhfuggen Bix Nood" << endl;
}


That's as far as I go, usually.
>>
>>44029615
not is your using lots of different namespaces. It's annoying as fuck to see some namespaces written out, and others completely missing.
>>
>>44029655
>>44029646
>>44029626

Thanks, i had moved away from c++ so wasn't sure why it wasnt in vogue anymore
but you can still use it locally
that'll still save you some amount of typing or as the other anon said, he just names them differently, that should work too on a reasonable scale
>>
>>44029116
Which is still the majority of your (probable) market
>>
>>44029116
>>44029888
>consoles
im an idiot that cant read
>>
>>44030000
Don't know shit about Java.
>>
>>44030040
Shit that's a lot of words.
>>
>>44029902

He means console as in the command-line terminal.
>>
OP create an IRC channel so we can talk real time.
>>
>>44030624

thats what aim lets you do. it's fast
>>
>>44030704
Aim isn't anonymous. Create an IRC channel or say that you don't know how.
>>
Another reminder that there are FLOSS RPG engines that you can contribute to instead that won't die after a month.

http://easy-rpg.org/
https://github.com/Ancurio/mkxp
>>
>>44030755

lol
>>
>>44031005
http://flarerpg.org/
http://fifengine.net/
https://www.gnu.org/software/freedink/
http://gnurpgm.sourceforge.net/
http://www.gnu.org/software/rpge/
>>
>>44031005
Big projects are scary.
>>
>>44031049
>GNU FreeDink
Oh hey. Has anyone ever done anything interesting with it beyond modding the original game?
>>
File: 2_5_titlescreenstudio.png (875KB, 1257x731px) Image search: [Google]
2_5_titlescreenstudio.png
875KB, 1257x731px
>>44031049
>http://gnurpgm.sourceforge.net/
pic related
>http://fifengine.net/
doesn't have a public repo or a simple code download apparently.

the others seem alright.
>>
>>44031072
Not really. Most of the community effort goes towards making small mods to the game.
>>
>>44031091
>doesn't have a public repo or a simple code download apparently.
U wot m8?
https://github.com/fifengine/fifengine/wiki/Downloads
>>
>>44031100
Any final boss replacements?
>>
>>44031120
None
>>
>>44031047
I though you were serious about this project OP.
>>
>this entire thread

lel

Don't let them bring you down OP

Just do it and have fun while learning
>>
Do you even know how to make a game?
>>
>>44031156

I am. Still up working on it!

>>44031356

I-I think so
>>
>>44031409
Then create an IRC channel or a github repo or something.
>>
>>44031409
Watch ExtraCreditz about game design.
>>
>>44031449

github repo:
https://github.com/crizilla/RPG/blob/master/main

mIRC:
#AutismoRPG in the SwiftIRC server
>>
>>44029074
a) no, it hasn't
b) even better implementations aren't that different performant whise
c) >implying C# isn't a polished Java
>>
>>44031727
>404
>>
>>44031727
I'll do something on it tomorrow. Going to sleep for now.
>>
#NotOp
https://github.com/crizilla/RPG << dir working

Hey, i'm doing a project as well, but with java (noob). A board game (with some gui). Wish me lucky ;D
>>
>>44031727
What is
player.race;
player.name;
player.weapon;
player.planet;

good for? it has no effect.

#include <string>
#include <iostream>
Anyhow, since you included only those standard headers, it should compile on any standard hosted environment.
>>
Do it in C and I'll help. It'll also help you, as you should know C before learning C++.
>>
>>44032095
>as you should know C before learning C++.
No, it will ruin your c++.
>>
>>44032095
6/10
>>
>>44032135
I suggest you back the fuck off.
>>
>>44032141
6? That's basically a concession that I'm right.
>>
>>44032095
http://www.youtube.com/watch?v=FyOs7ilfAmY>>44032095
This chick says you're wrong, and that you are a faggot.
[spoiler]shes right[/spoiler]
>>
>>44032167
I was rating your ability to troll, not the accuracy of your information.
>>
>>44032195
Erm, no, you were rating the troll not my ability to troll. A 9 would mean an egregiously wild claim, a 1 would mean a patently false, oft repeated claim, a 6 means you're confused.

>>44032173
You don't learn to program in any language, least of all C and C++ by following video tutorials. Good luck with your project and life.
>>
>>44032148
Opinion discarded.
>>
>>44026836

OP, set up github for this and I'll join.
>>
>>44032640
He already did.
See >>44032000
>>
>>44032148
ahhh the smell of "muh c" in the morning
>>
>>44032263

OP here that wasn't me who said that. I'm not sure what you mean tho by saying "you dont learn to program in any language"

wut
>>
>>44032703
I genuinely chuckled.
>>
OP you should probably let us know your plans for it, so that people can contribute.
>>
File: screen.png (11KB, 526x194px) Image search: [Google]
screen.png
11KB, 526x194px
>>44033109
He left.
>>
>>44033157

Oh. Well, guess I'll just slowly keep this alive until he returns.
>>
>>44033386
Until tomorrow?
BTW: I heard, you can't.
>>
>>44033386
are you a programmer? what languages do you like? :3
>>
>>44033502

Maybe he's back...today?

>>44033512

Not officially. Never did a degree in CS but use programming in my work. I'm by no means professional, at best on a good day I would describe myself as intermediate. I'm sort of a jack-of-all-trades but I genuinely like C++ and Java, though the latter less. Given the documentation I can find my way around some other languages although don't have much experience with them save for Python.
>>
>>44026836
OP, I am an extremely novice C++ programmer, and I most likely won't be able to contribute anything worthwhile to your project, but I would like to monitor your progress, nonetheless. Please make another thread if you ever make a github for the project. The old one you posted 404s when I go to it.
>>
>>44033562
cute. do you know lisp?
>>
>>44033645
See
>>44032000
>>
>>44033669

Not really. Know very, VERY basic Lisp but I just don't see the appeal.
>>
>>44026836
I applaud you op, ignore the haters - everyone has to start somewhere.

Make a rpgstdlib (or similar) library and put your pause() and other miscellaneous functions in it.

Put the Weapon and Character classes in their own files as well...
>>
>>44034113
>ignore the haters

What haters? All i see is support in this thread. Its really unnerving.
>>
>>44034113
>rpgstdlib
Something like this already exists:
http://doryen.eptalys.net/libtcod/
>>
>>44034173
>>44034113
Libtcod is really only good for drawing the graphics and for its field of view stuff.

And pathfinding if you can't be assed to implement your own methods.

But it's pretty awesome either way.
>>
>>44034203
>Libtcod is really only good for drawing the graphics and for its field of view stuff.
>And pathfinding if you can't be assed to implement your own methods.
I thought that was your point.
>>
>>44034218
My response to you was my first post in this thread, so I never really had a point other than elaborating to those who don't know what libtcod is.

I was clearing up any confusion that it's some kind of all inclusive library for everything RPG, which isn't necessarily true.
>>
>>44034239
OK.
>>
Hey, OP, I'm in. Keep these threads going. Get a github account and i'll start on contributing this afternoon.
>>
You guys realize since OP hasn't added any licence to his repo, this entire thing is non-free and proprietary right?

If you modify his code and send a pull request he could sue you.
>>
>>44034497
Only in Murica.
>>
How would one implement a map, i.e. the actual game world, not the data structure.

ASCII file with certain symbols representing walls and others objects? Load that into a two-dimensional array and check movements against it?
>>
>>44034842
sure why not
>>
>>44026836
>AIM
OP is from the 1800's confirmed
>>
>>44034842
Don't forget you also need to check visibility so the player can't see through walls/so you know what to load at any given time.
>>
>>44034932

Ah yes, thank you.
>>
>>44034997
Why did you delete it?
>>
>>44033725
>https://github.com/crizilla/RPG << dir working
That link 404's as well.
am I getting trolled?
>>
>>44026836
added you on aim, guess i could use learning some c++ too
>>
What compiler/ IDE are you using, OP?
>>
File: works.png (31KB, 1138x594px) Image search: [Google]
works.png
31KB, 1138x594px
>>44035244
Works here
>>
>>44035244
OP is embarrassed about his coding skills.
>>
>>44033725
Disregard this:
>>44035244
I'm just a dunce.
>>
>>44035092
because wrong thread, I thought this was the daily programming thread, here's my post >>44035045
>>
Just brainstorming here till OP gets back.

Thinking about the implementation of units/monsters/enemies whatever. Would it be best to define a base abstract class Unit from which all other units can inherit? And also have Player inherit from Unit (since Player is technically much like a monster), only adding things like experience/inventory/etc since most methods like attack() or defend() should not matter on the actual type.

This way one could also declare them to take an object of Unit type, rather than overload them based on which actual Unit it is...
>>
>>44035533
This is why you need to design your inheritance model before you start writing the actual game.

You need to write down all the names and methods of all the classes. No code. Just an outline.
After you do that, you start working on the implementation which is the easy part.
>>
>>44036016
aggregation > inheritance
>>
>>44035533
This is how 90% of roguelikes handle it (at least, the ones I've seen the source to), so it's definitely a valid method.

It might also make it easier to handle all the interactions. Some games make very little distinction between player and enemy (enemies even have inventories and exp gain, for example), but others treat them like hardcoded features without much personality.

It's a style thing.
>>
>>44032263
>You don't learn to program in any language, least of all C and C++ by following video tutorials
Its impossible to not learn the ropes of C++ with spags tuts.

unless you are a pussy or a dunce, of course.
>>
>>44036066
No.
>>
>>44036118
Link?
>>
>>44036211
Spoken like either a real faggot or a GUI system programmer.
>>
>>44036350
No. Look. Aggregation has its time and place. But inheritance is much better for a RPG game.
>>
>>44036380
Not for different monster/player types.
Those belong into data.
>>
>>44036417
You're right. But for having a base Entity object for example with coordinates, hp, etc. Inheritance is better.
>>
>>44036442
Well, that's true.

I first thought you were of for the total inheritance trip.
>>
Newbie questions - let's say I have a base class Unit and Player that derives from it

class Unit {
private:
int level;
int health;
};

class Player : public Unit {
private:
int gold;
public:
int getGold() {
return gold;
}


I know that in Java you do

Unit player = new Player();

From what I gather, the equivalent (Unit* player = new Player()) is unnecessary and actually wrong to do in C++, right?
>>
>>44036259
http://youtu.be/FyOs7ilfAmY
>>
>>44036641
>From what I gather, the equivalent (Unit* player = new Player()) is unnecessary and actually wrong to do in C++, right?
It's okay to use if you want to treat units as polymorphic entities with virtual functions (abstract base classes, interfaces, etc)
aka,
pass them to functions that expect units and perform shit on them, no matter what kind of unit as long as they all share the same interface.

it's not needed if you intend to pass around player instances directly.

then you also create a player directly.

>Player player;
done.
>>
>>44036380
>But inheritance is much better for a RPG game.
I disagree. Everything can be broked down into components.
Display/rendering components.
Position, mass, health, etc.
>>
>>44036759
While it may have better performance, i don't thing it matters in a text based computer game.
>>
>>44036641
What >>44036736 said.

You should only use Pointers if appropriate.
>>
>>44036815
It's not about performance.
It's about maintainability.
And flexibility (which is a part of maintainability).

You want to give the player a buff that makes all projectiles go in a sine pattern.
component based:
you add a filter component that modifies the position for the duration of the buff

inheritance based:
you have to give projectiles a wave pattern function, or use a base class with it, but what if some projectiles shouldn't be affected, then you need to add some checks or use different classes.

it works but is not as nice to work with.
>>
>>44036815
>>44036876
it's also easier to create script/data file defined classes with composition.

inheritance is pretty much bound to compilation.
>>
>>44036909
Good point.
>>
>>44036876

Could you please give a quick example about aggregation based design? I understand inheritance based but can't seem to completely wrap my head around aggregation one.
>>
>>44037021
I am anout to have dinner so I cant go into details right now, but this link has a (still valid after all these years) good overview
http://cowboyprogramming.com/2007/01/05/evolve-your-heirachy/
>>
>>44037087

Just to make sure I get this right, taking that article as a base, I would have instead something along the lines of...

//Old style
class Unit {
private:
int x;
int y;
public:
virtual void move(x, y);
};

class Player : public Unit {
public:
//Pretend I'm reimplementing move based on unit type
virtual void move(x, y);
};

class ImmovableUnit : public Unit {
//Now this also inherits move() function even though it will never implement it
};

//New
class Position {
private:
int x;
int y;
public:
void move(x, y);
};

class Player {
private:
Position pos;
public:
pos.move(x, y);
};
>>
>>44037449
something like that, yes.
http://gameprogrammingpatterns.com/component.html

have more to read, it even includes code examples, and in C++ no less.
>>
>>44037087
>>44037474

Thanks! It's actually making a lot more sense now, plus it was a really interesting read.
>>
>>44037474

Sorry, one question though. With that model there is NO inheritance? Or can I still declare a base class from all air units for example can inherit from that consists of AirMovement object?
>>
>>44037857
There is inheritance, but it's not very deep and mainly just for the generic interface of game objects and co.
>>
About the inheritance vs aggregation model...How small would you go? Would a Player class have a PrimaryStats object, or go down to base components, i.e. Player has Health, Mana, Stamina, Attack, Defense etc?
>>
>>44038795
Not that guy, but I'd like to know, too.
>>
File: johnny[1].jpg (11KB, 250x250px) Image search: [Google]
johnny[1].jpg
11KB, 250x250px
>>44028370
>>
First thing you guys need to do is a list of all things your RPG will contain.
First obvious object is Player.
>>
>>44039208
Basic storywriting couldn't harm as well.
>>
I was so happy with my terrible hierarchy based design... COP is making my head hurt.
>>
>>44040538
It's probably an overkill for this project anyway.
>>
>>44040559

Never hurts to learn new things though
>>
>>44040581
That's true, especially if it's applicable elsewhere, like components.
>>
>>44026836
>message me on AIM
topkek, go fuck yourself OP
>>
>>44039208
This is a good jumping off point. Every project needs a platform to build from and I think this is ours. The difference between a good project and a bad project is a secure foundation, the difference between a good project and a successful project is accurate abstraction, not to mention a little drop of inspiration. I think we need to delegate tasks and I see these as being split into two broad areas; the Researchers and Abstracters. The researchers will basically distill the essence of an RPG and ship their findings down the line to the abstracters, who will create models for implementation. Once research is complete the researchers will become appraisers who evaluate the Abstracter's abstractions. Building without abstractions is like building with grains of sand. You can't possibly do it.
>>
OP here. I'm back in the mIRC

#AutismoRPG in the SwiftIRC server

github:
https://github.com/crizilla/RPG
>>
>>44040828
Cool. Pro-Tipp: Instead of faggot.speak("Faggot: bla"); I would concat the string and use the name in the speak method.
>>
>>44040828
What is this shit? main.cpp
I'm going to fucking die right here.
>>
OP here. Going to the store. Will be back in an hour or so. Then I'll be working on the game until around midnight (Pacific time).

Pls join IRC.
>>
>>44028448
maybe its a project to help him learn c++?
>>
>>44026836
why isn't weapon and character a struct? since you have all public dataMembers
>>
OP here. Will be back around 8pm pacific time.
>>
>>44042513
the class is even in the same file, don't ask for style.
Thread posts: 201
Thread images: 5


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.