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

JWalsh

Moderators
  • Content count

    1562
  • Joined

  • Last visited

Community Reputation

498 Neutral

About JWalsh

  • Rank
    Moderator

Personal Information

  • Location
    Issaquah, WA
  1. Indeed. Another interesting take on this was from the 2012 DigiPen student project "Perspective". It's a 2D platformer, however you can rotate the camera and zoom in and out in order to change perspective. This allowed you to solve puzzles such as jumping over too large of gaps, or climbing under too small of walls just by changing the perspective.   http://www.youtube.com/watch?v=SS4r9Fq3beU
  2. In your original post you asked about compatibility issues between GLM and Direct3D. If you're going to be using Direct3D for your graphics, just use DirectXMath for your math library.   DirectXMath is the public version of XNA Math - the math library that's part of the Xbox 360 Dev Kit (XDK) used by game companies to develop Xbox 360 games. It already utilizes SSE and SSE2 instructions and is about as fast as you can get.   Cheers and good luck!
  3. I find that all books on C# say about the same thing, as the language is well defined. The "information" is the same regardless of which book you read, it's just a matter of how the individual book presents it. With that in mind, it's often best to go straight to the source. Here are some informational links and online course which should hold the answers to all your questions. The first is the course, the second link is the homepage to the MVA course, and then the links get more and more technical from there, ending with the C# specification. It's the most terse to read, but there's no better authority than the language spec itself. And of course, as you learn more about C#, feel free to post your questions here and the community will be happy to answer your questions.   Programming in C# JumpStart (a MVA course) C# Virtual Academy C# Programming Guide C# Developer Center C# Reference C# Specificiation
  4. Check out [url="http://fw1.codeplex.com/"]Ruefelt's OpenSource D3D Font Library[/url]. It's licensed under the MIT License. There's [url="http://www.gamedev.net/topic/597917-d3d11-drawing-text/"]discussion about it[/url] here on gamedev.net as well. Cheers and Good luck!
  5. [quote name='obizues' timestamp='1345052537' post='4969883'] Whelp! Back to the real world! Thank you very much for all this feedback I appreciate it! [/quote] I tend to be on the more nitpicky side with my code reviews, but I feel it helps to develop good habits early on. Don't feel like it was a smack-down. Learning is a process and the fact you started and finished a game - even Pong, is a huge step, as many people never even get that far. Again, kudos to you, and please don't get discouraged, that wasn't my intention. [quote name='obizues' timestamp='1345052537' post='4969883'] The reason I did it this way, was because I felt like I would have to guess and check over and over with whether or not the arrow was ligned up correctly. Is there an easier way to do this? [/quote] SpriteBatch allows you to specify the origin of an image as well as it's position. By default, the origin is in the top-left corner. However, if you move it to the left-center or center-center of an image, then you can vertically align to sprites by drawing them at the same vertical position. [quote name='obizues' timestamp='1345052537' post='4969883'] I realized about half way in the project I wasn't fully using objects and classes like I should. Part of the reason is the fact that I am not entirely sure how C# handles it compared to Java, so I thought I'd stay away from it until I read more about it. I completely agree with everything you said. [/quote] C# and Java treat classes about the same. The only real difference is that Java doesn't have structs, so everything is pass-by-reference. If something feels like it should be a class, go ahead and make it one. [quote name='obizues' timestamp='1345052537' post='4969883'] I'm not familiar with this design pattern. I definietely need to look this up and see what you mean. I just basically tried to use my own logic to do what I was trying to accomplish. [/quote] You can bing/google the design pattern for information on how to implement it. There's plenty of C# implementations out there as well for reference. Also, here's the [url="http://xbox.create.msdn.com/en-US/education/catalog/sample/game_state_management"]Game State Management[/url] sample on the XBLIG website. Look it over. [quote name='obizues' timestamp='1345052537' post='4969883'] I agree completely on this end. I need to perform those calculations once. I am not familiar with "Enum" and how it helps the situation. [/quote] Enums are the same in C# and Java I believe. They are a way of defining a set of things in code, which can be identified by their symbolic values. Such as having an enum of dates, and giving them the values Days.Monday, Days.Tuesday, etc... See the [url="http://msdn.microsoft.com/en-us/library/system.enum.aspx"]C# Documentation[/url] for a full description with plenty of examples. Scroll down pass the member information. [quote name='obizues' timestamp='1345052537' post='4969883'] The "finalBallLocation" is meant to calculate where the ball is going to end up after the collision with the computer controlled left paddle. Then the right paddle moves to that spot on the Y-axis accordingly. [/quote] As an alternative, you can have the AI attempt to move up or down based on the "current" vertical position of the ball. So if the ball is at 200y, it'll change direction so the center is at 200y. Then, if you only update the AI every 10, 5, 2, 1, etc... updates, you can make the computer appear "smarter", as it'll respond more quickly to the current state. Nice way to provide a progressively more challenging AI. [quote name='obizues' timestamp='1345052537' post='4969883'] Just out of curiosity how did you calculate how many lines of code were written, and what would you recommend as a good % for commenting? [/quote] I did a find for //, and then scrolled to the bottom of the file to see how many lines of code there was. Nothing magical, or even relatively accurate. There's no ideal % or ratio that I know of for comments to code. In general, the goal is to make the code self-documenting, such that reading variable, class, and method names makes it 100% clear what is happening at a single glance. But, if that's not the case, either because of a complex algorithm, or a particularly interesting implementation detail, it's a good idea to add a comment. If I had to guess, I'd say my ratio is at about 10-20% or 1:7 comments per lines of code. Again, there's no magic number. [quote name='obizues' timestamp='1345052537' post='4969883'] I apprecaite ALL of these feedback, and it's a good slap back into reality, and to remind me where I am in the process. Would you recommend I go back and make changes to this game to reflect this feedback, or to just put it into practice on my next project? [/quote] Glad it helps, but please don't view it as a slap. They were just some friendly suggestions or direction, not reprimands. Go back and make the changes if you want practice in working with enums, using Finite State Machines, or object-oriented programming. If not, just incorporate those things into your toolbox as you move forward. Cheers!
  6. DX11

    [quote name='Mike.Popoloski' timestamp='1345046739' post='4969865']<br />What is this, an advertisement for WinDbg? I know what it does, I don't need you to start throwing random commands at me.<br />[/quote] No. It's not an advertisement. It was my validation for why I think WinDbg is the best tool for doing low-level debugging of .NET. It was no more an advertisement than your mentioning ANTS or dotTrace. The commands weren't for you, I wrongly assumed you were an expert at WinDbg and didn't need them. The commands are for any readers who want to research why WinDbg is so powerful. [quote name='Mike.Popoloski' timestamp='1345046739' post='4969865']<br />I'm glad you get some weird orgasmic glow when using it...<br />[/quote] It amazes me how, in spite of how small the industry is, people still feel like it makes sense to treat others with disrespect. Rather than being a douche, why not say "interesting... you seem to feel this tool is very powerful, and you work closely with some of the original .NET developers, perhaps there's something I may be missing." But instead, you jump right to "that's ridiculous". I guess your perspective changes with age and experience. /sigh
  7. DX11

    [quote name='Mike.Popoloski' timestamp='1345007515' post='4969736'] Using WinDbg here is overkill, and claiming that it's the "only good way to view the garbage collected heap" is a little ridiculous; [/quote] You don't really know if it's overkill. At this point we don't know what exactly he's trying to do. DebugView works great if he's just wanting to see the Debug messages, but if he wants to set breakpoints, step, make changes to memory, etc... he's back to needing a debugger. My aim was to point out the WinDBG is better at debugging certain problems than Visual Studio (and other tools). It's all about using the right tool for the job. If you're not particularly fond of WinDBG's !DumpHeap or !EEHeap commands, that's cool. You're entitled to think my opinion is ridiculous. But I say that WinDBG is the only good way because WinDBG has tons of support for working with the heap. Being able to see how much memory is in each generation, where the pages start and end, being able to see how many objects of each type are in the heap (and where), and cross-reference them to see how much memory is being used by each and in total. Additionally, you can evaluate the class table for each type, etc... Heck, you can even investigate the LOH. And that's not to speak of any of WinDBG's other great commands. !Analyze, DumpStack, EEStack, DO, GCRoot, etc... I never feel more in control of the run-time and what it's up to than when using WinDBG. If you know of another tools that gives you that, I'm more than happy to change my perspective. [quote name='Mike.Popoloski' timestamp='1345007515' post='4969736'] there are plenty of excellent tools available that can visualize the GC heap in a much more intuitive fashion than WinDbg. [/quote] I honestly haven't ever seen one, but would love some recommendations. I'm always interested in learning about new tools. Mark's tools are fantastic.
  8. DX11

    Hey Shane, I [url="http://msdn.microsoft.com/en-us/library/tdw0c6sf.aspx"]see what you mean[/url] about not supporting mixed mode debugging. With the DX debug mode enabled, are you still seeing debug output in the output console? what do the exceptions look like that you're receiving? Also, you may try installing Visual C++ 2010 Express edition. Having both on your machine may give you more options. When an exception is thrown, you may just try attaching with the Visual C++ Native debugger if you can. And if all else fails, there is [url="http://msdn.microsoft.com/en-us/windows/hardware/gg463009.aspx"]WinDBG[/url]. It's a difficult, somewhat cumbersome tool to learn to use (especially with managed code as it requires using the SOS extension), but is by far the most powerful debugger in the world. It is in fact the only good way to view the garbage collected heap for your application while running.
  9. [quote name='capn_midnight' timestamp='1345005261' post='4969727'] try the For Beginners forum [/quote] Good suggestion, moved to FB. [quote name='jdelcin' timestamp='1345004219' post='4969722'] Is there a good book, or tutorial for c++ game gui programming. [/quote] What API are you using for 2D or 3D graphics? Since "Game UI" is generally handled by the 2D component of whatever engine or Graphics API you're using, you'll want to start there specifically.
  10. DX11

    [quote name='laztrezort' timestamp='1345004365' post='4969724'] Visual Express appearently does not support unmanaged debugging. [/quote] Not sure what you mean by this. I've had no problem setting breakpoints, stepping through code, evaluating memory, callstacks, etc... What problems are you encountering? Also, which language and version of Visual Studio Express are using - VS 2008, 2010, or 2012? If you can provide more information about the problems you're facing, I'm sure we can find a solution.
  11. Ok Chris, I got a chance to look at your Pong game. Here's some feedback if you're interested. [b]Assets[/b][list] [*]Don't duplicate art assets just to put an arrow in a different place in the menu. Instead, make the arrow it's own sprite, create one asset for the menu, then draw the arrow next to the menu item that is currently active. [*]Unless you're looking for very stylized text, it's often better to use SpriteFont to draw text against menu background, rather than putting the text in the image directly. Then, if you decide to change the text, localize it, etc... it just requires changing a line of code, not re-visiting an image editing program. [*]SpriteBatch works by drawing textures to the screen via 2D pre-transformed quads. Each time you switch textures for a different sprite, it has to do a sort of context switch. So instead of creating sprites as different image files, put them all in the same image file and use source rectangles to identify where in the sprite sheet to pull the texture from. This works for sprite sheets up to about 1024x1024. Anything bigger and you risk video cards not being able to load it effectively. [/list] [b]Objects & Classes[/b] In your program you group data together such as this: [source lang="csharp"]int ballSpeedX = 5; int ballSpeedY = 1; int ballDirectionY = -1; int finalBallLocationX = -1; int finalBallLocationY = -1;[/source] This is the perfect place to create a Ball class. You can add to it [font=courier new,courier,monospace]ballTexture[/font] as well. In your update method you have several if-else statements to determine what the current state is and then process the logic for that state. Additionally, in your Draw method you have several if statements for what to draw. Instead, look at the State Machine design pattern. Each of those states can be their own class, and then inside of [font=courier new,courier,monospace]Game.Update()[/font] you'd just call [font=courier new,courier,monospace]curretState.Update()[/font]. In [font=courier new,courier,monospace]Game.Draw()[/font] you'd call [font=courier new,courier,monospace]curretState.Draw()[/font]. The logic for switching between states is then embedded within each state, and your Game's Update and Draw methods become nice and clean. [b]Code Cleanliness[/b] You call [font=courier new,courier,monospace]KeyboardState gameState = Keyboard.GetState();[/font] in each of your game state blocks. Instead, just call it once at the beginning of your update method, and then use the keyboard state as necessary in the rest of the method. Even if you don't use an object to represent your game state code, you should switch from String to Enum for your game states. Enum is more type-safe, as string will allow the state to be literally any string value. Your use of [font=courier new,courier,monospace]lastState [/font]and [font=courier new,courier,monospace]state [/font]can be restructured so you don't really need lastState except when entering or leaving a menu screen. I'm not quite sure why you have [font=courier new,courier,monospace]finalBallLocation[/font]. I see you calculate it's value in several places, but don't immediately see it being used for much. There are several complicated if-statements, especially in the collision detection section. It's a good idea to make the code self-documenting to break those clauses up into smaller chunks and wrap them in methods. Perform static calculations once, and save the values. There are several places where you perform the following: [CODE] ball.Y = Window.ClientBounds.Height / 2 - ballTexture.Height / 2; ball.X = Window.ClientBounds.Width / 2 - ballTexture.Width / 2; pos1.Y = Window.ClientBounds.Height / 2 - texture.Height / 2; pos2.Y = Window.ClientBounds.Height / 2 - texture.Height / 2; [/CODE] Not only is the code present in your source file more than once, but it's called each time you enter the restart state, or exit state, even though it's a known value from the moment your application loads the texture. So instead, perform the above calculations in Initialize or LoadContent so you only perform the calculations once. The same goes for things like this: [CODE] spriteBatch.Draw(player2Restart, new Vector2(Window.ClientBounds.Width / 2 - player1Main.Width / 2, Window.ClientBounds.Height / 2 - player2Main.Height / 2), Color.White); [/CODE] That's a lot of calculations being performed each Draw, considering those are all known values. Compute them once, then keep re-using the calculated value. This is easiest if you create a Sprite class. Then you can create an instance of a Sprite for each object, set it's texture, position, etc... once, and just keep calling Draw on the sprite. [b]Commenting[/b] Your code is over 800 lines, and there's about 5% commenting. Most of which are method headers that were auto-generated for you. If you're doing a complex if-checks, or if something isn't immediately readable, add a comment. Also, it's good to use comments to tell [b]why[/b] you're doing something, not just [b]what[/b].
  12. [quote name='obizues' timestamp='1344904793' post='4969266']<br />I'm actually trying to work on a "top down" hack and slash zelda type clone after I finish. I have someone helping me with basic sprites and things like that. Do you think that's an okay idea?<br />[/quote] In truth, I think a Zelda style game is a pretty large jump from Pong. To implement a Zelda clone you need several systems that don't exist in pong or similar games. These include: [list] [*]Collision Map [*]2D frame-based animation [*]2D texture sheets [*]RPG Gameplay mechanics [*]AI [*]Multiple Sound FX [*]More UI elements [*]A screen manager to deal with inventory/stat screen. [/list] [quote name='obizues' timestamp='1344904793' post='4969266'] How in the future do you suggest I find someone to help provide the art for the games I'm trying to make? For example I found a lot of free sprites, but I couldn't find any with movement and attacking sprite sheets. [/quote] Here on GDNet you can post in the Help Wanted section. In a search engine you can search for "Sprite Sheets," however, keep in mind that all the art assets you get are copyrighted, and cannot be used in a game (that you distribute) without permission from the creator. So it's fine to use those for your own projects to learn from, but you can't use them beyond that. In truth, finding good 2D and 3D artists is the hardest part of starting your own larger game projects. Which is why I recommend postponing that as long as you can. A breakout clone, like Pong, doesn't really require any art assets. A few bricks, a ball, a couple paddles, and you've got all you need.
  13. [quote name='obizues' timestamp='1344363361' post='4967081'] I've made pong with XNA and I'd like to show it to you and recieve some feedback. [/quote] Congrats, man! Getting started is the hardest part. Finishing is a close 2nd. [img]http://public.gamedev.net//public/style_emoticons/default/smile.png[/img] [quote name='obizues' timestamp='1344363361' post='4967081'] I think overall I learned a good idea about the game loop and how the overall process works. I also learned a little about C# and XNA's syntax and how it handles certain things. [/quote] Awesome. It sounds like you're headed down the right path. That's all you're really supposed to learn with Pong. [quote name='obizues' timestamp='1344363361' post='4967081'] Is there a certain way to export it as anything else but a .exe? How do you suggest I post it on here? [/quote] In general, I prefer receiving a zip file containing all source and assets. Then I can compile it on my own and run it. I generally don't like downloading &amp; running executable files unless it's from a trusted source. Who knows what can be in those things! [img]http://public.gamedev.net//public/style_emoticons/default/smile.png[/img] And don't take it personally, it's entirely possible someone could distribute a virus without even realizing it. [quote name='obizues' timestamp='1344363361' post='4967081'] When you have a chance to look at it as well, do you suggest I go back and try and code the AI and start and completion screen? I think these are different game states, and I havent' taken the time to learn about them yet. I'm following O'Reilly's XNA 4.0 book, and took a massive vacation after Chapter 3 to see how far I could get in pong and surprised myself. I assume I'll continue to learn more as I read more. [/quote] I recommend you keep iterating on it as much as possible. Working your way through a tutorial or book is a great way to learn and get started, but to really benefit you need to get in and play with the code yourself - make changes, add your own style to the game, etc.. Here's some ideas: [list] [*]Add some enemy AI (that can be beaten) [*]Make obstacles slowly fall from the ceiling which reflects the ball back [*]Make the ball reflect differently depending on where on the paddle it hits [*]Add power-ups like [b]Breakout[/b] that causes the ball to speed up/slow down, or makes the paddles change size [*]Make the ball speed up each time it bounces [*]Add title screen /w main menu and a high score screen (implement high scores) [*]Make it so each time the ball hits the paddle it chips away a little from the paddle, making it 1 pixel narrower at the point of impact [*]Add multiplayer via TCP/IP [*]... [/list] Once you've gotten it as far as you can go, it's an easy transition from Pong to Breakout. That's the game I recommend people try second, as it shares a lot of common code and assets with Pong. Cheers!
  14. You're right. I don't see a lot of examples online. I'll add deferred shading with DirectX 11 to my [url="http://gamedevelopedia.com/post/2012/07/25/Future-Topics.aspx"]list of upcoming tutorials[/url]. Cheers!