Advertisement Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

247 Neutral

About Mizipzor

  • Rank
    Advanced Member
  1. Mizipzor

    object tracking in 3d semispace

    Eye contact? That was a good keyword. Check out this article on line of sight (, line of sight (or LOS) means just that; eye contact.
  2. Yes, adding some code to do the same thing is of course the easiest way to go. I was just wondering if this could be done without a recompile. :) Quote:Original post by Scourage please post your code. It's difficult to troubleshoot what is going on with just that. Actually, this hasnt anything to do with my code.
  3. Im on to something now. I opened the file in a hex editor and saw that three bytes were at the beginning of every failed that caused the error. I dont know how they got there, I created the file with a script I wrote in python, using its built-in xml parser. I can load and read them now, but somehow, I feel that this issue will come back and bite me.
  4. Mizipzor

    C, midi input

    Oh well, you got the sound part there at least. :p But isnt the input part something that lies in the driver for the device? I know linux have many open source drivers for stuff. Maybe you can look around here?
  5. Mizipzor

    C, midi input

    Havent written anything related to midi myself, but I needed a break from work. A quick google turned up this code which seems to do what you want. Tell me if it worked, would be cool to try out. :)
  6. Im trying to see why a file cant be loaded, but the others can so now Im trying to setup a conditional breakpoint. This is with Visual Studio 2005, Ive set a breakpoint and in breakpoints window (alt+f9) I rightclick and set condition to: path=="levels/test.xml" But when starting the program I get this message: Quote: The following breakpoint cannot be set: At, line 71 ('File( std::string path )', line 4), when 'path=="levels/test.xml"' is true Unable to evaluate the breakpoint condition: CXX0058: Error: overloaded operator not found Which seems strange, std::string has that operator. What am I doing wrong?
  7. Mizipzor

    warning LNK4006

    Glad I could help, good luck with the project. :)
  8. Mizipzor

    warning LNK4006

    Quote:Original post by Mybowlcut I've got a static library that uses TinyXML++ code. I then have another library that uses the first static library and this also uses TinyXML++ code. I then have a testing project that uses both libraries to test them as I add stuff. This also uses TinyXML++ code. I get the warnings when I compile the middle (second) library; it complains about the first library, Game_Engine.lib. Make so only the first mentioned library links to TinyXml. Then make the other projects just link to that, and include the TinyXml headers. Didnt read the entire post but it seems that the problem is that the TinyXml functions are declared more than once. Doing the above should clear that up.
  9. Im trying to debug a very wierd error here. Im opening a lot of xml files, in debug mode (Visual Studio) all of them work, but in release, only some of them work. A common characteristics Ive found among them is that the files that cant be opened has unix file endings. Could this be a problem? I open them using std::fstream, which I thought would be able to handle it. A few days ago when hunting for the solution, I found out that I didnt null terminate the char* arrays that holds the file contents. Its fixed now, but some files still resists. The actual error I get is that is that in the buffer I get one or two bogus characters and nothing more. Except for some junk at the end of the file, but its there regardless, as long as the file is opened. Ive always guessed that it was some sort of binary metadata. Any pointers very much appreciated. :)
  10. Mizipzor

    Getting size of file

    So simple... thanks a bunch mate!
  11. I have this short snippet to figure out the size of a file: // get size of file FILE* stream = fopen(filename.c_str(), "r"); fseek(stream, 0L, SEEK_END); long size = ftell(stream); fclose(stream); Then, based on the reported size, I allocate a char* buffer to read it: // read file contents std::ifstream f(filename.c_str()); if (f.is_open()) { char* buffer = new char[size];, size); } Problem is, "buffer" ends up holding this: content of file will be printed to coutýýýý««««««««þîþîþ My question is what those extra 17 characters at the end are. Metadata hold in the .txt? Whats the best way to get rid of them? Doing size-=17; seems like a last resort. [edit] The content of the file looks like this: content of file will be printed to cout (no new line)
  12. I have TiXmlElement looking like this: <node> <text>replaceme</text> </node> I want to change the text "replaceme". I now how to do this if I create the element from scratch. But now I have an existing element that I want to change prior to saving it to the file. I cant find the tixml function that lets me do this, anyone care to help?
  13. Mizipzor

    Quick Answer please

    On a sidenote, functions can have default parameter values to make your code compile. But reading your post, I dont think thats where you went wrong. Go with what ertyqwer said, otherwise google the compile error code.
  14. Mizipzor

    HTML in Games

    Quote:Original post by Trapper Zoid Quote:Original post by OrangyTang If you use XHTML (which is valid xml) then you can use any xml parser to do the job. TinyXML is pretty good and has a nice liberal license. I've used TinyXML for outputting HTML formatted log files for my games. It works very well. That sounds very interesting. Is the code for that logger open source? Or have you written any articles on the subject? :)
  15. Mizipzor

    Text Based Game(Need Help)

    One thing; you need to flip the << on std::cin, like this: int new_game = 0; cout << "Wish to start a new game?\n"; cin >> new_game; Send stuff to cout to print to screen, cin sends stuff from the screen (or rather, the input buffer) to a variable. If you want just a single character rather than a whole word, lookup _getch(). Now for the second question, yes its quite possible to do some more advanced rendering. For example, you can put the cursor at a specified place before printing. That, combined with commands like clearing the entire screen lets you do some fancy things. But maybe that is a bit advanced for you right now, maybe you should try to do a text game without the above mentioned systems to grasp the basics? Good luck! :)
  • 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!