Need testers for my little opengl game
It's not finished. Most of the game has been tested pretty well, however, I'm having trouble testing the network gameplay portion. I really just started working on the network part, and I suspect that there will be some race conditions that will mess things up. I can only run it on one of my machines at the moment, since one machine is a dinosaur with video card/opengl issues, and the other is being used for an experimental Linux distro that I am working on, and at the moment it only has kdrive xserver (no OpenGL). So, anybody that can test the network portions of my game would be a big help.
Also, I have released the source, so you can look at it if you want, but be warned that I wrote most of it in highschool, so its kinda sloppy. It's licensed under the beerware license. Here is the link: http://www.betteros.org/games/download.html |
It say: "package is of bad quality" when i attept to install
Quote:
when i click ignore it fails to install. However my software center seems to be broken somehow. |
Quote:
If you are determined to test it, you can try to compile it from source. It's quite easy, just: gcc ut1l.c -lGL -lGLU -lglut -DAUDIO -lalut -lopenal -o UntitledOne You can leave out the -DAUDIO part if you don't have openAL or if the sound is too annoying (its not done yet). |
~/Desktop$ ./UntitledOne
freeglut (./UntitledOne): glXCreateContextAttribsARB not found Maybe you should provide more detailled info about required dependencies or how to build and run the program, or a functional debian package. |
Just got back from Korean class, now I hopefully I can fix some of these issues.
Quote:
Quote:
The dependencies are: libGL libGLU FreeGLUT or GLUT or OpenGLUT (OpenGLUT is untested) Optional Audio Support: OpenAL libalut |
Ok, I uploaded a new .deb package, the files are now owned by root instead of prushik, so it should work.
I also added a list of dependencies on the webpage. I also changed the source package to a little tarball with a makefile and a pseudo-configure script. Although just compiling with gcc is still just as easy, ./configure && make is more familiar to many folks. http://www.betteros.org/games/download.html |
now i can't downlaod deb package, ita says 404 error not found.
|
Quote:
|
Quote:
|
Ok, just uploaded my updated source code. It should fix the glXCreateContextAttribsARB problem, and network play should also work.
Debian packages have been fixed again (hopefully). Changes: -missile sound has been changed to something less obnoxious -explosion sounds are in place, but they suck -network play connection fixes -added a (hopefully) more accurate method of measuring time (which can be compiled out by passing -DSLOPPYTIME to gcc) |
I get the same error again (glXCreateContextAttribsARB not found).
I have: GLX version: 1.4 OpenGL version string: 1.4 Mesa 7.10.2 |
Quote:
Nevermind... I checked my source again and I seem to have added the problem code back in... If you want to get it working, remove line 307 and recompile it and it should work. The line that says: Code:
glutInitContextVersion (3, 1); Sorry about that. |
I could run the game but it's very slow and keys are not working as expected.
|
Quote:
However, I have not yet tested the new timing mechanism on more than one machine, so next time I will revert to the old timing mechanism. Where did you see speed as an issue? During solo gameplay, network gameplay, or in the menus? Are you using 32 bit or 64 bit? It's really not a very resource intensive game, speed shouldn't be an issue (except in network games). |
Something is wrong with keyboard mapping. You probably should fix that first.
|
Ok, that's strange. Could you describe the problem you are having? Both of my computers have no keyboard issues, although, since the keyboard code was ported from Windows to GLUT, there definitely could be problems with it.
|
Pressing left and right arrow keys do nothing. On which distro have you tested it?
|
Quote:
The left and right keys do not have any functionality during the menu, and also while the player is on the ground. A minimum test case for testing those keys would be navigating through the menu to some gameplay mode (Classic, Asteroids, or Targets; Using up and down keys), Selecting that mode (Return key), Leaving the ground (Up key), and then turning either left or right (left and right keys). Also, it could be helpful to note if the problem is limited to the special keys, or if the problem is also apparent in the wasd keys as well (select classic mode) |
Ok, the up key must be used first. But it's still very slow. Maybe you should make the program more configurable (at run time or by allowing command line arguments). I'm on Natty BTW.
|
Quote:
Currently, entering a command line argument causes the game to jump into a network game with whatever IP address you entered on the command line, I would like to keep that on the command line even when I consider the game complete, however, I could easily parse other types of arguments if necessary, maybe change to a more GNU getopts argument style, if it was desirable. |
Quote:
|
Quote:
That being said, I am sure your speed issues are not a resources issue, the game uses very little resources (not even any textures, and sounds are less than 1000 bytes each), so your speed issues must be due to something wrong with my timing system. If you compile with the -DSLOPPYTIME flag, I think your problems will be resolved. I like the idea of compile-time configuration better than runtime configuration, just from a stance of not wasting resources. |
When compiling with -DSLOPPYTIME, I got errors. I could fix them but I still find the game not responsive enough on my box.
Do you have a windows version? I could give it a try on xp and see the original game behaviour. |
Quote:
I just uploaded them to the website, there is a regular version and a sloppy timings version. http://betteros.org/games/download.html |
Unfortunately, there was some missing dll (libglut-0.dll) and when I finally could grab this one, it was still broken (bad version probably) so...
|
Quote:
However, for reference, I used FreeGLUT instead of GLUT, although I thought they were binary compatible. If you re-download, hopefully it will work. |
I still got the same error (missing libglut-0.dll).
|
Quote:
|
Quote:
http://betteros.org/games/download.html |
I got a crash (bsod). For which version of windows is it compiled?
Maybe you should make a portable version including all required dll's to avoid that. Anyways, if you're cross-compiling, it's not that easy... |
just reporting that the game runs fine on my system (Linux lolwabbit 2.6.39-gentoo-r2 #9 SMP Wed Dec 14 18:31:40 CET 2011 x86_64 Intel(R) Core(TM)2 Duo CPU T9400 @ 2.53GHz GenuineIntel GNU/Linux).
the code looked fairly nice as well. globals are indeed very bad, but you know that, judging by your comment. you should probably divide the game up into more files and use autotools for building it as well. furthermore, I would recommend putting it up on github, which makes collaboration easier. maybe someone will help you. :-) |
Quote:
Thank you. I would split the source up into multiple files, but I kind of like the fact that everything is contained in one file. That's why I'm even hard coding the sounds into the source, to make sure everything is contained in one file, and compiled into one executable. In any other scenario I would most certainly do that, and when it comes time to make the sequel, it will be done that way from the start. I definitely do not want to use autotools however, IMHO autotools is a huge mess, and I avoid it whenever possible. At this point, compiling is so simple that such a build system shouldn't be needed, however, I realize that many people are familiar with the GNU autotools build procedure, so to accommodate, I have a configure script myself which mimics the GNU autotools syntax and functionality, and can even be used to cross compile. Although I admit that I have been lax in updating it, it still lacks support for enabling sloppy timing, I'll do some work on it today. As for moving to github, its probably a good idea. Personally, I am not all that familiar with git, for most of my other projects I have been using subversion repositories hosted at Assembla, since Assembla was the only host I could find that wouldn't constrain my license options to copy-left licenses. So, if it would truly be helpful, and github does not force me to use copyleft licenses, then I will gladly move source to github. |
Quote:
I'll see if I can figure out whats going so wrong with my builds instead of just trying different permutations (which is an antipattern I'm afraid) |
Quote:
Quote:
github provides you with some nice features, such as pull requests. this means that a user can fork your project, do some changes, and send you a pull request for their commit. you can review their commit, and pull it if you find it agreeable. it's just all-round pleasant to work with. git in general is amazing. with svn et al., I'm generally very afraid to bork things on larger projects, and find myself wrestling with the system whenever I need to do something remotely complex. git on the other hand is actually fun to work with. you just hack and play. it's all very pleasant, just like the github. |
Quote:
Edit: Eh. well, turns out GLUT doesn't have a way to do exactly what I want, its timer callback is basically a busyloop without adding any sleep functions. So, with no platform independent options, I decided to use the preprocessor to use Sleep() instead of usleep if you don't compile on Unix. Now it compiles and runs at the right speed on Windows (well.... it runs on Wine). |
Quote:
Quote:
alright, I set up a git repo on github. I think I have done everything correctly, take a look and let me know. Thanks! https://github.com/prushik/untitledone |
BTW, I've tested your game on a linux box with: Ubuntu natty, Intel Atom 1.6GHz processor, 1GB RAM. Does the game need a faster proccessor or more RAM?
|
Quote:
However, it looks to me like Untitled one uses about 25.2 MB of RAM, which is a hell of a lot more than I expected, but still not much, each of my chromium tabs uses more than that. As for processor usage, on my machine, its only using about 1% or less at all times, it really isn't resource intensive. Do other OpenGL applications run slowly on your machine as well? Maybe your OpenGL implementation is to blame. Also, have you tried compiling with audio disabled? |
Hmmm, I'll give it a try on another machine and see what happens.
|
Quote:
If you don't mind wasting some of your time, I will write a special build that will still run slowly, but will generate some output which you can send back to me and will tell me exactly which parts of the code are slowing it down for you. Do you mind? |
Quote:
|
Quote:
The resulting executable will print out a lot of stuff, its all just timing information, you can redirect the output to a file or you can just copy and paste some of it here. The last number on each line is the length of time that your CPU is idle per step, for me it was always 33ms or 34ms, which is pretty much as good as you can ask for. The game shouldn't start to actually slow down unless the last number reaches 0 (or if you have sloppy timing enabled), in which case the numbers before it should always add up to 34 or more, showing which part of the code uses wastes the most time. https://github.com/prushik/untitledone |
Here is what I got:
Code:
~/Desktop/prushik-untitledone-c91d028$ ./UntitledOne |
Quote:
According to that it is as I suspected, the actual calculations are taking no time at all, its the code that actually draws stuff on the screen that is the problem. I think I should be able to fix it, it was something that should have been done in the beginning, but I really didn't understand OpenGL well when this was written, so its really just laziness that has prevented me from fixing it until now. Also, according to those numbers, it looks like the menus are running at the correct speed, with the exception of whatever craziness happened at 1707 (maybe you moved or resized the window?). Are the menus in fact running at the correct speed? |
Quote:
|
Quote:
|
Quote:
I have committed some changes to the git repo which should increase execution speed significantly, although if you were having speed problems, then "Asteroids" mode may still suffer from slow speeds, although it should be a bit faster. I also made sloppy-timing the default again since I was having occasional issues with the more accurate timing system; This means that if you are having speed issues, you should compile like this: Code:
./configure --disable-sloppy-timings Code:
gcc main.c -lglut -lGLU -lGL -lm -DAUDIO -lopenal -lalut -o UntitledOne Code:
gcc main.c -lglut -lGLU -lGL -lm -DINSTRUMENT -DAUDIO -lopenal -lalut -o UntitledOne |
I have also just added some code for fullscreen friendliness.
If you configure with the --enable-fullscreen option, or compile with -DFULLSCREEN, then the resulting executable will run in fullscreen mode, and should look much better than previous fullscreen executables. Note that some gameplay modes will be easier in fullscreen mode because it gives you slightly more room to fly around, network games with one person using fullscreen will put the windowed player at a disadvantage. You should also be able to achieve better asteroids scores in fullscreen mode, although, you can't cheat in asteroids mode like you could before (by enabling fullscreen and staying near the edge where the asteroids can't reach). I also changed the colors of the targets to make them look less flat and dull. I also changed a few ship colors as well. Remember to test out the newer and faster rendering code. |
It's better but still too slow. Maybe the issue relates to hardware (Indietrash didn't report any speed issue with a 2.5GHz CPU.)
|
All times are GMT -5. The time now is 03:50 PM. |