• Content count

  • Joined

  • Last visited

Community Reputation

116 Neutral

About Gaticus

  • Rank
  1. Steps...

    Go ahead and start learning SDL. As long as you can figure out how to link the SDL libs to your app, the actual code for working with SDL is quite simple. I wouldn't suggest SFML for a beginner. You need tut's. As for DirectX or OpenGL. I think you should leave those for now. You should have some fundamental knowledge about graphics and programming before you tackle those. Stick to 2D with SDL and you will have enough to keep you occupied for many months, years even. 2D graphics will give you (some of) the foundation for moving on to 3D.
  2. Using the SDL_gfx library?

    I didn't mean you should change your tools right now, but you should COMPLAIN to your school/teacher about having to use Dev C++. You have paid for them to train you. They are not doing you any favors by teaching you with obscure technology. PS. google for 'how do I install SDL_gfx with Dev C++'
  3. Pre alloc game objects

    Maybe use a linked list instead of an array. edit: Actually, re-reading the question. I think this is just a matter of tunnel vision :) It sounds like you are thinking to just preallocate an array of structs. Instead you allocate an array of pointers to structs (or object instances). It could be a void* array. A linked list would work too and would probably be better in the long run anyway. I just wanted to point out that it's not so different as it seems.
  4. Using the SDL_gfx library?

    I would urge you to try to convince your school to adopt a better IDE. VS2008 is free and is much more standard than Bloodshed. Another one is Eclipse. For SDL programming, you don't even need an IDE. My inclination is to say that if your teacher knows what they are doing, it shouldn't matter much what editor you use. They should be able to inspect your code with any text editor. No IDE is required.
  5. combining array with image

    You need to explain more. Your map just looks like a color pattern.
  6. Hi Need some help understanding this function :o)

    Quote:Original post by adder_noir I've had quite a good introduction to DirectX as that's where I started learning C++ - weird route I know but it's a long story! Unfortunately it's not weird, but it's a steep learning curve. You have to experiment with what interests you though. Nobody is interested in making 1000 variations of hello world :) Quote:Original post by adder_noir Hitting windows stuff though has been like being introduced to real man's programming and as you say I am finding it very difficult. I'd say it's more like peering inside an insane mans brain. :P The biggest headache about windows programming is that there is so many different ways to accomplish the same thing. This is the same reason why I don't recommend relying on books as a primary source. They are by nature, always dated information and offer you only a single perspective. Quote:Original post by adder_noir I don't have much if any choice at the moment I simply have to go on I'm not at a time in my life where I can back off something because it's hard. I did not mean you should give up, certainly not. I mean you should reconsider your learning path. Sometimes it's faster to go around the mountain than over it. There is nothing that demands you use OOP to learn windows programming for example. IMO, C++ is just alot of boiler plate and abstraction when you are still trying to learn core programming concepts. Same is true about windows dialog's and resources. As well, callbacks are not specific to windows programming, or C++. You can experiment with them without having to confuse yourself with DX and GUI code at the same time. Just try to simplify whatever it is you are trying to examine. What is the simplest code you can make to demonstrate the concept you are experimenting with? This is an essential practice for programmers. For learning, for development and for debugging.
  7. Collision detection how to start ?

    The metanet N tutorials are excellent. That's how I got started with vector math and collision detection. The little ragdoll physics in N is really cool :) It's still not clear what you are asking about though. You seem to have a good grasp already. Yes, you would need an array or some other form of list for your sprites so that you could iterate them all. It depends on your own implementation. It could be a basic, linear array or it could be some form of hierarchical list, like a binary, quad or octree. It could be a linked list. Or some combination of.
  8. Hi Need some help understanding this function :o)

    Download the MS SDK and learn to use the documentation. It's worth 100 books on windows programming, not to say that Petzold book will not be worth your money. It definitely is. You may want to get a book on C/++ programming though first and lower your ambition slightly. Not to insult but being frank, you are still battling with general programming, but you are attempting to understand a pretty complex bit of code. Windows programming is a challenge to learn for practiced programmers and DirectX is just (alot) more fuel on the fire. Take a step back and work on developing your general programming skills further. Callbacks are a fairly advanced concept, so I would not expect you to 'figure it out yourself', but given the complexity of the code you are asking about, I would expect you to know how to lookup definitions in your source code or API documentation for things like WM_INITDIALOG, SendMessage, BM_SETCHECK, BST_CHECKED and INT_PTR. This tells me you aren't quite ready for Windows programming, definitely shouldn't be confusing yourself with DirectX yet and maybe you should even avoid C++ for now and stick to C. SDL is a great way for you to get wet without having to dive in head first. It is FAR simpler to deal with than Windows GUI and DX, and cross-platform too as a bonus. In any case, I strongly suggest you hone your search-fu and accept the fact that the internet is your best source for information to learn programming. If books are how you learn best, that's great but they do not even come close to the value and breadth of all the info at your fingertips. I apologize if this all sounds like an attack. It is not, but hopefully constructive advice for you. I'd be happy to help you in the right direction if you send me a private msg, but it is pretty clear that you are biting off more than you can chew with the code you posted. Merry Christmas. Cheers!
  9. It depends on your game. Is it 2D or 3D? If it's 2D is it tile or vector based? If it's tile-based, then you only need to test against the tiles that the player is touching. If it's vector-based 2D or 3D, you pretty much have to check against all objects, but there is different ways you can check. You can start with faster, more generalized checks and work your way up to slower, more precise checks as you filter out objects by using different collision tests.