Jump to content
  • Advertisement
Sign in to follow this  
cliffius

Sprite Tutorial

This topic is 4397 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, I'm a senior at UF in Digital Arts and Science. Since I feel I haven't learned anything when it comes to programming, I've decided to learn DirectX 9 and make a 2d platform this summer. I've been reading many tutorials online on the basics of windows and directx programming (my favorite being DirectTutorial), but I can't find anything that actually builds a game as a tutorial. I have found sites that show the basics, then give you the final source code of a project. I have a book called Beginning Game Programming by Jonathan Harbour and he uses dx9, visual studio, and sprites to build a 2d game. This is what I want to do, but after spending over an hour typing up example code from the book, it didn't compile, so now I hate him. Now I'm on the hunt again for something. It doesn't have to be just on the web, books work for me too. If you think a 2d platformer (which will be 1 level as I just want to practice) isn't the way to begin, please let me know. Any direction or pointers would be apreciated!

Share this post


Link to post
Share on other sites
Advertisement
I guess a simple 2D platformer would be a good "first game".

Just a simple question... why don't you spend a little time fixing the compilation errors instead of trashing your book / example code?

Good luck

Eric

Share this post


Link to post
Share on other sites
Quote:
Original post by xEricx
I guess a simple 2D platformer would be a good "first game".
I'd, unfortunately, have to disagree and say that sticking as far away from DirectX might be a good idea, considering he apparently hasn't learned anything when it comes to programming. Work with simple console applications until you feel comfortable with your language of choice.

Hello World -> Tic Tac Toe -> Text-Based RPG would seem like a suitable course of action as each project introduces a new feature that you'll have to combat. Hello World introduces you to the language and gets text on the screen. Tic Tac Toe gives you a chance to work with arrays and to get some user input. The Text-Based RPG will let you use your imagination to create something that's completely your own, taking advantage of what you learned with both Hello World and Tic Tac Toe...

Once you feel comfortable with the language, only then will you have a chance to work with something complex as a graphical program. Remember to keep it simple and take it one step at a time!

Share this post


Link to post
Share on other sites
I agree with rob!!! Directx period is a pain in the ass. I can give you a DX9 project that opens a window and an OpenGL project that opens a window and i think i know what API you would choose. OpenGL is so much easier since your saying programming isnt coming to you too well. It takes a huge amount of code just to set up a window compared to OpenGL which is nmothing, and which should be. I love DX and OpenGL, I think it just takes a little more effort for DX, thats not bad, but I switched to OpenGL because i can find a lot of more resources fot it. I'll go back to it one day, until then imma figure out OpenGL. But before you trash your dx book make sure that its not a compiling or linking error. What language are you using besides DX i.e. C++, VB, C# etc...

Share this post


Link to post
Share on other sites
Rob, yeah sorry, from my understanding of what he wrote he was an university student that was not satisfied with the kind of project he was doing, so he decided to learn DX to write a game. I guess I read too fast hehe.

Bluseed... choosing an API on how easy it is to "load a window" isn't the right way to go... especially since its probably only easier with opengl as you use a wrapper to manage the window creation. From the directX samples, there's all you need to easily create windows, look for the DXUT* functions.

Share this post


Link to post
Share on other sites
I guess I exaggerated a little bit. In school, we have learned Java and the types of things we have programmed are usually small little functions that show up on the command prompt. Things like stacks, queues, linked-lists, and sorts.

I guess when I thought about a game, I didn't consider a text-based one because maybe I'm too eager, but I guess that's a good way to secure myself in C++ first.

As for the book, it's just easier to blame the book rather than myself :-p. I tried debugging it, but they were a lot of 'cannot convert parameters' errors, and I just got overwhelmed because they were syntax errors. My theory though is that he is using Directx 9b and I'm using the newest one.

I appreciate the replies though. I've looked at a lot of articles and books that are listed on this site, but when it comes to 2d stuff, they all mention DirectDraw, which to my understanding, is no longer recommnded to use.

I'm looking at getting Introduction to Game Development by Steve Rabin, although I haven't found what language is used in the book yet. But any other recommendations would be appreciated.

Share this post


Link to post
Share on other sites
1) next time you (or anyone) buy a programming book, make sure it comes with a CD or a webpage where you can download the examples.

2) you can post the compile errors here and the related code and we can help you debug and run the game.

3) if you already know the basics of java you can try make a game as a java program/aplet - there is a free online book at Killer Game Programming in Java


Iftah.

Share this post


Link to post
Share on other sites
I'm actually trying to stay away from Java. Maybe it's just a misconception of mine, but it seems most professionals use C++, so that's why I am choosing that. But thanks for the link, it looks really nice (and it's free!). Maybe I should start with that instead.

Share this post


Link to post
Share on other sites
Sign in to follow this  

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