• 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.

Kaanin25

Members
  • Content count

    5
  • Joined

  • Last visited

Community Reputation

129 Neutral

About Kaanin25

  • Rank
    Newbie
  1. [b]Edit: I was able to resolve it by moving #include "Bullet.h" and #include "EnemyGuy.h" into the EntityFactory.cpp. I also moved #include "EntityFactory.h" into EnemyGuy.cpp[/b] Ok so I went and read up about the factory design pattern and I am trying to implement it and I have hit a roadblock. [source lang="cpp"]// in EnemyGuy.h #include "Entity.h" #include "EntityFactory.h" class EnemyGuy: public Entity { public: void update(); } [/source][source lang="cpp"]// in EnemyGuy.cpp #include "EnemyGuy.h" void EnemyGuy::update(){ if (you see player) Entity* shotFired = EntityFactory::create("bullet", params); } [/source][source lang="cpp"]// in EntityFactory.h class Entity #include "Bullet.h" #include "EnemyGuy.h" class EntityFactory{ public: static Entity* create(const std::string passed, params); } [/source][source lang="cpp"]// in EntityFactory.cpp #include "EntityFactory.h" static Entity* EntityFactory::create(const std::string passed, params){ if (passed == "bullet") return new Bullet(params); if (passed == "enemyguy") return new EnemyGuy(params); } [/source] I get a cyclic dependancy error because the factory needs to include EnemyGuy so it can create instances of it and then EnemyGuy needs to include the factory so it can call the create() method. Normally you would break a cyclic dependancy with a forward declare but in this case a forward declare won't do it. How can I resolve this issue?
  2. You guys are awesome. FleBlanc I want to have your babies. Thank you! Edit: Any reccomendations on design pattern books?
  3. For my current project I have an Entity class that all game objects are inherited from. I also have an EntityManager class that keeps a list of pointers to all the game objects created. The idea being that this list will be used for updating and drawing all game objects to the screen. I find myself struggling to find the best way to design all of this. How do I make sure all game objects are added to the EntityManager list? How do I make sure that when an object is deleted, all other game objects that might have a pointer to said object are not now referencing deallocated memory? During cleanup I delete all the Entity objects in EntityManager, and therefore they all need to be heap objects created with the new keyword. How do I make sure none of the pointers point to a stack object? Right now I am doing this project alone, and ultimately the easy way out to most of these questions is for me to just remember things and don't make mistakes. [size=3][i]"Just dont forget that all entity objects need to be made using new." "Just dont forget to add all Entities you make to the EntityManager list."[/i][/size] But that is bad programming right? What if I was on a development team...that wouldnt fly! The other devs would not know all the catch clauses of what not to do and what may cause a bug with my code. Thats the whole point of classes and privacy and encapsulation ect...to make code that is hard to break and easy to organize. I'm trying to improve my skill as a designer and programmer...am I overcomplicating this? Somebody help me.
  4. [quote name='Lazy Foo' timestamp='1339086427' post='4947086'] Notice how I very specifically noted that that the source for the game is how not to to make game, in bold and capslock so you know I'm serious. [img]http://www.gamedev.net/public/style_emoticons/default/smile.png[/img] [/quote] Notice how I very specifically noted that I was not bashing your code...I understand it was a tutorial designed with the intent to show beginners how to handle the SDL library and setup a very simple game; and for that purpose you did a fantastic job, your tutorial has been very sucessfull and I myself thank you for making it. [quote name='Lazy Foo' timestamp='1339086427' post='4947086'] You want to know the best way to learn design? Stop going around to other people's projects hoping you'll find some magical piece of wisdom and go out and get your hands dirty. [/quote] So you just assume that im sitting around all day just parusing through other people's code without writing any of my own? That I havn't already gotten "my hands dirty". I have been writing code on and off for some time now; I have a few past projects under my belt. I am not an infinite pool of resources unto myself and when I lack the skill and knowlege to solve a problem I seek out others who are better then me for answers. In my particular case I had a [url="http://www.gamedev.net/topic/626312-best-way-to-design-an-object-list/"]problem[/url] with the game I am developing right now and all the solutions I had come up with on my own have been unsatisfactory. I thought maybe I could get a look at few other open source projects made by better programmers to see how they did it. learning by example is a very valid form of education. If you don't want to help that is fine, then dont post, but please don't berate me as if im not trying. Sorry if that was a bit of a rant, but it really upset me. I came looking for help. Thank you very much for the resources Serapth, EnigmaticProgrammer, and Dejaime.
  5. I have a firm understanding of C++ beyond the beginner stuff; I know classes, polymorphism, templates, ect... What I am looking for is some example source code that is properly written to look at. Something small and simple like Tetris or Snake, not huge like the Doom 3 source code. I found this on LazyFoo's website. [url="http://lazyfoo.net/games/LazyBlocks/index.php"]http://lazyfoo.net/g...locks/index.php[/url] and it's working code, but there are a lot of global variables, C style functions that should be part of a class object, and so forth. I'm not bashing his code, Ive written far worse myself. [b]I don't need perfect[/b], I just need something with a good format as a reference. Something I can use whenever I hit a roadblock to look and see "how they did it". Anyone know of or have any open source game code I can look at?