Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

127 Neutral

About DaedalusOwnsYou

  • Rank
  1. DaedalusOwnsYou

    SDL Windows Question!

    You need to specify in your IDE that you want to write a windows application, instead of a console application. You might have specified one or the other without realizing it when you created the project, and you can probably change it by looking around in the preferences/properties of your project. I'm not very familiar with the layout of the common windows GUIs but I remember finding that option in visual c++ express last time I used it.
  2. DaedalusOwnsYou

    pointers usefulness

    The general idea is that creating objects on the stack (Object name) is faster than allocating using new (Object* name = new Object), but ties the lifetime of that object to the scope (the surrounding { }) that it was created in. If you know that the object is only relevant to the scope it was created in, allocate on the stack. If you don't know for sure, or know that you need to pass the object around and have it exist longer than that scope, allocate using new.
  3. 1. switch to c++ (at least for just this part of your code) 2. use boost random Sample code: boost::mt19937 generator(time(NULL)); double number = boost::uniform_real<double>(0,1)(generator);
  4. You're compiling for a different architecture than you compiled freetype and ftgl for. In your xcode project, look at the top of the window where it says "10.6 Debug" or "10.5 Debug" or "10.6 Release" etc. Click that and at the bottom of the drop down select a different "Active Architecture". If the libraries are 32-bit only by default, you might change it to "i386" and recompile.
  5. DaedalusOwnsYou

    actor state

    You can think of the player's update method as a state machine, but don't try to map all of the player's parameters to a single enum. Give your player variables like "isThrusting", "thrustSpeed", "isRotating", "rotateSpeed", etc. In your event handling code, modify those variables based on keyboard/mouse/joystick and then in your per-frame update move and rotate the player based on those variables. If you need logic that depends on the player being in the state MOVING or NOT_MOVING, or MOVING_AND_SHOOTING, or whatever then just test various variables for 0 or not-0 as appropriate.
  6. DaedalusOwnsYou

    Leaving Laptop Plugged In

    I think what you're really getting is that modern laptop batteries don't have a simple method for improving the lifetime, so just use it however is most comfortable and expect to buy a new battery after a couple of years if you still need the laptop.
  7. DaedalusOwnsYou

    C++: Should I use a reference member here?

    Try using a union. Example: class Vector { public: union { struct { float x,y,z; } float data[3]; }; }; Vector v; v.x = 1; v.y = 2; v.z = 3; assert(v.data[0]==1 && v.data[1]==2 && v.data[2]==3);
  8. DaedalusOwnsYou

    Will Google make us stupid?

    And none of the concentration effects have anything to do with "intelligence" or "stupid" (except maybe "stupid" definition 3). The ability to look up information allows a much wider range of problems to be solvable giving any particular brain working on them. I'd bet money that any one of us with an internet connection and a favorite programming language could get every single problem right on an IQ test, or other similar general knowledge test. Does that say something bad about general knowledge tests, or does it mean that large knowledge bases and a python interpreter greater improve someone's intelligence over some domains? intelligence: noun (1) the ability to acquire and apply knowledge and skills. (2) a person with this ability. AskOxford.com stupid: adjective (1) lacking intelligence or common sense. (3) dazed and unable to think clearly.
  9. DaedalusOwnsYou


    You're not going to actually be expected to compute i. The sqrt(-1) is shown as i because you can't actually get a numerical value for it. That's why the professor gave you all those numbers in the form a+b*i. Think about what that operator+ overload is doing. You take 2 complex numbers, and return a double. Is that what the assignment is asking? Is that how complex numbers add together?
  10. DaedalusOwnsYou

    Developing for Iphone Apps

    The operating system API is objective-c, but there is nothing stopping you from just using C or C++ for your game code. If you want to play with something specifically designed for games, take a look at Unity. They have an iPhone publishing option.
  11. DaedalusOwnsYou

    Formula for direction ?

    If my screen had 0,0 as the lower left corner, and coordinate space increased to the right and top sides of the screen, and my angles were 0 pointing right, PI/2 radians up, PI radians left, and PI*3/2 radians down, my formula for direction would be: xSpeed = speed*cos(angle) ySpeed = speed*sin(angle) And then every frame I would move the objects that amount on that axis. If I wanted 0,0 to be the upper left and the angles to increase in the same direction as before (counter-clockwise) then I just make y: ySpeed = - speed*sin(angle) Your language's math library most likely expects radians for angles not degrees. radians = degrees*PI/180 so 90 degrees = PI/2, etc. Take a bit to learn this relationship for cos and sin, they're useful and trig comes up quite a bit. Edit: I can't tell clockwise from counter-clockwise. [Edited by - DaedalusOwnsYou on February 27, 2010 6:21:58 PM]
  12. DaedalusOwnsYou

    Programming DNA to allow brain computer interface for video games.

    Quote:Original post by LessBread One of the obstacles to "man-machine interfaces" is that biological structures are analog not digital. A chip can convert analog input to digital, providing for brain output, but how to achieve the reverse, that is, provide analog input to the brain, seems to me to be a much thornier question. I don't think it's a question of the electronics, but of providing input that the brain can make sense of and, more profoundly, that the mind can make sense of. Discussions of this sort far too often take way too much for granted. We forget that even though our senses began working in the womb, it takes years for us to put them together in coherent ways (and yes I'm aware that months old babies have a sense of "object persistence" - we still require a lot of training to interpret sensory input). That's a little pesimistic, isn't it? Cochlear implants Visual presthesis - more of a collection of research projects still, but very cool progress No self-replicating nano-bots required!
  13. DaedalusOwnsYou

    Formula for direction ?

    Are you sure you're using sin and cos how you want to be? The cosine of an angle is the distance that you need to move along the x axis to form the base of a right triangle with a hypotenuse of 1 and that angle as the angle between the x axis and the hypotenuse. The sine of the angle is the length of that opposite side, or the y distance. Take a look at the graphs on the side of the wikipedia pages (clicky) to understand whats going on in your functions. Maybe you just have a transformed coordinate system and you do want to be using cos for y and sin for x.
  14. DaedalusOwnsYou

    free game engine for c++

    I stand (sit) corrected. Good to know. I'm going to have to really check out UDK at some point.
  15. DaedalusOwnsYou

    free game engine for c++

    Neither of which allows for C++ programming, do they? Try Irrlicht
  • Advertisement

Important Information

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

GameDev.net 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!