Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

114 Neutral

About Eliburgi

  • Rank
  1. Eliburgi

    Advanced game structure

    Ok so thread closed :D
  2. Ok thanks. So this topic would be closed now :D
  3. I even have a new question(sry for all that questions, but it´s my first bigger game): I use sprites from here :http://www.pinterest.com/pin/447615650437593300 and my problem now is that when I would want to animate the player attacks then the image would be drawn at the most top/left position(when aligned to top left) and so it would look like the player is moving right when I want to play the forward attack animation(because of the alignment when drawn). So how could I solve this?    Thanks for help :D
  4. Wow thanks for your answer. So thats the right way to go? If so I could finally start coding(yeah :D). I am using the Tiled map editor for my tilemaps(don´t want to spend a lot of time on making my own), so do you or anybody know how I can implement events there(I would have thought on an event layer, but such a layer doesn´t exist in tiled). When looking in the interent for information I can´t find anything reasonable to work with.    Anyone an idea?
  5. Wow thanks about your answer. I didn´t think about the order, damn. Now it sounds more complicated, than I originally thought it would be. But what impresses me is, how fast you can investigate in my problem. How long are you game programming already? Sounds like you are a professional.   And for interacting, I also had a new idea. I add an event layer to the TileMap for teleporting between maps or when the player is near a sign and presses let´s say space than an event gets fired(for example opening a dialogue window). Would that be a good way to go?
  6. Eliburgi

    Advanced game structure

    I now have a new idea to tackle that problem with interacting with world objects(treasures, ...). I simply add triggers to my map and when the player is near a trigger he can press a button assigned to interacting with objects(lets say space) and then I simply fire an event assigned to that object(for example when interacting with a sign a dialogue window opens). So would that be a good idea?
  7. Eliburgi

    Advanced game structure

    Yeah. I do it that way you explained it, but I handle animation and AI inside the respective classes(for example in a platformer I have a class AnimationStrip and every animated objects has a dictionary(C#) with strings as keys(so I can say currentAnimation = animations["jump"]) and AnimationStrips as data. So would it be a good idea to put that all into one sub-system? And I let every object draw itself,so that I can say for example:   foreach(GameObject o in gameObjects) {      o.Draw(spriteBatch); //Spritebatch is used for drawing in XNA }   so but thats ok or?   Thanks a lot for your answeres :D
  8. Hello community,   I want to start with programming a 2D RPG soon, and whilst planning the project, there occured some problems. One major problem is that I want a flexible architecture, so I can easily add new things later on. So I want to de-couple the different game parts/objects, for example there should not be any collision code inside the player class. Or another problem I am struggeling with is, how do I let the player interact with all kind of world objects like treasures, traps, NPC´s,... without having alol that code in the player class.   I read a very interesting post about that. There was a event system explained: For example if I the player wants to move he fires an event BeforeMove(Vector2 desiredPos) and the tile map and obstacles react to that event in their own class or so and if they collide with the player they set isPlayerAllowedToMove = false. So the player can´t move that frame. Or for example if I want to implement traps, I could create a event inside the trap class which fires an event, lets say DamagePlayer(int damage) and the player has a way to react to that(by loosing life). Is this a good approach, or do I couple things even more with that(I am not quit sure).    In my last projects I handled Collsion in a collisonManager which had references to the player, and the enemyManager and then I simply checked for collison. I also thought of lettin every object have an event OnCollison, but the problem with that is, that I wouldn´t know which objects collided, so I couldn´t interact differently.   So I hope someone can help me with my problem.   Have a nice day :D    
  9. Eliburgi

    Advanced game structure

    Wow thanks. That was that kind of answer, which is helping a lot. I also read the article at Gamasutra, which is sometimes a little bit hard to follow, but I understood what the author meant, I think. But such a type of structure is too professional for me I think at that point(I am game programming one year now), and I think I will go with a different, easier approach. Even all the questions didn´t really solve my problem with the RPG, it helped a lot. Thanks for all your patient and interesting answeres. I think I am going to start a new thread for my question about the RPG.   So have a nice day :D
  10. Eliburgi

    Advanced game structure

    haegarr how do you handle interactions between different game parts/objects?
  11. Eliburgi

    Advanced game structure

    Thanks for your answer. I am using C# (XNA) so I don´t have to care about Destructors like in C++. Your way to handle collisions is the only way I know so far and therefore the one I am also using. But how do others handle collision(also tilemap) without having everything coupled? When looking in the internet, I only find things like quadtrees, ... , but I am interested in way different objects communicate in a game. What about that approach(first answer): http://stackoverflow.com/questions/11323413/handling-interaction-between-objects. As I said above I want to make a RPG, not too big but still that it looks and feels like a classic RPG. So now I am planning things and one problem that occured is, that I want a way to interact with game objects(treasures, traps, obstacles like stones, ...) without having coupling(or at least not much coupling) between the different classes, so that I can reuse parts of the code in other similar projects. Once again sorry for my english.    Thanks for your help so far :D
  12. Eliburgi

    Advanced game structure

    Yeah that has been my problem so far, but my last project was better in that point. Still I have to find another way of handling the objects in a growing project. Any approaches? How manage you guys your game objects?
  13. Eliburgi

    Advanced game structure

    Glass_Knife nice anecdote :D
  14. Eliburgi

    Advanced game structure

    Ok, so what would be a good approach to decouple all the different parts of a game(Physics, Collision, Events), so that there´s no code of collision detection in the player class itself, or to decouple the achievment system from parts like physics(for example I want an achievment "Fall 100 metres") then I would use observer to let the achievment system listen to the physics part. Till now I always used Lists of Gameobjects for exampe. So when I shot a bullet I added it to an ShotManager and Updated it in there. Same with collisions, I had a collision manager which had references to the player, shotmanager and then checked tif they collide. But I don´t want that ugly coupling anymore. I want a flexible architecture to work with, so that I can easily expand the game. There is a interesting way to handle this problem, but I don´t know if it´s too slow or not manageable(the first answer): http://stackoverflow.com/questions/11323413/handling-interaction-between-objects       I also read about putting everything in a class and let an entity have a list of behaviours(like movingPart, physicsPart), but I don´t have experience with that kind of architecture so I want to learn it first before I try my luck in a game.   So what approach would you choose?
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net 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!