Advertisement Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

122 Neutral

About apollodude217

  • Rank
  1. I'm not sure about the line: g_fUpdateRate = 1000.0f / static_cast<float>( iElapsedUpdateTicks ); I think you want a regular-ol', C-style unary cast, eh? The value is decided at runtime, so it should NOT be cast statically (at compile time), eh? That will give you garbage. Someone please correct me if I'm wrong.
  2. apollodude217

    AI, God, and Reason

    I think our creation of AI agents can be used as an illustration for our relationship to God in various ways. How? I'll leave that one up to you.
  3. apollodude217

    Game Programming

    Eventually, learning how to do object-oriented-style things in plain ol' C will be necessary (e.g., use structs instead of classes, unions instead of polymorphism, and allocate and deallocate explicitly as there are no constructors or destructors in structs). Such knowledge of implementations / understanding of concepts will _likely_ pay off. Learning SDL is one way to see this demonstrated in a very simple way. BUT, learning 3D math, vector math, etc. is more crucial; you WILL need such knowledge in programming or, likely, even designing 3D games. There is a big push (I have been told) toward using C# in game programming, so language schtuff wouldn't be toooo big a concern to me.
  4. apollodude217

    C# Tutorials

    Quote:Original post by KDSBest in my opinion C# sucks, the .NET library is really nice but in C# you have extra commands to make the code not decompilable. If you don't do that it is possible to decompile the executable and get a mostly real clean code. Why do you want to use C# instead of C++? Flame bait indeed. But I restrain myself.
  5. apollodude217

    Official SICP/Scheme Study Group Registration (up. 1/26)

    If it's not to late to drop in... Name: Apollo I am interested in joining the group as a: Somewhat both My experience with Scheme is: approx. 1 year of courses in school(if common lisp counts) My experience with general programming is: intermediate (I think) Java and C++, strong Prolog, tidbits of various other languages. Timezone: EST
  6. apollodude217

    C++ books

    Deitel's C++: How to Program is what I used at school, and I still use it today. It does a good job of hammering OOP techniques and "the C++ way of doing things", but beware that it, along with many other books, don't quite give the reader a proper understanding of static, stack, and dynamic memory allocation, and the implications these things carry, e.g. calling the "default copy constructor" on an object in order to pass an object "by value" as an argument or to return it "by value". Sam's Teach Yourself C in 21 Days is great, so I would assume the same about C++, but beware that C++ introduces a world of new complexities that you probably don't want to deal with right at first, if you are a beginning programmer. The CS dept. at my school consistently recommends any and every O'Reilly book.
  7. apollodude217

    C# Tutorials

    msdn has pretty good beginner resources; search around there, and come back if you still need he'p.
  8. apollodude217

    i want to make a 'very simple' game

    I recommend the following steps: 1. If you want to continue game programming in the long run, then you probably want to learn a programming language--not super-in-depth, but just the basics. Python is probably the best for what you're doing. 2. Make the game (or at least the "meat" of it--enough to play a round of this game) in text mode (unless you already know some GUI or graphical schtuff). 3. From there, it's pretty easy to add graphics. You will have to either: a. add graphical schtuff to your existing program, or b. insert algorithms that are in your existing program into a new framework designed around the GUI.
  9. apollodude217

    New to Game Programming

    Down the road, I predict you'll want to use a C language. C# is a wonderfully happy medium between the ease of Python and Java, and the power and game-industry-standardness of C and C++. Down the road, you'll need its power. And starting 2D is probably best. I recommend a simple side- or overhead-view game, NOT isometric--at least not at first. Card games and tile-based puzzle games are probably the easiest to make initially, however, a Pong- or Space Invaders-style game will give you an easier step into elements of collision detection, etc. which you'll definitely need in almost any kind of action game you can conceive.
  10. apollodude217

    Some suggestions??

    In addition to using the oh-so-helpful interpreter editor window dealy-bob (as others have suggested), I recommend conceiving a simple project that meets the following criteria: -You might find it useful (e.g. something to help you budget your money). -You think you can tackle all the individual problems (and in doing so, don't be afraid to research beyond the book that you have been reading! This is good and essential practice!!!). -There are no deadlines on completing the project--it needs to be something you can do in your spare time.
  11. apollodude217

    Move ship based on heading

    The easy / high-performance / Atari 2600-style way to do this is: 1. Decide how many different angles you want to point. As I recall, Atari games let you point in a total of 16 directions (N, NNE, NE, ENE, etc.), and this is sufficient. 2. Calculate sin and cos for those angles and apply them as recommended by other posters. Hard-code those values into your program. 3. With just a little cleverness, you can represent only 3 diagonals and "rotate" them for the other 9 diagonals. This implementation is useful if you ever use SDL for graphics, where you don't have hardware-accelerated rotation available (that I know of). But then again, I guess DX9 can do fast rotations... so nevermind anything I just said.
  12. apollodude217

    Lookup Table Appropriate?

    I'm assuming you have a path from any airport to any other airport? If so, I would store x- and y-coordinates of each airport and calculate their distance on the fly, which has a space complexity of O(n). What you were suggesting sounds like a space complexity of O(n squared). Both involve the same time complexity. Are you looking for an algorithm to calculate the best flight, or just a data structure to represent the airports and their respective flight paths?
  13. apollodude217

    making a level editor

    I recommend the following steps: 1. make your game work in ONE simple hard-coded level (e.g., no "walls" except the edges of the screen). 2. ONLY when you're done with step 1, THEN consider a level editor. a. If levels can afford to differ only by mathematical patterns (e.g., enemies get faster, ammo gets sparser, etc.) as in arcade classics (Asteroids, Space Invaders, etc.), then ditch the level editor idea until your game is otherwise done. b. If you're doing 3D, use an existing level editor. c. If placing just one entity per "space" on the map is sufficient, then make the map geometry section of your file look something like this: 0 0 0 0 0 0 1 0 0 0 1 2 1 0 0 2 2 2 1 0 2 2 2 2 1 where 0 is a space, 1 is ground, 2 is an impassible block, 3 is.... In other words, KISS if you're doing this as a hobby. I REALLY recommend making your first game (and perhaps a following game or two) fall under the I-don't-need-no-level-editor category. I think you'll have more fun this way, and be more successful.
  14. apollodude217


    I'm a newb game programmer, so here's what I do in a 2d game: class Entity { EntityType *entityType; // EntityType object defines properties that are // the same for all entities of the same "type" // e.g. all aliens or all bullets or all volcanoes, etc. int x, y; int w, h; // HALF the width / height of entity's bounding box, respectively Actor graphicalRepresentation; // class Actor (a.k.a. Sprite) }; and that seems to work very well. I don't know how to calculate click detection in 3D, but in 2D, it's best to use more efficient techniques than checking every schtankin' entity to see if it has been clicked on, because doing so is O(n), and conducting collision detection in the same way is O(n*n). I don't know if that will help answer your Q. or not.
  15. apollodude217

    So many things keep me from making games

    All code examples will be in C++, not in C# as I have yet to learn it. Java variables are all either primitive values or references to objects (including arrays). C/C++, however, allows you to have the values themselves, pointers to the values themselves, pointers to pointers to the values themselves, etc. for primitives, enums, structs, and objects (instances of classes). And for good measure, you even have pointers to functions. You can ALSO have aliases (a.k.a. references?), but I won't go into detail about that one. The * and & operators are what confuse me personally. They each have 2 meanings related to pointers, etc. The first meaning comes when the operator follows a type: int x; int *y; int &z = x; In the above example we have an integer x, a pointer to an integer y, and an alias z to integer x (again, I will not discuss the alias). If we want y to point to x, we must set it equal to the address of x using the address operator, &. y = &x; Now, if we want to grab the value of x through the pointer y, we must use the indirection operator *. *y = 3; Now x == 3, *y == 3, and y == &x. Does that make sense? Now for objects. C/C++ actually allows you to access data in structs and objects directly, as well as through pointers, as well as through pointers to pointers. Consider the following: MyObj obj1; // declare a new object locally, or statically, or .... MyObj *obj2Ptr = new MyObj(); // declare new object dynamically (on the heap) // AND declare a pointer to it. Now, where Java (and I think C#) uses the . operator to access members, C/C++ will use EITHER . -> or ::, depending on what it's accessing the object through. . member of object -> member of pointer's object (member of what the pointer is pointing to); this is a shortcut for *(ptr).member. :: member of a class or namespace e.g. obj1.member; obj2Ptr -> member; *(obj2Ptr).member; // this is the same as the above line SO, recognizing the difference between an object and a pointer to an object is CRUCIAL!!! I recommend using pointers to all your objects, and please BE CAREFUL not to modify the pointer unless you know what you're doing!!!
  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!