Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Everything posted by Nychold

  1. Nychold

    The ultimate game engine

    (This is all based on a survey of game engines I did in 2003, so it may be considerably dated, or even inaccurate as my memory can be inaccurate. :D) People often think that free must be worse than commercial products. About ten years ago, it was true, but today it's a lot less true. Take 3 distinct game engines: Aurora (made by Bioware), Torque (made by GarageGames), and Ogre3D. Aurora's price is incredibly expensive for a weekend project. I think (and don't quote me on this) that it's around $75,000 for any commercial usage. Does it work? Of course. Neverwinter Nights and Neverwinter Nights 2 are proof of that! Is it worth the money? I honestly wouldn't know...I've never been able to test it, and see it run. Torque's price much more understated. A mere $150 per seat (or $750 if you're going to use it for real purposes). With 20 programmers, it's still less than the (possibly fictitious) price of Aurora. And Torque has two advantages. The first is that it's cheap for small projects, making it wonderful to get started. The second is that it has been used in commercial and independent games. Tried and true, as the saying goes. Ogre3D is completely free, with a similar idea behind Torque. If you change it, post the changes. Be a part of a living, breathing community. Other than that, you're free to do with it what you want, according to the LGPL. The only significant problem with Ogre3D is, I've heard it's extremely difficult to get it working correctly. But I've seen it work in a number of freely available game demos online, and it might actually have been used in commercial games, though I can't think of any off the top of my head. All three of these game engines should do everything you need, and more. The question comes down to "security". If you pay $75,000 for a product, you're going to get support. And very good support. Bioware would practically bend over backwards to help you modify the code. You'll also get pages of detailed specs, the plans they used to make it, changes, meetings, future possibilities...whatever else they bothered to write down. In short, it's a complete package. Torque is similar, although I have seen some of the documentation that comes with Torque, and I was a little unimpressed. But then again, I only read a few pages. Not to mention they sell the manual on how it works, and the scripting language, so aside from tutorials and the online community, it would probably be difficult to get started. (I'm not sure if this changed, but when I looked last, the manuals were not free.) Ogre3D...forget the documentation. I tried to read through and understand it a few years back, and unless it underwent a major overhaul, I would stay clear of even trying to make heads or tails of it. As what usually happens with free projects, the guys making it focus on making it versus discussing it. I can certainly understand, but it shows in the documentation. In short, you're looking for 3 things in a game engine: 1) Speed 2) Support (both documentation and help) 3) Value I'd try looking for a free 3D engine (Ogre3D, Irrlicht, CrystalSpace, etc.) before looking to pay a lot of money on a commercial one. After all, they'll all pretty much do the same things. They all render triangles, they all load textures, and they all have particle engines and maybe even some physics. They don't all offer to help you do stuff with them. :)
  2. Nychold

    [SOLVED] ARB extensions + shaders

    EDIT: Posted deleted. Sorry, I think I misread your original post. I thought you said it worked with GLEW, but not when you did it without it. :) I would say try downloading other peoples' code, and see if it will compile and run. If it does, then you know its your code. If theirs doesn't run, you'll know it's something else. :D
  3. Nychold

    [SOLVED] ARB extensions + shaders

    When I attempted to do shaders the first time, I hit the same snag. It turned out to be very simple and stupid of me, so you may want to look at this first. glShaderSourceARB requires a char ** to be passed, but I wasn't passing a **, only a *. I was loading my data into a character array, like char program[65536], and passing &program as the **. However, according to the compiler, &program = &program[0] = program. In other words, it was a char *, not char **. This may or not be your problem, but it's something I had problems with. If not, then Eldirtch is right...we need source code. :)
  4. 1) Even I don't really get this. If the static GameEngine *m_pGameEngine was in a public block, that would make sense, since it would allow any game object the ability to know which game engine was running. As a protected member, it doesn't make sense. Anyway, it's just a static pointer, which means it's not really a member of GameEngine, but it's in the namespace created by GameEngine. That means GameEngine::m_pGameEngine is the same value between different "instances" of the GameEngine. (Don't confuse this instance definition, which is the object oriented term, with the Win32 definition below.) As for initializing the variable, you have to do this since it's not a member of the class. It's the same thing for global variables. 2) HINSTANCE is a handle to the instance of your program. Whenever a program is run in Windows, it gets four values: HINSTANCE hInstance HINSTANCE hPrevInstance LPSTR szArguments int nShowCommand hInstance is the currently created instance for the process. hPrevInstance is (I think) the previously created instance. This allows you to determine if the program is currently being run. szArguments is just a string for all the arguments passed on a command line. nShowCommand is just how the default program should open (maximized, minimized, etc.) 3) There's a table in the Win32 documentation somewhere that tells you what they all mean. I found this online: LPSTR = char* LPCSTR = const char* LPWSTR = wchar_t* LPCWSTR = const wchar_t* LPTSTR = char* or wchar_t* depending on _UNICODE LPCTSTR = const char* or const wchar_t* depending on _UNICODE
  5. Nychold

    Bug - in Tomcat or Firefox? (Servlet)

    It's about time taking German in college paid off a little. :LOL: As for your problem, I don't see anything wrong with the code, though I'm not an expert in J2EE. The fact that is works as expected, at least on one system, is a good sign. I do know that, with PHP, there are differences when the code runs on Windows systems vs. Linux systems. Permission problems, directory issues, and so on. My only other suggestion is to make sure cookies are enabled at school. I know, when I attended college, all the computers on campus had cookies disabled. But since you're working with cookies, your machines should have them enabled. Good luck with the problem. :)
  6. At its core, Java3D uses either OpenGL (or DirectX on Windows systems), so you won't escape the slow rendering, no matter what. As for software rendering being slow, well...yes and no. Software rendering will always be slower than "hardware" rendering because you don't have a dedicated chip doing the work. But back in the OLD days (97 and before), we didn't have hardware TnL. It was all done in software, and it all ran pretty fast. The basic transform and lighting algorithms are not computationally expensive for small numbers of lights (2-4) and polygons (1-10,000). The most computationally expensive part of 3D graphics is alpha-blending, per-pixel lighting, and basically everything the shaders today save us from. :) In fact, if you're interested in doing something within Java, consider looking at Developing Games In Java, by David Brackeen. Or at least the posted source code online. In the book, he creates a software 3D renderer in Java and using a scripting engine that runs about 30-40 FPS. It's really quite eye-opening. But, if you want to make use of newer technologies, you'll have to use something that's capable. OpenGL and DirectX both have software versions, and run fairly quickly. Thus, Java3D will also run quickly. There's probably something similar to Java3D with C# as well, but I have no idea about that.
  7. Nychold

    Variable time steps?

    If I had to venture a guess, I would say it's less about graphics, and more about the other things. The faster you get the graphics displayed, the more time you can spend elsewhere. Since the last thing you want in a video game is wasted time, you draw the graphics as fast as you can (sometimes 125 FPS, sometimes 60 FPS, sometimes far less) and use the rest of the time to update AI, collect garbage, read data from the hard drive, etc. This is becoming less needed as computers and video game systems move from single to multi-core processors, but it is still important, nonetheless. But then again, that's just my two cents. I'm probably not understanding what you're asking anyway. LOL
  8. Nychold

    Trying to get mesh mender working

    I don't know how MeshMender works, but just from reading the error, you're sending it an invalid normal vector. Chances are, it's "mending" the normals as well, and it's normalizing the normal. But, in your case, the normal vector is (0,0,0), and you can't normalize that since it's length is 0. So, try setting a real normal vector...like (0,0,1). That is also normal to the shape you've defined, and everything should work okay.
  9. It should work, but you will need to test it. The basic concept is to multiply the correct y position by the width of the image, then add the x in. This gives you the position in the image, then change the pixel. The Windows BMP are inverted to better fit the Cartesian coordinates system, where (0,0) is the lower left corner rather than being the upper left corner, like in standard graphics.
  10. Nychold

    The simplest model format

    The simpliest 3D object format I've ever seen is a Wavefront OBJ file. It's entirely readable, with comments, but very easy to parse: # This is a line comment, so ignore all lines which begin with the bash symbol # la la la la # Lines which begin with v have three coordinates: x y z in that order # All eight of a cubes vertices are defined below v 1 1 1 v 1 1 -1 v 1 -1 1 v 1 -1 -1 v -1 1 1 v -1 1 -1 v -1 -1 1 v -1 -1 -1 # Lines which begin with f define a face, and can be as long as they want # They're also required to be written left to right in counter clockwise order # Each number after f represents the index of the vertex above, and is # ONE (1) indexed, not ZERO (0) indexed like C/C++/C#/Java is # All six cube faces are defined below f 1 3 4 2 f 6 8 7 5 f 2 6 5 1 f 3 7 8 4 f 1 5 7 3 f 4 8 6 2 # All lines end with a \n character, except possibly the last line # Ignore all lines which begin with anything you don't know.
  11. Nychold

    Complete noob needs guidance!!

    Well, I don't know what "ActionScript" is, but it sounds familiar to me. And if you want it to pertain to web development, I can only offer up two solid possibilities: Java and Flash/Shockwave. (Does Shockwave even still exist?) I'm not trying to start a programming "holy" war, but Java is the better language for web development stuff. With C#, you have ASP, yes. But with Java you have JSP, Applets, and full blown applications, including full screen games. And the best part is you only have to compile once, and it runs on any computer around the world. Plus Java is ubiquitous on the internet for making applet style games. Flash is also amazingly popular for simple little games online, as well as other such web based stuff. I think this is where I remember the term ActionScript coming from, but I could be wrong. And eidetic or not, I don't think anyone could go from web developer with no-to-little programming experience to a full blown game developer in 6 months. There's just too much to learn. Game development isn't G.I. Joe. Learning isn't half the battle here...it's only the beginning. You still have to implement everything you read, and trust me when I say books have errors. Tutorials have errors. If you memorize what you read, you'll be in for headaches. :)
  12. http://dictionary.reference.com/browse/tousy
  13. Nychold

    Trying to pinpoint system specs

    I haven't looked at your demo yet, but there's an easy way to figure out approximate requirements: Start by booting the game, and take time measurements. FPS is a great metric. Also, bring up some kind of process observer (in Windows, just press Ctrl-Alt-Delete) and see how much RAM your game takes. Finally, go through your code, and see just how much could be loaded into the video card. Any memory measurements should be rounded to the nearest power of 2. Make sure you add to this the OS's memory. For Windows XP, I believe that's 256 MB RAM, but you might be able to get away with 128 MB. Ignore this addition for video RAM. Processor Speed should be determined based on FPS. CPU performance relates about linearly with FPS, so FPS = G * GHz, where G is your game's complexity factor. So, if you had about 100 FPS running on a 3.1 GHz CPU, your G is about 32.3, and if you wanted about 20 FPS minimum, you're looking at about 620 MHz (rounded up to the next logical number, that's 650 MHz). That's also assuming the video card is the same, so feel free to bump it up a few hundred MHz for caution. And that should just about cover it for approximate requirements. Sound cards are sound cards, network cards are network cards, etc. Speed there is a non-issue, even if heavily taxed. Hard Drive sapce is simple...calculate how much space the game takes unzipped and zipped, and add double the required RAM and Video RAM space (for swap and cushion), but don't bother to round to the nearest power of 2. Nearest MB should be fine. The only other way to determine this is to get a bunch of very low end systems, and see if it runs playable or not.
  14. From my own research, the difference between the two cards is target rendering. Your standard video card pushes signals to a monitor, or in some cases a TV. The precision can be off for most of the calculations because you'd never notice it. And so ATI uses all kinds of approximate functions to guess, rather than truly compute the answers. The FireGL cards are designed for just about any rendering you can fathom. This includes rendering to stereoscopic systems (VR), rendering in 48 bit color, and rendering flawlessly. It's registers are likely twice to four times as long as on a Radeon X1900. Basically, these cards are designed for creating 3D animation for TV, movies, VR, etc. That's also the reason you won't see benchmarks between the two. The FireGL would win by default in most of the tests, because it's the only one CAPABALE of multiple rendering contexts, etc, but in video games, the X1900 would decimate even the fastest of the FireGL. Two entirely different cards for two entirely different purposes. EDIT: Here's a nifty little site that will let you "compare" any two cards you want: GPU Review Like I said, the X1900 decimates it in Operations/second, but I'm sure it would fail on accuracy. ^_^
  15. Nychold

    Dumb matrix question

    Well, let's look at the equations: T = V_o * W (camera x world) T = V_n * I (camera x new world matrix) Therefore, V_o * W = V_n. So jut multiply your original camera and word matrices in the same order as you do for projection, and assign it to V. A simple, but not dumb question. ^_^
  16. Nychold

    Camera Class Design

    Here's generally what I do with a Camera class: Position vector Direction vector Viewport structure Fieldofview/"area" value (left for perspective, right for orthographic) nearPlane and farPlane values Viewing Volume structure (contains the eight points to make the viewing volume) I generally don't keep the matricies floating around, but then I use OpenGL, so creating them and retrieving them are easy. If you don't have those functions, adding them would be no big deal. But rather than subclassing a single Camera class, I include everything I know I will need in one "big" camera class, and just use toggles to turn on or off certain features. If you have to subclass, I would say you're probably on the right track.
  17. Nychold

    Programming in c++

    I would disagree a little, about Java not being a sufficient language for games. 1) Unlike C/C++, Java includes a considerable amount of graphics, networking, and standard datatypes. (C++ does not include trees or hashtables.) 2) Java is interpreted, meaning so long as the computer has a Java VM, the program you write will run, no questions asked. 3) Java 1.5 constructs are available on Java 1.4 VMs. 4) LWGL is available for Java, adding "native" OpenGL support with hardware acceleration for 3D games. 5) Sun has an official 3D library called Java3D, which is freely available, and is also hardware accelerated (by either Direct3D or OpenGL). I will give this to C and C++: It's faster, and more common. If you need to squeak out 10 frames a second more, then C++ is probably the best choice. But in almost every situation where FPS becomes a huge issue is on very low end machines (most of which are not used to play such video games) and with insanely complex games, a feat which will likely not be tackled by fewer than a team of programmers. So Java is a perfectly acceptable language to write games in. There's even a wonderful book on the subject: Developing Games In Java, by David Brackeen. In it, he writes a full screen, software 3D renderer that puts out around 35 FPS on a midrange PC today.
  18. Nychold

    Where do I go?

    Quote:Original post by Monkhouse Maybe I should just forget my dreams at being a programmer or game designer...I love computers, I love games, I have interned as a computer tech for my school, and know some networking and can do quite a bit with computers. I have taken a class in python. But Im still an novice to programming... I suck at math and unless I get INTENSIVE coaching in it, could never be anything great with it, definatly not major in it in any way. Im accually being ripped off in my math education, my whole middleschool I never had much help with math, noone could help me, its not that I didnt ask for help, I did, people just wouldn't help...sounds like a dumb excuse, but its ture, I guess I was unlucky or something. Now Im in highschool, my sophmore year I didnt know any better, my junior year I started to realize that our mathteacher sucked...He has a degree in teaching gym or something, and will even tell you himself that hes not good at math, he doesnt even like it. I even went to the principle and recommended we need a new teacher cause I wasnt learning anything... So I'm not good at math, and my 'gym' teacher isnt helping me learn it either, and my school isnt doing anything about it. And to me it looks like I wouldnt be very successful at computer science or any other computer degree, cause I dont know math very well, and I wont stand for that...so I guess Ill just forget it. Ill find something Im good at and can succeed in...maybe I'll go back to my first plan. Media Design... Forget what you learned in HS and MS about teachers, and learning in general. In college, everything changes. However, if you seriously have questions, I would recommend attending a community college for your first two years. The pace is slower, the teachers are nicer and more accessible, and the class size is smaller. In fact, I was never very great at math until I got into college myself. Not that I'm a great genius at it now, but I'm leagues ahead of where I was in HS. And this is the big mistake most people make in HS, when deciding on a college and career. All you have is your HS experiences to guide you. And let's face it, they're crap. You're slowly becoming men and women of society, you're always so interested in proving that you're adult, proving that you're smart, proving that you're not like your parents, and you aren't paying attention to what's important. You can't. There's too much in your lives to have any real focus whatsoever. (I hope I'm not being insulting. It's not my intent. I'm speaking from my own life and experiences, and it was very difficult for me to maintain any real focus.) So take your time, and if you need to, go to a CC. I did it, though not because I wanted to take it slow. I had to pay my own way through, so the cheaper, the better. :)
  19. Nychold

    3D collision detection with triangular mesh

    I think I would simply compute the normal of the triangle, and create a ray whose origin is the point in question, and in the direction of the normal. If the ray intersects the triangle, you had a collision. If not, you don't. And if you do, computing the Z distance should not be too difficult. I don't remember the exact algorithm off the top of my head, but I'm sure you can find it online, or maybe one of the gurus here can point you in the right direction.
  20. Nychold

    SDL and thread problem

    I must say that I don't know anything about SDL, but with multithreaded programming, you'll often get 100% CPU usage, even when you're not at 100% usage, especially if you or part of your code is using mutex locks. See, what happens is, one of your threads is trying to do something with memory, while another thread tries to do something else. One of the threads has to wait, and changes are, to keep the wait loop simple, it's probably: bool isLocked=false; void some_mutex_lock_function() { while (isLocked); isLocked=true; } void some_mutex_unlock_function() { isLocked=false; } While in the some_mutex_lock_function, you're using 100% of CPU power, even though you're not doing anything. If you can, try to eliminate all locks, and where you have a lock, try to return control to the OS if possible. Like I said, I don't know SDL, so all of this code might be in SDL itself.
  21. Nychold

    Where do I go?

    Quote:Original post by Anonymous Poster Say you want to go work for Havok, and there are 20 pure CompSci resumes versus your one with Physics and the ability to program as a side note. Who do you think looks better? Ehhh, I'm going to have to disagree with you there. I'm the only CS person in my office space, and my programming partner (Ph. D. in physics) couldn't program his way out of a paper bag. That is just one side case, but still food for thought. I do agree that a pure CS degree is a little weak in business. It's abstract, with less emphasis on work experience, so you'd be well advised to take a second major. Not a minor, but a second major. That means two BS degrees (or in my case, BABS). Math is always a good one, since the classes overlap so much. (The only math classes I ended up taking outside my CS degree were: Abstract Algebra, Advanced Calculus I and II, and Numbers and Polynomials. The last one wasn't even necessary.) Physics is probably much more attractive to a video game designer, but requires hoardes more classes: Thermodynamics, Statics, Dynamics, Electromagnetism, etc. But breaking into the software development scene is hard anyway. One extra gold star on your resume won't be the death of you. The lack of good, entry level positions will. LOL
  22. Nychold

    Where do I go?

    I don't know if this is still true or not, but when I went to pick a major, I had the same questions as you do. So I asked them to the college, and this is what they told me: Computer Science has more to do with the abstract concept of making a computer solve a problem. This is more of an overview major than a specific major. You won't just learn to program. You'll also learn about computing in general. It's computer understanding for the sake of understanding computers. Nothing more. It's often times found in the College of Liberal Arts and Sciences, instead of Engineering or Computers. Computer Engineering has more to do with design and implementation of software and/or hardware. Usually, schools have two tracks: Hardware Emphasis and Software Emphasis. There is much less abstract discussion and math required, and more hands-on, design-and-build-this. It's pretty much understanding computers for practical reasons. Software Engineering is almost entirely about the process from beginning to end of the software lifecycle. You learn how to program, write technical documents, specifications, time management, and other such business oriented things. Software Development, I've never heard of outside the business world. As for me, I'm a professional developer, with a Math/Computer Science degree. The thought of computers for the sake of computers just appealed to me more, although I had the same required classes as Computer Engineering and Software Engineering. I don't yet work in video games, but I do graphics development within OpenGL so I'm happy right now. ^_^ As for which school, meh. I'm sure others will disagree with me, but there are only a handful of schools whose degrees carry weight in computer science fields: MIT and Berkeley, for example. If you can get into one of them, great. If not, just about any University will give you a worth-while degree. Go inexpensive and close. And talk to the counsellors there. Tell them what you want to do, and ask them what they can offer you. If they say "nothing special", try a different school. Some Universities are getting wise to the world, and offering game oriented tracks and degrees. They may so new, they might not be advertised yet! Good luck, and I hope you enjoy your time in college!
  23. Nychold

    General Programming Question

    Sure, sounds like fun. :) LogoWriter at 8. GW-BASIC at 10. QuickBasic (not QBASIC...there is a difference) at 12. Euphoria at 13. x86 Assembly at 14. Win32 Programming at 15. Java at 15. HTML at 15. javascript at 15. ANSI C at 16. OpenGL at 17. DirectX 7 (?) at 18. C++ at 18. (ANSI C++ at 19) AGI at 19. SCI at 20. Ada at 20. Visual Basic at 21. Forth at 22. Lisp at 22. Perl at 23. PHP at 24. Pascal at 24. Fortran at 25. Note, some these ages are approximate, and not mastery ages. Just when I learned enough to do something useful or fun. I'd be stressed to do any serious programming in half of them, today. A lot of the languages are clones. For example, AGI is Sierra's Adventure Game Interpreter, and the languge is very C-like. Likewise, SCI is very Lisp like. I'm sure I'm forgetting huge chunks of my life in programming, but basically, once I learned a language, I wrote a few programs, and moved on to the next one. Who'd have thought that I'd do my senior project on Compiler Construction. LOL I also wrote a small interpreter, and several virtual machines, each with their own assembly language that I still remember, but I won't bother putting those up either. A few languages that I posted aren't even still around. Euphoria, for example, was a compiler I found on a BBS years ago, that claimed to be as easy to write in as Basic, but as fast as C. I don't know about that, but it was pretty fast. A lot faster than Basic. LOL LogoWriter was just a PENUP, PENDOWN, DRAW 16 language. I'm sure the oldies here probably remember this language. ^_^ My brother and I used to write whole "games" in them. And the last few languages were out of necessity. College requires that you do certain types of programs. Web based, database, or modifying an existing program. (Oh, that reminds me...MatLab at 24.) So you learn or you fail. It's simple. ^_^
  24. Nychold

    General Programming Question

    Five languages? Hmmm... C/C++ first off. Start with the most popular language in professional development, especially game development. Java. Hugely popular in web/database applications programming. Also very similar to C++, so it has an easy learning curve. PHP. Also huge in web development, and gives you good solid understanding of web servers. Again, very similar to C, so not too much of a leap of learning. From here, pick any two languages you want. I would recommend Assembly (x86, since it's winning the PC war by leaps and bounds now that Apples are x86), and a scripting language. Python, for example. But don't stick to only learning x number of languages. Any professional programmer here will tell you, when you change jobs, you'll more than likely have to learn at least one new language. In the course of my studies in school and in working, I've had to learn Pascal, PHP, Lisp, Python, Perl, and Fortran. And that's just in four years. ^_^
  25. This is a big-endian/little-endian issue. Targa files are all Little Endian, which means the data is stored in low byte/high byte format. Take the following clip from a "hex-editor" 00 02 The first byte is the low byte, and the second is the high byte. It's a 16 bit integer. Since we have an array of 8 bit integers (chars), we have to construct a 16 bit integer. We do so by multiplying the high byte by 256, and adding the low value to it: 00 + 02*256 = 512 = 0x0200 It's similar to writing numbers in expanded form all those years ago in math: 31,459 = 3x10,000 + 1x1,000 + 4x100 + 5x10 + 9x1 except it's on a different scale. Instead of powers of 10s, we're using powers of 256, or 2^8 since there are 8 bits in a byte.
  • 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!