Advertisement Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

307 Neutral

About Nazrix

  • Rank

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Quote:But this is a bad idea, because the TakeItem instance that you created would probably not outlive the NPC you assigned it to, Yes, this was my problem exactly. Thank you so much. This is exactly what I needed :):)
  2. Nazrix

    Memory Lane

    Nazrix is cool
  3. Goal.h - This is the base class for storing NPCs' goals class Goal { private: Character *doer; Character *giver; //TODO --- Item rewards[3]; //TODO --- NEED fulfilled; public: MORALITY morality; //good, evil, etc public: bool finished; //is it finished virtual void Execute()=0; ... NPC.h class NPC : public Character { public: Goal *currGoal; }; TakeItem.h - This is a class that is a specific Goal for taking items off of the ground class Goal; class Move; class TakeItem : public Goal { public: Item *item; Move move; TakeItem() { item=NULL; setDoer(NULL); finished=false; } void Execute () { if (!move.finished) { move.Execute(); printf("%s moves to (%f,%f,%f)\n", getDoer()->getName(),getDoer()->x,getDoer()->y,getDoer()->z); //if the npc just finished the move: if (move.finished) { item->personCarrying=getDoer(); printf("\n%s takes item: <%s>\n\n",getDoer()->getName(), item->getName()); } } else finished=true; } }; Another file... TakeItem take; take.item=items[indexOfClosestItem]; take.setDoer(&NPCs); NPCs.currGoal=&take; So in the last part is within a function I call from my main.cpp file. So basically the currGoal variable is a pointer so I can put any Goal I want there (like the TakeItem goal for instance) My question is do I need some sort of deep copy so currGoal can see all the pointers that are in the take variable? If so, I'm a bit confused about how to go about doing a deep copy. The inheritance is making it confusing for me. Thanks!
  4. Nazrix

    vector question

    Thanks for the help. I realize I do need a copy constructor since I have pointers involved.
  5. Let's say I have a class called AClass, a STL vector called listOfSomeClass that's a list of variables of type someClass. class AClass { vector <someClass> listOfSomeClass; void someFunction() { SomeClass foo; listofSomeClass.push_back(foo); } }; My question is if I call the function, AClass.someFucntion() and it pushes a SomeClass into the vector list does the object foo get lost after someFunction done executing? In other words if I were to access it using SomeClass.listOfSomeClass[0] would it be a valid object?
  6. Nazrix


    Yeah, Java doesn't allow you to use pointers. I had the same problem with pointers. I could see how to use them but not why you would use them. One way that is very useful is when you have a function where you want to be able to change a variable outside of that function. Try this program and you'll see how it works: #include "stdio.h" void changeVal(int *a) { *a=5; //change the value of the variable this points to 5 } void main() { int n=0; changeVal(&n); //this gives the function the address of where n is printf("%d\n",n); }
  7. Nazrix

    How to "finish" a freeform game

    Quote:Original post by Anonymous Poster So your player explores this world, interacts, and somehow achieves some type of monumental challenge that the designer has layed out (becoming king, etc). Once one of those tasks has been achieved, the game 'ends' at that point (like a typical single player RPG), except the player continues on as a new random character in the same world, perhaps a character that has competing interests with the last character you embodied. This new character is starting back at square 1 as far as progress goes, of course. This way, the game doesn't really end because you continue in the same world, and your previous character's achievements aren't forgotten. But because your last character achieved some 'ultimate goal', and your new character has competing interests, the world is full of things that need to be 'changed', as far as your new character is concerned. Your new character affects the world and has his goal completed, and the player takes on a new fresh character again as the cycle repeats. Has anyone seen or thought of something like this before? Like I said, I've never taken much interest to OEGs before so I wouldn't know if this has been done. That's very cool. And your previously played character could then be controlled by the AI I'm assuming.
  8. Nazrix

    How many music artists can you spot?

    Quote:Original post by LessBread Or the rat above the scissor sisters? There was a band called Ratt in the 80s. Hair-band metal.
  9. Nazrix

    How to "finish" a freeform game

    Thanks a lot, Wav. I believe I was thinking along those lines, but it helps to see it laid out in words. :)
  10. Nazrix

    How to "finish" a freeform game

    Quote:Original post by Wavinator Without a plot, OEGs (hey, look, a new acronym! [wink]) need to do it with victory conditions, new phases of gameplay or state changes that alter the meaning of the player's behavior/struggle. Okay, that does make sense. I definitely plan to allow the world to drastically change from the player's actions. If you become the kind of a nation, the game's state will change drastically. Or if you become the a feared thief or a powerful hero. That's a good point you made. There has to be some payoff even if that payoff doesn't conclude the game like in a game with an ending.
  11. Nazrix

    How to "finish" a freeform game

    Wav, I definitely understand what you're saying and I was thinking that myself. Part of me feels that there are players who do like playing around with an environment without the game telling you what to do, but I think those players are in the minority. When I played GTA, the first thing i wanted to do is screw around and run people over, etc. But as soon as any of my friends started playing the first thing they did was look to see what the game told them to do. Another thing I noticed was that I was perfectly happy crashing and killing myself . I didn't care if I died or got arrested. To me, I was just having fun interacting with the freedom of the world. Whereas my friends were very concerned about failing as far as the game was concerend. They didnt want to die or fail the mission. They were very concerend about the pass/fail aspect of the gameplay whereas I thought of everything as just an experience. And I think I feel that way about most games. The OEG (I like that BTW :)) I am working on would have a sort of sense of achievement. For instance, if you gain leadership of a city or become a more powerful hero or villan that would probably give a sense of achievement. The thing is I think in a true OEG, achievement would be subejctive. It would rely on what the player consideres to be an achievement. If the game defines what is achieving & what is failing then it no longer is an OEG. So my dilema is that I don't want the player to feel like everything they're doing is pointless, but I don't want to give them a clear-cut pass or fail type of response. It seems that the 2 things are mutually exclusive, so it's really driving me crazy.
  12. Nazrix

    How to "finish" a freeform game

    Quote:Original post by NIm I believe the point is not that the world creates plot, but that civilization-scale events percieved by a single player charachter can give the appearance of plot. Yes exactly. By civilization-scale you mean wars and national conflicts and such right? ...just making sure I understand what is meant by the term.
  13. If it's a true stealth game I think Option #1 is best. Also, running away and trying to hide can be just as fun as sneaking.
  14. I really don't like music in action games. Especially if it's multiplayer. To me, it detracts from my concentration on the sounds of the game. It's annoying if I'm trying to listen for gunshots and such and I hear music.
  15. Nazrix

    How to "finish" a freeform game

    yeah, I'm glad you mentioned Starcraft because in some ways the game may border on an RTS from an RPG point of view. I expect to allow things such as being involved in warfare as a soldier or working up to a general and giving orders. I also want to include more micro activites that are more on the RPG side like being a hero or criminal. Also, someboddy, that is a very good point. I didn't care much about Morrowind's main plot either. Thanks. You all helped a lot. I feel a lot more confident about having no main plotline after hearing that people agree with me that the world itself would create enough plot to be fun.
  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!