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

Wilfrost

Members
  • Content count

    8
  • Joined

  • Last visited

Community Reputation

142 Neutral

About Wilfrost

  • Rank
    Newbie
  1. This is good stuff, please keep it coming!
  2. It has been years since I took linear algebra, but I don't *remember* needing anything more advanced than Calc 1. Also, if you are planning on teaching yourself linear albegra, the worst that can happen is you get to something you don't understand. If that is the case, you can always come back to it after you get through your calc 2 class. This seems like a situation where you have very little to lose and a whole lot to gain! I'd go for it. Good luck in your studies!
  3. [quote name='jefferytitan' timestamp='1349687398' post='4987916'] [quote name='Wilfrost' timestamp='1349666150' post='4987848'] [quote name='Bregma' timestamp='1349665762' post='4987846'] If you're writing software using object-oriented techniques, you rarely need getters and setters. Conversely, if you have a lot of getters and setters, you're not using object-oriented techniques, you're doing structured procedural programming. Don't fool yourself that because you use the 'class' keyword you're necessarily doing anything object-oriented. An object-oriented ball doesn't ever need something else to tell it what its size is. Nothing else needs to know its size. It knows how to collide with walls and paddles. It knows how to draw itself. [/quote] I really like the way you stated that. I guess I have some thinking to do about the way my "objects" handle themselves. [/quote] Yes and no. I agree that other classes shouldn't be calculating using the ball size, e.g. doing collisions for the ball, etc. However no class is totally self contained. The ball needs to get it's size from somewhere, e.g. a constructor. Changing the size at runtime could be useful, e.g. power-ups that make it easier/harder by changing the ball size. [/quote] That is exactly how I was looking at it. I may want to implement a powerup where the ball get's bigger, smallet, whatever... And for that I would need to set the ball's size, so I would have to write a setSize() function. Along the same lines, my ball needs to know where the paddles are for collision detection, so my paddles need "get" functions for their xLocation, yLocation ,height, and width variables. The ball is still detecting for itself when the collision is happening, and it is reversing its own direction, but it has to get that information out of the paddle through four get functions. As a side note: Some of my classes have attributes that are used only within the class and will never ever ever need to be influenced directly from outside. I do not write setters / getters for those. [quote name='iMalc' timestamp='1349763089' post='4988232'] I shall sum up my answer into one 5 letter acronym (google it): YAGNI! [/quote] I did, and it makes perfect sense!
  4. [quote name='Bregma' timestamp='1349665762' post='4987846'] If you're writing software using object-oriented techniques, you rarely need getters and setters. Conversely, if you have a lot of getters and setters, you're not using object-oriented techniques, you're doing structured procedural programming. Don't fool yourself that because you use the 'class' keyword you're necessarily doing anything object-oriented. An object-oriented ball doesn't ever need something else to tell it what its size is. Nothing else needs to know its size. It knows how to collide with walls and paddles. It knows how to draw itself. [/quote] I really like the way you stated that. I guess I have some thinking to do about the way my "objects" handle themselves.
  5. [quote name='ShadowValence' timestamp='1349664497' post='4987843'] Why write a function for something that's never going to change? While this may not occur much in the home-brew & hobby-est areas, I feel that you're adding the ability to mess with your game. You're just asking someone to abuse a function that was never meant to be used. [/quote] I guess I just have this little voice in the back of my head that says "Hey, you might want to have control over that some day... better write a set function for it" [quote name='ShadowValence' timestamp='1349664497' post='4987843'] Sorry if this reads weird - I have a bloody headache. :/ [/quote] Hope your head feels better! [quote name='slicksk8te' timestamp='1349664612' post='4987844'] "Getters" and "Setters" are an interface to the data contained in your class. It is typically good practice to do this when you allow data in the class to be accessed externally. For instance if you had a variable in your Ball class named "speed", you may want to increase this as the game goes on longer. This would require a setter because the game needs to externally increase it. Then lets say you would like to check to see if the ball is off screen. This would require a getter for the position to figure out where the ball is. Of course you could make the data public in the class but this is considered bad style and should be avoided except when absolutley necessary. If it is only used in the class and never changed outside the class it should not have a getter or setter. Hope this helps. [/quote] I does! I appreciate everyone's opinion on the subject. [quote name='Hodgman' timestamp='1349664839' post='4987845'] If you do have a class that needs to have a lot of accessible/modifiable attributes, consider just using a struct with public data members and no functions. [/quote] Are structs still around? I know that you can *technically* use them in C++ but I've never seen them called for in any C++ book I have, and tbh I have NEVER seen a struct used in Java - the language I have the most experience in (which is not saying much). Thanks for all the great insights everyone, keep them coming!
  6. Good point! [img]http://public.gamedev.net//public/style_emoticons/default/smile.png[/img]
  7. Hello all! I've been lurking these forums for a while and finally decided to join up and be a real member of the community. I figured I'd introduce myself by asking everyone a simple question. When writing in an object oriented language, do you write a "getter" and "setter" method for every attribute of an object? What if you never intend to change the value of said attribute? As an example: I'm working on my first game, a clone of pong. my class Ball has an attribute named size. Obviously the size of the ball in a game of pong never changes, but it felt strange to not write a setSize() method. Now I have code in my program that will never be used - and that feels a little strange too. I know that there is no right or wrong answer to this question, I'm just interested in your individual opinions. Take it easy, -Will
  8. I'm currently working on my first game - a clone of pong written in Java. After coding for several hours I had "hit the wall" so to speak, so I went and found a "Write pong in Java" tutorial online. I looked through it, to see how they had tackled the problems I was having trouble with. After understanding their code I went back and continued working on my code with the knowledge I had gained. This way I'm not just doing a copy / paste. I can call the code my own because I have written every line of it myself. All I "took" from the tutorial was the basic concept of how to attack the problem. You might try finding a similar Zork tutorial and scan through it for optimizations that will make your code easier to handel. Happy coding!