• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.

Agreon

Members
  • Content count

    15
  • Joined

  • Last visited

Community Reputation

167 Neutral

About Agreon

  • Rank
    Member
  1. Thank you for your suggesstion, but let's say i have a game with many entities; That would be very confused in the game class.
  2. Hello. I think the best way is to start with an example of my problem. I made a little game with diffrent objects. Each object interacts with the others and access them. (Like if a bullet hits a enemy, it destroys the enemy). So maybe you would put all this code in the Game-function()-Method. I read somewhere that each object should update itself. So i made a Update()-function for every class.   Example: I got a Ball-Class that checks in his Update()-Function if it collides with the player or other game objects. If the ball touches the lower border, the players lifes are decreased. The Question: How do i realise that? I first thought of giving the player each game-loop through the update-function. That wasn't that clean. So i changed the Ball Class Ball::Ball( Player *player, posX, .... Now i could access the player in the Update()-function to change its values. But i dont know if this is good practise. One big thing is, that i dont only have to access the player, but nearly every object in the game. Here is an example of my Ball Class-Structure: class Ball : public cEntity { private: double m_VelX; double m_VelY; double m_Speed; bool m_Super; Player* m_Player; vector<Ufo*> *m_Ufos; vector<PowerUp*> *m_PowerUps; cAnimationManager *m_AnimationManager; cSound *m_Sound; public: Ball(cGraphics *graphics, cAnimationManager *animManager, cSound *sound, Player *player, vector<Ufo*> *ufos, vector<PowerUp*> *powerups, string texture, int posX, int posY, int width, int height); ~Ball(); void Update( double delta ); void CheckCollision(); void Draw(); void Reset(); Should i continue this way?   Thanks,   Daniel
  3. 2 Weeks ago, the youtuber Let’s Game Dev started a Community Challenge. You had to make a curiose Pong clone in 2 Weeks. So i sat down and wrote a Game. During the development i learned how to connect C++ with a mysql-database. As always the Sound and the Animations were the biggest problems.( I got the sounds from Freesound.org.) But now i finished it and created a youtube-video. It would be cool if you can give me feedback :)   Daniel   https://www.youtube.com/watch?v=cUFn80fNUfA   Links:   Download: http://www.mediafire.com/download/t2fggc2v3nnoun4/EarthDefender.zip Source: https://github.com/Agreon/EarthDefender  
  4. Thanks, i will try it out!   Ok, that was my problem. Thanky you!
  5. Hey,   I switched to Ubuntu yesterday and wanted to continue my project. And everything works fine but one little thing not: I am reading some img-paths from a text file, sorted like this:   img/ground/grass1.png img/ground/grass2.png ...   On Windows everything worked fine. When i now want to start the program with Linux it works, but it cannot open the files with the path that was read from the config-file. If i use the function manualy like loadTexture("img/ground/grass1.png") it works! ( Function: loadTexture( const char* path ) ).   Is there a known bug with File handling in Linux?   Thanks,   Daniel  
  6.   How to delete or merge a post?
  7. Hey, I always create an huge enum in my project and one function where all the 'loadTexture' functions are called. I think its not the best way so i thougt i could easy read the img src from an extern file (url:foo.png name:TEXTURE_TREE). The only problem is: I still have to declare the enum. ( In there are some values like 'TEXTURE_TREE' and so on that are called on orher places). Is there a way to automatically fill this enum, or do you have a better idea?   thanks,   Daniel
  8. Hey, I always create an huge enum in my project and one function where all the 'loadTexture' functions are called. I think its not the best way so i thougt i could easy read the img src from an extern file (url:foo.png name:TEXTURE_TREE). The only problem is: I still have to declare the enum. ( In there are some values like 'TEXTURE_TREE' and so on that are called on orher places). Is there a way to automatically fill this enum, or do you have a better idea?   thanks,   Daniel
  9. Perhaps you could share your solution so others can benefit from this thread. Otherwise, it may as well not have been started.   It was my fault. I dont know why, but i forgot to call the event function -.-.
  10. Hey, in my previous post i asked about my Input Manager. But then something came in my mind. Instead of calling the "isKeyDown" function everytime, couldn´t i just set a global variable bool key[] and only change and check them? Or when i want to get my mouse coordinates, do i call "getMousePositionX" or do i just create global variables "mouseX" and "mouseY"? Whats cleaner?
  11. I solved my problem thanks
  12.   bool m_keys[323];   SDLK_ESCAPE has the value 27. But thats not the problem. Every other Key doesnet work.     With PollEvent i get all the events, so that i can handle them. I call it everytime in the loop, before update, where i check the m_keys.    
  13. Hy, I worked on an Input manager but it doesnt work. This is, what it looks like:   #include "cInput.h" cInput::cInput(void) { m_MouseX = 0; m_MouseY = 0; for(int i = 0; i < 323; i++) { m_keys[i] = false; } } void cInput::handleInput(SDL_Event evt) { while(SDL_PollEvent(&evt)) { switch(evt.type) { case SDL_QUIT: running = false; break; case SDL_KEYDOWN: m_keys[evt.key.keysym.sym] = true; //if i add if(evt.key.keysym.sym == SDLK_ESACPE) running = false; it works. break; case SDL_KEYUP: m_keys[evt.key.keysym.sym] = false; break; case SDL_MOUSEBUTTONDOWN: if(evt.button.button == SDL_BUTTON_LEFT) { m_leftMouse = true; } else { m_rightMouse = true; } m_MouseX = evt.button.x; m_MouseY = evt.button.y; break; case SDL_MOUSEBUTTONUP: if(evt.button.button == SDL_BUTTON_LEFT) { m_leftMouse = false; } else { m_rightMouse = false; } m_MouseX = evt.button.x; m_MouseY = evt.button.y; break; case SDL_MOUSEMOTION: m_MouseX = evt.button.x; m_MouseY = evt.button.y; break; } } } bool cInput::keyPressed(SDLKey key) // Here is the function { return m_keys[key]; } bool cInput::leftMousePressed() { return m_leftMouse; } bool cInput::rightMousePressed() { return m_rightMouse; } int cInput::getMousePositionX() { return m_MouseX; } int cInput::getMousePositionY() { return m_MouseY; } But now, when i try to use it in my main update function, it doesnt work. The Function "keyPressed" returns false every time.   if(Input->keyPressed(SDLK_ESCAPE)) { running = false; }   Does anybody have an Idea what im doing wrong?    
  14. Hy, I worked on an Input manager but it doesnt work. This is, what it looks like:   #include "cInput.h" cInput::cInput(void) { m_MouseX = 0; m_MouseY = 0; for(int i = 0; i < 323; i++) { m_keys[i] = false; } } void cInput::handleInput(SDL_Event evt) { while(SDL_PollEvent(&evt)) { switch(evt.type) { case SDL_QUIT: running = false; break; case SDL_KEYDOWN: m_keys[evt.key.keysym.sym] = true; //if i add if(evt.key.keysym.sym == SDLK_ESACPE) running = false; it works. break; case SDL_KEYUP: m_keys[evt.key.keysym.sym] = false; break; case SDL_MOUSEBUTTONDOWN: if(evt.button.button == SDL_BUTTON_LEFT) { m_leftMouse = true; } else { m_rightMouse = true; } m_MouseX = evt.button.x; m_MouseY = evt.button.y; break; case SDL_MOUSEBUTTONUP: if(evt.button.button == SDL_BUTTON_LEFT) { m_leftMouse = false; } else { m_rightMouse = false; } m_MouseX = evt.button.x; m_MouseY = evt.button.y; break; case SDL_MOUSEMOTION: m_MouseX = evt.button.x; m_MouseY = evt.button.y; break; } } } bool cInput::keyPressed(SDLKey key) { return m_keys[key]; } bool cInput::leftMousePressed() { return m_leftMouse; } bool cInput::rightMousePressed() { return m_rightMouse; } int cInput::getMousePositionX() { return m_MouseX; } int cInput::getMousePositionY() { return m_MouseY; } But now, when i try to use it, it doesnt work. The Function "keyPressed" returns false every time.   if(Input->keyPressed(SDLK_ESCAPE)) { running = false; } Does anybody have an Idea what im doing wrong?