Advertisement Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

433 Neutral

About Steve132

  • Rank
  1. So, I could be wrong here, but did you try checking to see whether he is running a 32-bit install? Its obvious that you are running a 64-bit it possible he has a 32?
  2. Steve132

    How Can I Reduce My Compile Times?

    Do you mean just creating a static library
  3. Steve132

    Rendering Problem

    PROTIP:upload images in .png format (or .jpg for photos). Never use .bmp ever
  4. One thing I might suggest: nice job on the loops and all, and in general looping repetitive code is a good thing, but why didn't you do something like: char board[8][9]={ "********", "* *", "****** *", "* *", "* * ****", "* * * *", "* * * *", "********"}; Its a crapton simpler to read and to modify then lots of loops. Part of learning programming is learning when to make something complex and extensible and when to KISS (keep it simple!)
  5. Steve132

    Delete all objects in std::vector

    Your code actually works, except that the vector.erase() call actually decreases the size of the array every time. So, imagine if we put 8 elements A B C D E F G H into an array, then called your function loop iterations: i=0,size=8,array={A,B,C,D,E,F,G,H} i=1,size=7,array={B,C,D,E,F,G,H} i=2,size=6,array={C,D,E,F,G,H} i=3,size=5,array={D,E,F,G,H} i=4,size=4,array={E,F,G,H} stop. as you can see, because the size changes, the erase method fails. There are 3 ways to fix this problem, in order of increasing "goodness" method 1: store the size before: const int s=children.size(); for(int i=0; i<s; i++) { delete children; // Delete object it points to childrenIterator = children.begin()+i; // Set iterator children.erase(childrenIterator); // Delete pointer } method 2: clear the array after iteration. This way is better because vectors are worst case O(n) on removal, which means your algorithm could be O(n^2). for(int i=0; i<children.size(); i++) { delete children; // Delete object it points to } children.clear(); lastly, although theres technically nothing wrong with iterating through the array you did, it is better to use iterators. Theres not really a big difference if the data structure has O(1) lookup on the [] operator (like a vector does), but other data structures (like lists or deques) don't have fast random access. Therefore, doing it with iterators is MUCH better. for(std::vector<Object*>::iterator ci=children.begin();ci!=children.end();++ci) { delete *ci; //delete the object the iterator points to } children.clear();
  6. Steve132

    Licensing Questions

    Quote:If I create fictional (my own creations) weapons, such as made-up guns, grenades, etc, am I legally allowed to use them? Many people have told me that using weapons in a game requires licensing from the government. What? No. Certainly not in the US. You are fine Quote: Also, if I use technology already in use, such as flash bangs, or smoke grenades, will that be against the law? What? No. Certainly not in the US. You are fine Quote: Is "Humvee" or "Jeep" registered IP? In other words, can I name an ingame vehicle a Humvee or a Jeep? Probably not. I imagine both of those terms are trademarked by their respective corporations. Quote: Also, can I write a fictional storyline that puts two countries at war? Would that be counted as treason? What? Treason? Absolutely not. Assuming you are from the US, It sounds like you should immediately brush up on the First Amendment to the constitution and the rights that it grants you. That is very important information to understand for ALL citizens, not just prospective game developers.
  7. Steve132

    I have a problem with char*

    Since the previous poster provided actual helpful relevant posts, heres my help: It's wrong because it uses char*. Since you are obviously using C++, char* is basically considered evil as a string. Use std::string instead.
  8. Steve132

    LUA for console games??

    Yes, but thats probably the biggest "if" I've ever seen ever.
  9. Optimization levels do not have to be homogeneous across the binary. You can compile different parts of your project with different optimization levels just fine.
  10. Steve132

    Scripting language for python game

    since python is an interpreted scripting language, adding an interpreted scripting language to the engine that isn't python seems sorta silly.
  11. Steve132

    Linux use and development, finally...

    Quote:Original post by mikeman I can't have, for instance, GNome installed and expect me to easily communicate with another lay person that has,say, Ubuntu. . Ha. Fail. This sentence right here demonstrates that you literally know nothing about Linux. Also, on-topic; I use CMake for my projects, and I highly recommend it. It allows you to build the same project under VS,CodeBlocks,Eclipse,KDevelop, and XCode, on OSX,Linux,and Windows. Code::Blocks, Gedit, and (lately) KDevelop4 are the IDEs I use under linux and they are very good. I haven't used enough KDevelop4 to really comment on it, but when I was using C::B, it is better than Visual Studio if you take 20 minutes to tweak it so it doesn't look like crap.
  12. Steve132

    GLSL Bytecode

    Quote:Original post by kubapl Okay so maybe I wasn't to clear. I'm working on a project that does not support any high level shader languages. So what I am trying to do is write a GLSL shader and then have that translated to the equivalent ARB Assembly or Bytecode. Thanks What do you mean by this exactly? "Does not support any high level shader languages" A project can't not support high level shader languages. If it supports GL 2.0, it supports high level shader languages. If it doesn't support GL 2.0, then you are either on a cell phone and don't have access to a GPU anyway, or your target market is a 7 year old PC. My guess is that it does actually support high level shader languages and you are...mistaken or confused somehow.
  13. Steve132

    Using LGPL with other licenses

    IANAL, but it looks like what you want to do is fine (upon reading LGPL3). I'm pretty sure the whole "reverse engineering" provisions basically just mean "Don't do anything that would prevent a reasonable person from figuring out how you called the library and replacing the library binary with one they compiled themselves" If you read that section, it says "Do not place reverse engineering restrictions on the parts of the library that are in the combined work, and do not place reverse engineering restrictions on the library itself" I interpret that to mean that reverse engineering restrictions on the combined work (or, in your case, external libraries to the combined work) are fine and compatible with the LGPL, as long as you make it clear that reverse engineering the lib itself is fine, and reverse engineering your program for the purpose of interfacing with the lib is also fine. Again, IANAL, but if it were me I'd assume it was ok.
  14. Steve132

    Dev-C++ doesn't work anymore

    Quote:Dev-C++ is considerably out of date and unmaintained. Consider Microsoft's Visual Studio 2010 Express as an equally free and superior solution. Also consider code::blocks 10.04
  15. Pick uniform random samples of the direction you want to go (from 0-2 pi), then, initialize the direction vector of the velocity to that direction. Next, compute the equation of a star in polar coordinates, and set the velocity magnitude equal to that direction. For example, the equation of
  • 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!