Jump to content
  • Advertisement

Jon Hellebuyck

Member
  • Content Count

    20
  • Joined

  • Last visited

Community Reputation

100 Neutral

About Jon Hellebuyck

  • Rank
    Member
  1. Jon Hellebuyck

    2D game, best way?

    I recommend using Direct3D for 2D. I was in your shoes two years ago and looked at things like DirectDraw, but there are so many advantages to using 3D to do 2D that I decided to use 3D and haven't looked back. With 3D you can draw 2D images to the screen with alpha and transparent areas, using a textured quad (triangle strip) or blitting to the back buffer using CopyRects(). As a bonus you can use the 3D matrix functionality to do rotation, scaling, and translation, all hardware accelerated. With that and all the other things that come with using textured quads (filtering, lighting, etc.) that you might want to use, 3D comes in pretty handy even if you never use that third dimension. Speaking of the third dimension, that's another reason I'm glad I went with 3D: learning how to use vertices. You know you want to do 2D now, but there may come a day when you decide you want to do something with 3D, and using 3D for 2D will help you build a foundation for that. While setting up textured quads you'll learn about vertex coordinates, texture UV coordinates, and color modulation. Once you understand those concepts it becomes much easier to make the jump to 3D. As for books, I've got a recommendation but it's out-of-print and possibly out-of-date. I used Ernest Pazera's "Focus on 2D in Direct3D." It's tailor-made for what you're doing, but it focuses on DX8.1, so there may be newer things about DirectX that make 2D easier that wouldn't be covered in it. It's probably worth looking for a newer book that covers whatever advances there have been in DX10 and DX11 for 2D, if any.
  2. 1. Check Apple's developer site for the latest on this. (http://developer.apple.com) The older book I have suggests that, while registering as an individual is easier (less information to provide), registering as a company has its advantages: your company name appears in the App Store instead of your own name, and you can add team members. Again, my info is old, so it's worth checking Apple's site for the latest on this. 2. Category ("Game" in your case) and up to two subcategories (arcade, action, etc.). You rate it yourself for things like cartoon or realistic violence, sex, etc., though as zacaj said I think Apple can change this if they disagree with your rating. 3. Seven business days for my first game, five for my second. I think two weeks is the general expectation for turnaround. 4. As zacaj said, it's sort of vague, but it sounds like Apple will work with you. Smuggle Truck and Unpleasant Horse were initially rejected, but the developers made changes (Smuggle Truck is now called Snuggle Truck and features stuffed animals) that Apple deemed acceptable, and now they're both in the App Store. 5. Not sure.
  3. Jon Hellebuyck

    Psychopomp Free for iPhone

    Psychopomp Free for the iPhone is now available in the iTunes App Store. A "lite" version of Psychopomp, this features the first seven levels of the full version. The game itself is of the arcade variety and plays a bit like Frogger, although its theme is darker. The souls of the recently departed line up on the shore near the graveyard, waiting to be ferried to the afterlife. As the psychopomp it is your job to make sure they get there safely. Steer clear of hungry reavers lurking beneath the surface. Stay away from stray skeletons lest one of your souls decides to possess it in hopes of cheating death. Beware the caskets washed up from graves dug too shallow. Evade the felled tree trunks scrawled with ashen symbols of dark sorcery. Deliver your souls away from the pentagrams. Should they set foot on one, they will burst into flame, trying to drag their departed brethren down with them. iTunes store link: http://itunes.apple....02824?mt=8&ls=1 Game page link: http://www.mode13.com/psy_main.html
  4. Jon Hellebuyck

    Per-tile or tile group rendering

    Group the tiles by texture and render the quad using its offset into the grid's vertex buffer. This way you're only loading your vertices once (as the entire grid in a single buffer), and you're switching textures as seldom as possible. I just keep a separate 2D int array with texture references that matches the dimensions of my grid. Switching textures and vertex buffers introduces enough overhead that using strategies like this can speed things up significantly.
  5. Jon Hellebuyck

    Mix sound for iPhone headphones or speaker?

    That makes sense. As long as there's a general expectation that headphones are the better audio experience, then the speaker doesn't have to deliver fantastic sound. I just wasn't sure how prevalent that expectation was.
  6. Jon Hellebuyck

    Psychopomp for iPhone

    I've just released Psychopomp for the iPhone. It plays a bit like Frogger, but it has a darker feel to it. You play as the ferryman on the river Styx, and you must ferry souls from the graveyard to the afterlife without losing them or sinking your ship. Arcade fun in the underworld! Screen shots: http://www.mode13.co...reen_shots.html Game page: http://www.mode13.com/psy_main.html
  7. Jon Hellebuyck

    [XnA] 2D Lighting - How is it done?

    I'm an old Direct3D user rather than XnA, but hopefully a lot of this translates to what you're doing. I wrote a 2D engine using textured quads (triangle strips) and added the sort of 2D lighting shown in your video. I did it by altering the vertex colors and intensities to simulate lighting. First I added a "light" (or several) to a scene, which was really just a 2D x,y coordinate, an RGB color, an intensity, and a range. I made a class called "light" to store that data. Since 2D textured quads are rendered using the texture colors modulated by the vertex colors, your vertex colors are normally all white (red is 255, green is 255, blue is 255) if you want to see the original texture. If you want to darken the texture, you can darken the vertex colors (something like 127, 127, 127) and your texture will appear darker. I used this texture modulation feature to do my 2D lighting. Each scene refresh I would set all my scene vertices to an unlit "ambient" level. This could be a little below 255, 255, 255, if I want very subtle lighting or 0, 0, 0, if I want the player to only see what is being lit (like the cavern levels in your video). Then I checked the distance of each light in the scene against each vertex in the scene and, if the light affected the vertex (by that I mean that it was close enough), I would add that light's color and intensity to the vertex's "ambient" color. Once I'm done accumulating the light effects on each vertex, I use the accumulated color to render the quad, and it appears to be lit. This method does have its limitations, but it will get you simple 2D colored per-vertex lighting. Again, I'm an old-school D3D guy (DX8.1), so maybe they've come up with an easier way to do 2D lighting since then with XnA.
  8. While testing my sound effects and music for my upcoming iPhone game I've noticed that the external speaker of my test device (iPod Touch) does a great job of reproducing high notes and bright sounds, but doesn't seem to do much with low sounds or ambient noise with any bass in it. On the other hand, if I use the headphones, I can hear the bass and low sounds, but the bright sounds are a little less apparent. Do most devs mix sounds favoring the speaker's sound qualities or do you favor the headphones? On one hand I can picture most gamers using the external speaker, playing it as a portable gaming device. On the other hand, it is an iPod, so if they're listening to their playlist while they play the game, maybe they've got their headphones on. Ultimately I'll try to find a compromise that makes for a decent experience either way, but I'm wondering if others have favored one or the other, and why?
  9. Jon Hellebuyck

    2D drawings or 3D renderings

    Like everyone else who has commented, I'm better at 3D than 2D, and I decided to model everything in 3D and render it to sprites / animations. The big challenge for me was the "clarity" problem you mentioned in getting detail to show up in a 60 x 60 sprite. In the beginning I was doing models with a decent level of polygons and reasonably high-resolution textures. I felt like I needed to because I was rendering to the standard render view while I was testing the look. What surprised me was how much of that detail I lost the first time I switched the output resolution to the actual sprite size. Entire pieces of geometry I had added would be lost to simple antialiasing. Textures that had great detail at 640 x 480 would simply render as whatever the most prominent color was at 60 x 60. After that humbling realization I started modeling and shading to suit my final resolution, and it saved me a lot of time on the art side of things. Also, I found myself over-emphasizing things on my models to make sure it would show up in the low-res render. I still ended up doing work in a 2D raster editor to tweak some of the renderings, but working mostly in 3D saved me animation time and having to work with my inferior 2D art skills.
  10. Jon Hellebuyck

    DirectX 2D Game Tutorial?

    I went the "textured quad" (triangle strips) route as well. I use DX8 though, which I don't think has D3DSprites, so I can't give you a comparison of the two. While I had a tough time finding tutorials, I did manage to pick up a great book called 2D in Direct 3D by Ernest Pazera. It uses DX8, but I imagine most of the topics (quads, alpha, lighting, blitting, etc.) are still relevant. If you can find a used copy I recommend it, or perhaps there's a newer version out there. Other than that I ended up typing "ortho 2D" and "directX textured quad" into Google a lot, and I can't think of any real enlightening tutorials. Mostly I ended up finding instructive code samples.
  11. Jon Hellebuyck

    3d modeling software for Beginners

    I'll recommend Caligari's trueSpace. It's free (used to be mid-market priced, but was bought by Microsoft and eventually made free), and I think it has a very intuitive interface. It's what I learned on before moving to Maya. Also, according to the site, it will export to the x-file format for XNA. To download it go to www.caligari.com
  12. Jon Hellebuyck

    Unresolved external symbol c_dfDIKeyboard

    I used to get that error when compiling with Borland, but I'm surprised you're seeing it with MS Visual C++. The fix for Borland was a library file called c_dinput.lib. The keyboard (as well as mouse) constants are defined as "extern" in dinput.h, but for some reason the reference wasn't in dinput8.lib if you made a Borland-compatible version. Again, I'm not sure you should need this file with a Microsoft compiler, but it's something to try anyway. The other thing I thought I read about with initguid.h was that if you include it before any of your D3D headers you don't need to add dxguid.lib to your project. Sounds like that's counter to what others have told you though. This link talks about initguid.h http://support.microsoft.com/kb/130869 I'm sorry all of this is so vague. It's been a while since I've researched this error. I hope some of this helps.
  13. Jon Hellebuyck

    Smoothing out turns in pathfinding

    I was having the same problem you are having with repeat visits to the same place using A*, so I created a separate grid to track where I'd already been. Something like: int aStarCost[gridWidth][gridHeight]; //actual grid values used to find path bool beenThereAlready[gridWidth][gridHeight]; //true if the square is chosen I started with all the elements of beenThereAlready set to false, then set each one to true if I chose it as a point along the path. When choosing the next point in the path, I would look both at the total A* cost and also whether the point had already been visited. If it was true, I would ignore it as an option.
  14. Jon Hellebuyck

    DirectX8 and screenshots

    I'm not familiar with DX8 for VB, but from the looks of it "r" is the rectangle structure that specifies how much of the front buffer (screen) surface information is saved to the file. Currently the rectangle you've specified starts at the upper left-hand corner of the screen: With r .Left = 0 .Top = 0 and captures the entire width and height of the screen: .Right = DispMode.Width .bottom = DispMode.Height If you change your Left and Top values to match the upper left-most pixel of the canvas of the window you want to capture, and change Right and Bottom to be the width and height of that canvas, I would think it should work.
  15. Jon Hellebuyck

    Looking for 2D AA (jaggy removal) filter/code...

    If I'm correctly understanding what you're trying to do, I think you could perform the anti-aliasing on the alpha masks in whichever image editor you used to create them. Then, when your engine does the alpha blending, the edge pixels are semi-transparent because your alpha channel contains various shades of grey at the edges rather than the transition from white to black. I know you're going for smooth rather than transparent, but the semi-transparent edge would give you the smoothness without the expense of AA computation on the texture (since you pre-computed it in your image editor).
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!