Spippo

Members
  • Content count

    78
  • Joined

  • Last visited

Community Reputation

158 Neutral

About Spippo

  • Rank
    Member
  1. Looking for a good tutorial

    It's not mine :p
  2. Looking for a good tutorial

    OK, thanks, that will help me to start. But the flipping only works for left-right, not for up-down.
  3. Hi, I'm looking for a good tutorial to draw a horse for a game. I want a horse in 4 directions (up, left, right, down). Also 4 or 5 different positions, so that i can make it walk in a certain direction by switching through the positions. Anyone knows a good tutorial where it's shown how to draw a horse like that? In Photoshop, or even a 3D program like 3DS MAX or Blender? Thanks Something like this, but nicer quality and no men:
  4. Hi, Is it possible to play a video (an ".mpg", ".swf", or any other format) in a SDL surface? Can you also give an example? Thanks
  5. Hi, I have a little question. For my simple racing gmae, i created a new bitmap-class, which draws the car on the screen, in the different rotations. To draw the car in a certain direction, I use the matrix rotations on each point like this: x = x*cos(PI*m_iRotation/360.0)-y*sin(PI*m_iRotation/360.0); y = x*sin(PI*m_iRotation/360.0)+y*cos(PI*m_iRotation/360.0); This works pretty good, to turn the car, but it gives a not so nice car. It draws some strange points, like this: Is there a better way to draw the sprite into a direction?
  6. Need Help Installing SDL With MinGW

    Have a look at this: click here This is how to setup SDL in Linux. If you want to use SDL with some other development kit, look here: click here
  7. I did some checks after every step, and I noticed that i get the first error after Quote: HRSRC hrsrc = FindResource(ownModuleHandle, MAKEINTRESOURCE(resID), RT_RCDATA); If I change the RT_RCDATA to RT_BITMAP, I only get an error after: Quote: image = SDL_LoadBMP_RW(rw, 0); (It returns a NULL pointer) Anyone got an idea?
  8. I'm working with MS Visual Studio .NET 2003, and I made a new Visual Studio C++ Project (a empty win32 console project). SDL is working fine, and I'm getting my images at my screen, when I'm using the SDL_LoadBMP function. Now I want to use Images I included in my resource-file, but it doesn't work that well. I made this small function, to load an image out of a resource, but I still get a black screen, when I use it as a background. So it doesn't load the image, what am I doing wrong? SDL_Surface* GetBitmap(int resID) { SDL_Surface *image; HMODULE ownModuleHandle = GetModuleHandle(NULL); HRSRC hrsrc = FindResource(ownModuleHandle, MAKEINTRESOURCE(resID), RT_RCDATA); DWORD size = SizeofResource(ownModuleHandle,hrsrc); HGLOBAL hglob = LoadResource(ownModuleHandle,hrsrc); void *buf = LockResource(hglob); SDL_RWops *rw; rw = SDL_RWFromMem(buf, size); image = SDL_LoadBMP_RW(rw, 0); SDL_FreeRW(rw); return image; }
  9. C++: Why to use pointers?

    How about this problem (I don't know if someone said it already, i didn't read all the replies): if you create a function that gives an int back, you can use it like this: int myint = myfunction(param1, param2, ...); But what if you want to make a function that need to returns 2 or more value's, you can use pointers like this: myfunction(&myvar1, &myvar2, &myvar3, ..., myparam1, myparam2, ...); that way you can also access myvar1, ... an change those values.
  10. Selecting an Engine

    Hmm, if you are making a 3D game, it would say, use an excisting engine. But I would also use an other library, like DirectX (D3D) or openGL. SDL is a great library, but it's a simple one, with only a few posibilities. In my opinion it's not good for 3D game programming. About the language, that is totaly up to you. I prefer C++, because it's the language I program the most in. But if you prefer Perl, VB, ... then you should use it. You can make games in (almost) every programming language.
  11. Selecting an Engine

    Hi, why not make your own GameEngine. From your post, i can see that you want to work with SDL, so you are gonna make a 2D game, right? Creating your own 2D GameEngine isn't that hard, I made a simply one myself. If you want, i'll give it to you. [EDIT] My gameEngine is for SDL and C++
  12. Tic Tac Toe. Am I on the right track?

    What if you are playing against the computer? There isn't a computerplace function or something like that. BTW: If you make this you also need to include some simple AI for this, not just a random place. For the rest: a nice start, good use of structs and enums (I like that, but most beginners don't use it). Keep up the good work
  13. First game - submitted for feedback

    There are a lot of ways to refresh the screen. The one I use the most is System("CLS"); To use header-files, you just need to write a .h-file, and add it in your project. Then in the .cpp file, at the top, you also need to include it with #include "myheader.h" // Use the real header-file This way you can write your roll() function in the header, and include this header file with other games and use it over and over.
  14. First game - submitted for feedback

    And another remark: I think you are pretty new to programming in C++ (sorry if i'm wrong), but also a good thing would be: Create a class for players or so, with the name, score, value of the dice, ... in it. In the main, use that class to make a player and a computer or something like that. Because working with classes is very handy in game development, so try to use them as much as posible.
  15. First game - submitted for feedback

    Not bad for a first game, but here are some points you can work on: - refresh the screen every time you enter 'y' to start a new round. - Try to make some difficult levels where you can choose from, like 'easy', 'medium', 'hard'. And make sure that in 'easy'-mode you get more chance in winning then in 'medium' and so on. - Make a file on your HD where you store the best 10 players in, so you can make a high-score - ... These are all small thing to add in a tekst based game, but it will give you a good excersie (or how do you spell it?) on what you should do when you make a graphical game. Also as a next step, you could try to make this game graphical, with the help of a simple multimedia library, like SDL or so.