Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

454 Neutral

About CJM

  • Rank
    Advanced Member
  1. Quote:Original post by T1Oracle 1) XML's only real advantage is portability, due to its popularitiy its guaranteed to be a "readable" format. That does not mean that it will make sense to the reader, but hey, you can view in internet explorer... Although I agree that XML editors are a good thing. Regardless, you probably don't need anything to read your config file other than your game and the software you make for it. I'd disagree, the XML files that are being used in my current project are far more descriptive. For example: <configuration> <profile name="profile1"> ... <videomode width="1024" height="768" redbits="8" greenbits="8" bluebits="8" alphabits="8"/> </profile> <profile name="profile2"> ... </profile> </configuration> <playlist name="myPlaylist"> <song name="Song Title" filename="song1.ogg"/> <song name="Song2 Title" filename="song2.ogg"/> </playlist> ... Makes a whole lot more sense than: profile1|...|1024|768|8|8|8|8|12|myPlaylist|Song Title|song1.ogg|Song2 Title|song2.ogg etc. Not just to others who are using it, but me too. That said, XML isn't the greatest in all situations. But it does clarify what each value actually means [to someone who understands how the system basically works]. And it lets you arbitrarily add new stuff without needing to update the parser. Quote: 2) XML requires a complex parser and lots of support code. Regardless of how "self describing" it is claimed to be, it still will not have any use in your software until you program a meaning for it into every tool that needs it. Yes, but see TinyXml, throw on a function which can extract a result from the node <x><y><z a="result">, and a couple of other simple wrapper functions and you're more or less set. Quote: 3) The alternatives to XML are almost always superior. In my case (for the CMS) MySQL would have been better, unfortunately I had no SQL options. For your case a simple text file is probably a superior choice. I've heard of using XML for a logger format but a simple text file can do all of the same things without the bulk. But then you miss out on all of the goodness that you can get from XSLT or whatever it's called. Hell, there's an article here on gamedev about using XML for logging, and the advantages that it outlines are pretty comprehensive. Quote: 4) If XML makes sense anywhere it is in internet communication. When you need communcation between two servers using different technology made by different companies then XML's portability is an advantage. Unfortuantely, even there you still need a standardized format (SOAP, WSDL, RSS, Atom) despite it's alleged "self describing" nature. True that, but for an engine, you define your own format that's simple to use. And you document it. Exactly what you'd be doing otherwise, except you can set rules and validate the contents of an XML document easier. Quote: As a config file format in text you could have something as simple as, a variable name, a colon, a value (text/int/float), and an endl. That would be incredibly easy to parse, especially if you restrict variable names to not having spaces, tabs, or colons. That way you can ignore white space, and once you hit the colon you know that the value is the next thing that needs to be read. I could write a parser for that in minutes, but that is only one suggestion. Using a text file of your design is likely to be easier and more efficient than using XML. Leave XML for internet traffic. See TinyXml. XML means that you don't have to actually write a parser for every individual file format, it's structure is well defined [a heirachy of nodes ending with /node], and there are tools out there to display, edit, and extract data from them. While I agree that sometimes XML isn't the solution, in 99% of non-realtime cases, it is. Any time that you want someone with only general understanding of your system to be able to edit your parameters, XML is the way to go. At least, that's how I see things --CJM
  2. Hey, Anyone know how to do it? I have to refer to the top of the file quite often, and don't want to have to scroll lots, or put my monitor into portrait and outline what I'm not working on. Thanks, CJM
  3. CJM

    MP3-Beating Compression (for real!)

    Hey, Consider this simplified version: String of length L. Index of generation using algorithm: 0x00 ... 0x00 0x00 0x00 ... 0x00 0x01 0x00 ... 0x00 0x02 etc. this would clearly be more efficient both storagespace-wise and generation time-wise than a sequence in an arbitrary number [like pi]. Unfortunately, compare those generated indexes to the data that they index: 0x00 indexes 0x00 ... 0x00 0x00 0x01 indexes 0x00 ... 0x00 0x01 0x02 indexes 0x00 ... 0x00 0x02 etc. When you get to 0xFF ... 0xFF 0xFF, the index is 0xFF ... 0xFF 0xFF. So, your index [+4/8/whatever bytes for length] are [in the general case] going to be longer than the data that they store. Or I could just be missing the point entirely... edit: though there are sequences which generate all possible 2 digit combinations in maybe 40 digits of data, that's where I'd imagine your regular compression comes in [in using good algorithms to generate those sequences]. [eg: 00102030405060708090 contains 00,01,02,03,04,05,06,07,08,09,10,20,30,40,50,60,70,80,90 for example - extend it to hold every number and you may save a bit of space...] I call it CAR... --CJM
  4. CJM


    Quote:Original post by extralongpants The thought of a few guys putting together an engine that blows the Unreal Engine 3.0 out of the water is a little hard to swallow. What about Reality Engine :P [http://artificialstudios.com/product_re.php]? --CJM
  5. CJM


    Hey, Words just don't describe this. http://incrysis.com/ The reaction I got was like UE3, only a couple orders of magnitude larger. I didn't see it here, and thought that some of you guys may want to see this. --CJM
  6. CJM

    Copyright Laws

    Hey, As stated above, game engines are covered by exactly the same protection that you'll find on any other source code [which should be as much, or more than the ownership that an author has on a novel]. You own the copyright to the actual code, and so if anyone uses it, you have the legal right to demand money / get them to stop using it. That said, distribution is the key. The sole reason that you don't find Epic's Unreal 2 source code on the net is that it costs a lot [125k or 250k [edit: ok, 750k] USD or something AFAIK]. And for that much, Epic can check that it's a proper, legit company before handing over the code. Similarly, few companies would be so unprofessional as to take other source and publish it - and they'd be giving their competitors a leg up. Unfortunately however, proving that your code was used in something is very difficult to do, particularly legally. Although you may own the source code and all direct derivatives, you don't own the concept behind a single advanced feature. That's what patents are [supposedly] for. Registering your project will also help in proving that your code was stolen, but as far as I know, the only way to do that is to provide a dissassembly of both programs and show that they are logically very similar. Though, I believe [not sure] that dissassembling someone else's application may have some legal issues in some places. So, all in all: You own the code, you sell it under a contract. Sell it to people that you can trust. Maybe customise each user's product, or if possible only provide object files [if it's low cost - and people don't actually need to modify your source] or something. It can be very difficult to prove that your code has been used, without actually being able to see the code. But, like you, I'm not a particular expert, and none of this 'copyright' dealy means squat in some places [afaik, Russia has some 'interesting' rules on copyright, but again not so sure]. I hope this helped, at least a little. --CJM
  7. Hmm, Sounds kind of like the compiler just grabbed what was sitting in uninitialised memory [possibly for the variable initialisation]... Is it stuff that you did that session, and do you get the same problem if you compile as soon as you startup? Oh, and is it a debug or release build? --CJM
  8. Hey all, I've just moved to SubVersion (+TortoiseSVN) for my SCM on top of VC++ Express, and all is working fine, except that I get a file in use error on my .ncb file. I believe checkins are atomic on SVN, so the whole process fails. Of course, this all only happens while I have VC++ Express still open. It commits fine when closed, but I like to checkin my code whenever I actually fix something [while I have the IDE open, before I start fixing the next thing]. Now, I use a lot of templated code, and the .ncb file isn't a trivial thing for the IDE to completely generate. And I like having intellisense that's relatively up-to-date. Basically though, what I want is for subversion to try to check in the .ncb file, but not to refuse the entire commit if it can't. Can anyone with some experience with SVN or TortoiseSVN tell me how to set this up, or if it's not possible? Thanks, --CJM
  9. CJM

    Color Or Colour?

    I think http://www.gamedev.net/community/forums/topic.asp?topic_id=353895&PageSize=25&WhichPage=1 sums it up pretty well. --CJM
  10. Flatland or Flatland2D. [I think it's on sourceforge] It's basically a 2D wrapper on top of ODE?, but it fixes a bunch of issues that physics engines usually have when you constrain stuff to 2-d [bouncing and shooting off of parts]. Haven't used it myself, and haven't looked at any others, but hopefully this helps anyways. --CJM
  11. Hey, There are a couple of things that I'd consider looking into. First up, see if you can divide your scene into cells and check only the polygons that exist inside each particular cell. This is very similar to the quadtree idea. And that would work well particularly if you had only the edges of the land in there [rather than as triangles], Secondly, I'd try a non-rotated bounding rect or bounding rect test against the land [a single rect - edge list collision test should be faster than an edge list - edge list collision test]. Thirdly, I don't know if you're doing this already, but take into account the fact that you should be testing against edges, rather than triangles. That way, you miss out on all of the testing for the internal land triangles. --CJM
  12. CJM

    Really nerdy C++ question

    Quote:Original post by Cybergrape C++ is fairly standard? Yes, there's a standards board, but turbo C++ is probably so old that the "latest" C++ revisions haven't been incorporated into it completely. Though no compiler is 100% standards compliant yet. Different compilers are generally for different prices. It's only recently that microsoft's compiler has been affordable [with the express edition]. Other compilers like gcc's are open source and available on other platforms. MSVC is probably the second fastest compiler around, second to the intel optimising compiler. I'd use VC++ Express because it's the cleanest and easiest to use IDE in my opinion, and it makes good code. Sorry for being brief. --CJM
  13. CJM

    Conversation with a Prophet!

    Hmm, Just like IRC! --CJM
  14. No, It's a picture of a C vs. C++ thread... Ok, sorry. IMO, C++ is more or less a superset of C. Some things - as listed earlier - aren't but those features are rarely used AFAIK and easily done in different ways. That said, C++ is generally considered slower, mainly because of the bells and whistles that it has. Classes themselves don't add a particularly significant overhead [ie none in release mode], but if you have stuff like RTTI [real time type identification] then there's the overhead. Throwing exceptions has an overhead in every function that they throw to IIRC. That said, asembly-wise, the code generated should be pretty similar. In some situations, C is faster, particularly when you're dealing with uber-tight calling loops on singleton-pattern objects... something like: for (int i=0; i<this->indexes; i++) { this->pushVertex(this->index); } Mainly because you know that there's only going to be one this pointer, and you can store your data one dereference closer to the application. In C++, the compiler has to actually send in a this*. And dereference this->index. In C, this process would basically be: if i>=indices jump out call pushVertex(index+i) jump back to start In C++, this process would be if i>=&obj->indices jump out call pushVertex(&obj, &obj->index+i) jump back to start This is where C is naturally faster than C++. As far as I understand it, speedwise, if you don't use any of the fancy features of C++, like classes, then the compilers will generate basically the same assembly. Which means the same speed. For me, it really comes down to convenience - I _like_ some of the features that C++ holds over C. I think I'm done ranting. I hope everything here is true, but I'm no expert in C. --CJM
  15. CJM

    To School, or not to school...

    Hey, I'd like to think that I'm in pretty much the same boat as the OP [for my tertiary education at least]. Some of my lectures [introduction to comp stuff] over the past year were incredibly boring and so I tended not to go. But at the same time, I did well in the courses. I'd generally scan the lecture overheads the day of the test to see if I'd missed anything, and _every single time_ I learnt something new. Of course, I was going over maybe 24 1 hour lectures in the space of 45 minutes, but my point is that I was always able to pick up new knowledge from the content. That said, many of my courses are exciting and challenging [ie the non comp ones] and so I go. I understand that the 'boring' courses lay the groundwork for later courses where I know that I will learn useful stuff, and I'm just binding my time for them. Had I known previously, I may have attempted to get an exemption from these courses. So, my advice to you is, and I'm going to assume a university level study here: 1) if there's any chance of skipping the course and moving to something more advanced, take it - even if you have to complete a test or something. 2) check to see if there's anything that's exciting in future years. If there is, then maybe you're paying your dues now. Make sure that you do well in your classes now, and then if there's more boring stuff later you'll be more likely to be able to become exempt from them. 3) if there isn't anything exciting later on, ask yourself if you're at the right school. See if any other schools nearby that have better courses. See if you have any complimentary interests, for example someone mentioned Business Degrees if you're planning on starting a business. 4) see if you can study part time. That way, you're still studying and you've got extra time to work/learn/code/play/whatever. 5) if all else fails, find out when the tests and quizzes are. Make sure you go on those days. Make sure you know the content for those quizzes. Do well in them. Some companies won't give you a second look if you don't have a degree, some will. While you may not want to work for the former group, they generally compose much of the market. If you can get enough paper to get an interview, then I'd say that's enough. That's the whole point in me doing my degree - though I'm hardly miserable doing it - I socialise, learn a little and get interviews at the end of it. If those aren't things that are particularly important for you, then perhaps further education isn't for you. But make sure that you consider all of the ramifications - I wouldn't say that this is a question that I'd generally be convinced of by strangers on a forum, no matter how knowledgeable they are. Just make sure that you figure out all of the ramifications and weigh them up yourself. --CJM
  • 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!