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

deathwearer

Members
  • Content count

    391
  • Joined

  • Last visited

Community Reputation

367 Neutral

About deathwearer

  • Rank
    Member

Personal Information

  • Location
    Montreal, Canada
  1. Let's say I have three classes. 1. Player 2. GameScene 3. CameraController The GameScene create the Player and the CameraController. Both are unique_ptr in the GameScene. The CameraController needs the player to get it's position everytime its updates is called to center the camera on him. What I did was to receive a player pointer in the CameraController constructor and store it. This scenario is simple enough to say, why don't you pass the pointer to the player each time you call your update method on CameraController. But for the sake of understanding the concept and good practices of unique_prt let's pretend there are other routine methods being call internally which require the player. Should I have created a shared_ptr and pass the shared_ptr to the CameraController? So the ptr will be deleted when both the GameScene and CameraController get deleted?
  2. [quote name='zacaj' timestamp='1355263599' post='5009558'] 1. You don't have to delete it 3. because then some other function can't get a copy of your pointer and then have an invalid pointer after your class is destructed [/quote]if i pass the unique_ptr.get() they have a copy if my ptr. they could also store that pointer in a class variable. Added question 4 at the topic.
  3. I get the concept (Or I think I do) but I still have couple of question on the technical side of unique_ptr. 1. When you declare a unique_ptr as a class variable, you don't have to delete it in the destructor because it is not on the heap so when the class instance is deleted, the unique_ptr is deleted which trigger the real pointer delete? 2. How do you pass unique_ptr to other functions. Do you pass a ref to the unique_ptr object? Or do you pass uniqueptr.get() (Which sends the pointer to the real object)? Do you do the same if you send it to an internal method than to another class method? I personally pass the pointer as const, leaving the unique_ptr hidden. I'm wondering here what are the best practices. 3. What is the point of a unique_ptr as a class variable? I mean since the pointer has to dies when the owning instance is kill, all you have to do is to put it in the destructor. I understand that shared_ptr are more complicated since many object can own them which make the delete call tricky, but in the case of the unique_ptr, it's pretty straightforward. 4. What are the best practices regarding unique_ptr and passing the pointer to the object is hold to another class which stores it in a class variable. Is that a good practice first? The unique_ptr could be deleted and the pointer copy it hold in the other class would be invalid. Are unique_ptr meant to be pass around like that? Should i use shared_ptr in that case we're talking? So if another class stores it in a class variable the pointer would be deleted when only all the instances of these 2 classes would be deleted. Also how can you predict such cases if the good answer is to use shared_ptr. How can I plan that other people that might use my class could store my pointer internally.
  4. Before going into threading (Which is a very delicate process) you better see how you can reduce processing time and memory allocation. If you do the calculation of the same object more than once you might want to cache it somewhere. Review container, if you don't need random access use forward iterator What is called each loop. Do you call the only necessary stuff? Are you calling everything but should only call few things based on some conditions? There are other optimization you can apply depending on game type etc. If there are no enemies in the screen, don't even check the bullets collision, stuff like that.
  5. // HANDLE MANY ENEMIES - FAIL ArrayList<Rectangle> enemiesBounds = new ArrayList<Rectangle>(); for (int i = 0; i < enemies.size(); ++i){ enemiesBounds.add(enemies.get(i).getBounds()); } [u][b] for (int i = 0; i [color=#ff0000]>[/color] blasterShots.size(); ++i){[/b][/u] You wrote > when I think it should be < Not sure if this cause your problem, but that would be a good bug to fix first [img]http://public.gamedev.net//public/style_emoticons/default/smile.png[/img]
  6. Hey, First are you using WinForm or WPF? Also what is the .NET version?
  7. Hey, here's how I see it. 1. Choose a language. You have a background with programming which is a good start. You can use any language you want. I personally recommand c++ since this is the language most used for games. It has many free compiler, libraries and lot's of help from people. You could also use Java, C#, Python. Which one of these is the best? (None, you could search here, we have tons of topic on these. It's a matter of preference, target, portability, etc, etc). [url="http://en.wikipedia.org/wiki/C%2B%2B_compiler#C.2B.2B_compilers"]2. Choose a compier[/url] I personally like Visual C++ (Or Visual Studio). The Express version are free. You could also use other compiler but since I live in a very microsoft-ish world, I mainly use Visual Studio and couldn't recommand something else. Someone else could. 3. Decide the render system/Graphic engine. You can choose to develop using DirectX or OpenGL from the ground. If you choose this path you will learn a lot on how the rendering is made, but you will find yourself loosing a lot of time playing with it instead of coding a game. You could also choose to use a Graphic engine, which wraps DirectX or OpenGL (Or both) for you and expose you classes that will make your development faster and easier. [url="http://en.wikipedia.org/wiki/List_of_game_engines"]Engine list[/url] . I personally like Ogre3D, which I think is not in that list, no idea why. It has many tutorial, help, manuals and a very active forum if you need help. Other people could recommend you another Engine too. I'd go for a Graphic engine too. It's fun to code the core graphics stuff but if you want to finish a game, you better use one since other people have worked years on these engine which can probably do everything you want. And replicating these engines could take you years too. 4. Write up your steps. What do you start with and focus on. It's important to stay focused and not throw yourself everywhere. Don't code a bit of input handling then do modeling and then texturing. You will find your project not going very fast and you will eventually quit. Sugestion : 1. Create an empty project. 2. Load test models with or without/texture 3. Handle input 4. Handle camera movement if needed. 5. Make a more complex scene 6. Create good looking model with texture, add light to your scene too. 7. Etc...
  8. Hey, I think you must only change your snake current direction only when it has at least moved one square of the new direction (If your snake game is moving square by square). Maybe have a currentDirection and lastDirection variable. You use the current direction to do your movement, and once at least one movement was made in the new direction you do lastDirection = currentDirection. Then you allow changing the currentDirection only if currentDirection = lastDirection AND is either one of them is not equal to the direction you don't allow (For exemple, going from up to down). OR if your game is somewhat "TIck based" (like the original Snake) only allow one direction change per tick. There would be one draw by tick so you couldn't go from up to down without at least going left of right for a tick.
  9. How your classes are organized. What is each class responsiblities, what objects it owns, what is its relationship with other classes. What programming language do you know/use? Is your game already started? And how far are you?
  10. [quote name='nesseggman' timestamp='1354931584' post='5008313'] [quote name='deathwearer' timestamp='1354929948' post='5008305'] To make a successfull game it needs to be creative. Creative can be story, models, graphic style, gameplay, texture or any combination of these (plus all the other stuff I forgot). Look at Limbo, it didn't had much of a story and the gameplay wasn't complicated but it had a creative graphic style. [/quote] This can be argued. "Words With Friends" is a very successful and popular casual game, however it is not creative at all. It uses rules and design that were copied from Scrabble. The board bonus spaces are shuffled around a little, but certainly not in a creative way. It also allows you to play online, which you could say is its biggest appeal; however, you could play Scrabble online before Words With Friends. So if Words With Friends has absolutely no creativity, how did it become successful? You can also argue the definitions of 'creative' and 'successful'... which I think can easily become very subjective. I think there are many factors that can cause a game to become successful, and not all are required: marketing (hyped games with ads everywhere will have more success than without), accessibility (a game EVERYONE can play will have more success than a game only certain people can play), novelty (games that are unique and intriguing can gather success), branding (Pokemon White 2 is not terribly creative if you look at Pokemon Red/Blue/Green/Yellow/Gold/Silver/Crystal/Ruby/Sapphire/Emerald/FireRed/LeafGreen/Diamond/Pearl/Platinum/HeartGold/SoulSilver/Black/White/Black2... but it still is extremely successful!), etc. [/quote] Nothing I wrote is to be taken by the book Of course some of them doesn't fit. Some games are successfull because of the franchise or the fans. Some games are also "successfull" because it fill a need that no other game fill, even if the game is not that good. Some game are even successfull and nobody could say why [img]http://public.gamedev.net//public/style_emoticons/default/rolleyes.gif[/img].
  11. To make a successfull game it needs to be creative. Creative can be story, models, graphic style, gameplay, texture or any combination of these (plus all the other stuff I forgot). Look at Limbo, it didn't had much of a story and the gameplay wasn't complicated but it had a creative graphic style.
  12. Unity

    I can't comment on Irrlicht, but I'v been using Ogre since quit some time already and I like it. It's cross platform and will also support Windows Phone 8/WinRT. Ogre's been around since long enought (I was still at school when I first saw it, I'm 27 years old). I don't know what you need but I'm positive it has everything you might need. Their tutorial are helpfull but not perfect however. I don't like multi-inheritance and one of their tutorial serie use it a lot. You can use the information provided and do your own architecture quite easily with it so it's not big deal. The documentation looks complete but it's hard to tell. Their forum are very active so if you never need help they could probably help you. If you have a good c++ background and programming in general it shouldn't be a problem to learn to program using Ogre.
  13. Hi turkeyremis, Your question is too general that it's impossible for us to give you a proper answer. We first need to know what is the language you use, if you need help on the technical implementation. Also what is your classes layout. If you need help on where and how to store the information. Your question is very general. Storing/gathering/displaying information in a game can be more than 50% of the code of your game Maybe if you could just tell us if you want a general idea, or a specific implementation advice etc.
  14. The object order doesn't matter. It's personal, put them in the order you find the most logical/important. I tend to put the most important ones at the top. The most used one or the most critical one.
  15. [quote name='Radikalizm' timestamp='1354823059' post='5007853'] Seeing your reply I guess you haven't looked up shadow mapping yet, have you? ;) I'll try to explain it in its simplest form: Shadow mapping is basically a technique to solve exactly the problem you posed of shaders not knowing everything about the scene they're rendering. What you basically do is you render the scene for each light your want to calculate occlusion for (ie. each light you want to cast shadows for) from the light's point of view (so the light becomes your camera), but instead of rendering all the details of each object you just render out their distance from the light itself, giving you a grayscale texture containing depth values. This is called a shadow map. Once you have shadow maps for your shadow-casting lights you can fully render your objects from your camera's point of view. You would light everything as usual, but you add one more factor to your lighting equation, which is occlusion. You do this by reprojecting your current pixel's position into light-space and comparing it with the value stored in your shadow map. Based on this comparison you can determine whether the pixel you're rendering should be lit or whether it should be in shadow, effectively giving you the occlusion you were looking for. [/quote] No I haven't yet! But I'm still at work and don't really have time for that but I promise I will read about it the whole evening. This has to be the most clear explanation I'v read on the subject ever. Thank for that. I'v been reading on Shaders for a while already (Many, many article) but these are always demo project and never real world integration (Obviously). I know how a Specular light is calculated and could (barely) redo it in a Shader but never understood how it would plug in a real game with more than just a mesh in an empty scene...