Current MS Students/Neal Patel/CS590
From CSWiki
This is Neal's page.
Contents |
[edit] Jan 6 (week 1)
Need to talk to Kang about some ideas for game engine
[edit] Jan 12 (week 2)
View some open source game engines written in C++ to see how they work
Looked at Crystal Space 3d game engine
Crystal Space is a free (LGPL) and portable 3D Game Development Kit written in C++. It supports: lightmapped and hardware based lighting, shader support (CG, vertex programs, fragment programs, ...), mipmapping, portals, mirrors, alpha transparency, reflective surfaces, 3D sprites (frame based or with skeletal animation using cal3d animation library), procedural textures, powerful and flexible particle system, halos, volumetric fog, scripting (using Python, Perl, Java, or potentially other languages), OpenGL and software renderer, font support (also with freetype), hierarchical transformations, physics plugin based on ODE, 3D sound.
[edit] Jan 19 (week 3)
Spent the week trying to compile and run crystal space 3d game engine and was unsucessful. Was able to download all approriate pre-built libraries and dll files used by Crystal Space, i.e. `libz-cs.dll', `libjpeg-cs.dll', `libpng-cs.dll', etc given but when compiling the demo Walktest which is a program that shows many of the features of the 3D engine would not run. Was extremely frustrated due to the fact that the online documentation for runing the engine is not very detailed. I due believe that since game engines require specific requirements such as graphics cards, later versions of direct x which is a Software Development Kit and even Microsoft Developer Studio .NET or the stand alone version of Microsoft Visual C++ 7 (.NET 2002), Microsoft Visual C++ 7.1 (.NET 2003) or Microsoft Visual C++ 8 (.NET 2005), can be reasons to why the program will not run. Therefor I currently do not have a demo to present this week. I due however feel optimistic this game engine will work since I currently am in the process of updating my system to meet the requirements to compile and run crystal space.
Also it is worth while to mention I am currently just testing Crystal Space 3d using Micrsoft Visual C++ to see the performance. If the performance is not to my liking I will be using MinGW, the Minimalist GNU compiler for Windows. MinGW is a collection of freely available and freely distributable Windows specific header files and import libraries combined with GNU toolsets that allow one to produce native Windows programs that do not rely on any 3rd-party C runtime DLLs.
[edit] Jan 26 (week 4)
This week was a productive week. As you may be aware I wanted to work on the crystal space 3d game engine but was constantly failing to get even the simpliest of demos up and running. This may be because of my system requirements or perhaps that the game engine is far complex. Well in any case I stepped away from crystal space (for now) and ventured into another open source game engine G3D or aka Graphics 3d.
G3D is a commercial-grade 3D Engine available as Open Source (BSD License). It is used in games, tech demos, research papers, military simulators, and university courses. It can support real-time rendering, off-line rendering, back-end game server management of 3D worlds, and use of graphics hardware for general purpose computing.
G3D provides a set of routines and structures so common that they are needed in almost every graphics program. It makes low-level libraries like OpenGL and sockets easier to use without limiting functionality or performance. G3D gives you a rock-solid, highly optimized base from which to build your application.
click below for installation and tutorials on G3D
I was able to successfully install, compile, and run the demos from the tutorial given for G3D on my machine and home with no problem. Using my labtop I ran into several problems relating to performance issues. Therefore I will try to show a demo of G3D using the PC in class if there are no problems with downloading, installing, and running the application.
Conclusion: G3D game engine does not seem to be as advanced as far as capabilities pertaining to gaming. This is just at first glance. A full research and study needs to be done on this app. But from what I have learned from this program and crystal space 3d, the capabilities as far as gaming and handling the crystal space engine seems to be better. However I still want to get the demos running for crystal space running and continue to work with G3D to see if this could be a possibilty in regards to my thesis.
[edit] Feb 2 (week 5)
Game Engine A game engine is framework that “integrates a 3D graphical gaming environment with intelligent techniques for generating and controlling interaction in order to create an engaging and coherent user experience. The controlling interaction refers to the heart of what a game engine does—it regulates the players in a way that produces a desired effect
G3D: What is it!
G3D is a 3D Engine designed for games, tech demos, research papers, and military simulators. It provides a set of routines and structures so common that they are needed in almost every graphics program.
G3D allows you to write code once that will compile and run on Windows, Linux, and OS X without ifdefs or modifications. It supports all OpenGL implementations, from software rasterization under Mesa to the latest GeForce and Radeon hardware accelerator cards. G3D is built on OpenGL because it is platform independent and allows access to newer features than DirectX. Many top games (including Doom 3) are written with OpenGL. Unlike higher level engines G3D does not restrict access to low-level features-- every graphics card function in OpenGL is exposed under G3D, even if it isn't wrapped by a higher level API. This means you can always drop down to raw OpenGL calls if needed.
If you are not familiar with OpenGL basically it is a OpenGL (Open Graphics Library) is the interface between graphics program and graphics hardware. It provides low-level functionality, where all objects are built from points, lines and convex polygons. Higher level objects like cubes are implemented as six four sided polygons. OpenGL is also system independent, where it does not assume anything about hardware or operating systems. It’s only concerned with efficiently rendering mathematically described scenes. With OpenGL there are no windowing capabilities. It is a however a state machine, where at any moment during the execution of a program there is a current model transformation, a current color, a current light type and position. Lastly, OpenGL is a rendering pipeline in which it defines objects mathematically, arranges objects in space relative to a viewpoint, calculates the color of the objects, and rasterizes the objects. All the commands used in OpenGL begin with letters gl. For instance, the following functions are all commonly used in OpenGL programs: glBegin, glEnd, glOrtho and glViewport. It supports features like 3-dimensions, lighting, anti-aliasing, shadows, textures, depth effects, etc.
G3D also G3D uses SDL (Simple DirectMedia Layer) for platform window management. Basically Simple DirectMedia Layer is a cross-platform game programming library. SDL uses the OS's native multimedia support to provide fast graphics and low level access to sound, and input processing on several platforms. Such input devices are keyboard, mouse, and joystick. SDL also provides a portable way to create OpenGL contexts, and can be used as a much more powerful replacement for the GLUT toolkit. SDL currently supports Win32, Linux, FreeBSD, IRIX, MacOS, and BeOS. SDL is written in C, but works with C++ natively and has bindings to several other languages, including Java, Perl, PHP, and Python.
Downloading G3D:
1. Download the latest [g3d-xxx.zip from http://g3d-cpp.sf.net] Unzip all of the files in the distribution to your library directory (e.g. c:\libraries). Note that the single download contains precompiled binaries for MSVC++ 6, MSVC++ 7, gcc on Linux, and Xcode and gcc on OS X.
2. Download and install SDL version 1.2.7 from [2]: Win32, Linux, OS X
3. Microsft Visual C++ 6.0 and Microsoft Visual C++ 7.0 (which comes as part of Microsoft Visual Studio .NET 2002 and 2003) require different versions of the library, and a few different installation steps. Precompiled binaries for MSVC 6 are located in win32-lib and precompiled binaries for MSVC 7 are in win32-lib7. Figure out which one you're using, and point to the right G3D binaries, or you will have strange trouble, including linker errors and memory leaks.
4.(if using MVC++ 6)
1. Install Service Pack 5. (Service pack 6 does not support the processor pack) 2. Install the Processor Pack.
5. In Tools:Options:Directories, add the g3d include directory (e.g. c:\libraries\g3d-6_00\include) to the include list. Make sure it preceeds all other include directories.
6. In Tools:Options:Directories, add the g3d lib directory (e.g. c:\libraries\g3d-6_00\win32-lib) to the library list.
Application Framework:
G3D::GApp
This is an application-starter class. To easily create a G3D application, make a subclass of G3D::GApp, which handles any state shared between all pieces of your program.
G3D::GApplet Class Reference
A self-contained mode of operation for an application; a "screen". One large-scale state of an application. For example, a game might have one GApplet subclass for the title screen, one for the main menu, one for the game itself, and one for the credits.
For each frame, the GApplet has several tasks that can be implemented by overriding base class methods. The use of cooperative, round-robbin scheduling avoids the need for threads in most applications. These tasks are:
* doGraphics(G3D::RenderDevice*) * doUserInput(G3D::UserInput*) * doLogic() * doNetwork() * doSimulation(G3D::RealTime, G3D::SimTime) * doWait(G3D::RealTime cumulativeTime, G3D::RealTime desiredCumulativeTime)
To invoke a GApplet and let it control the main loop, call run(). To control the main loop explicitly, invoke beginRun on initialization, call oneFrame() from the main loop, and call endRun on cleanup.
A G3D::GApplet is a usable but not standalone component of your application. Each GApplet corresponds to a different major UI state. For example, the main menu of a game is one GApplet, and the actual game screen is another. If you have a big, modal in-game menu, that can be another GApplet. (A GApplet is not like a Java applet. A Java applet is a little application, but complete, and standalone, while a GApplet is neither complete nor standalone.)
You may create one or more GApplet subclasses and instantiate them at the beginning of the program. Typically, they will be stored in your GApp subclass. You do not need to use GApplet's, however; you can just use GApp, if your application isn't too complex.
You write code that calls G3D::GApplet::run on the current GApplet. That applet releases control by setting GApplet::endApplet = true. Your master loop (implemented inside the G3D::GApp::main) then chooses the next GApplet to run and invokes run() on it. If anything sets G3D::GApp::endProgram to true, the entire program should quit.
G3D Website [3]
[edit] Feb 9 (week 6)
Spent the week working with g3d learning the classes and online documentation. Also spent time refreshing myself with OpenGL by looking at the code for some of the demos provided. I still need to program the tutorial. Also decided to go with the idea of writing a thesis paper on differentiating on what game engine to use when deciding to build a game sort of like a game engine analyzer. This is not final but this week I will got to Professor Kang for her input and if she agrees maybe I have my thesis.

