PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

Crappy PocketQuake source mod

OrIgInAlCampass · 01 Feb 2004, 23:45 UTC
I've been piddling with the pocketQuake source over the past few days and have removed a few graphic details with the hopes of increasing framerate. In "timedemo demo1", I get 8.2 - 8.4 fps in the original PocketQuake, 8.9-9.0 with this version. The binary can be downloaded from:

http://209.34.19.154/pqtest.exe

All changes in the source I made can be found by using "Find in files" and looking for the string "OCA|".

http://209.34.19.154/pqtestsrc.zip

Changes (off the top of my head):

-Killed dynamic lighting
-Removed sky updates (clouds stand still)
-Removed screen flashes from item pickups (no apparent performance benefit, may revert this)
-Re-enabled the gamma slider (doesn't effect the skin, only the gameplay window)

There is only one known bug as a side effect of my changes. Because the sky *never* updates, if you load a level with one sky (say, the start map, with the purple one) and then load a level with another type of sky (e1m1, with a light blue sky), the sky in the second level will have the appearence of the first. This shouldn't be too hard to fix, but damnit, the superbowl is on and I intend to watch it ~

With only a very basic understanding of C/C++ and no real understanding of how the Quake engine works, I may not be able to do much more with the source than this. I will keep looking into things though, as I have more ideas for details that could be sacrificed for framerate but can't figure out how to pull it off (for instance, don't draw "decorative" entities like torches, don't swirl the water/lava/teleport texture, etc). I wouldn't hold my breath though =/

-OCA|
Not too shabby! However I think it may reach a point where there are just so many little sacrificies, it'll add up to making it not Quake
OrIgInAlCampass · 02 Feb 2004, 01:10 UTC
That won't happen, at least, not with the work I'm doing. I've spent more time playing Quake in my life than I'd care to admit and am NOT going to do anything that would change the atmosphere of the original game. The static lights are staying. I'm not touching the sound (I love Quake's ambiance). And when I get a somewhat better understanding of the Quake engine, most (if not all) of my changes will be console veriables.

-OCA|
Is that the nick you went by during Quake? I too have logged way too many hours playing TF, and still do occasionally to this very day.
You should make all of these things console variables so that people can choose what's on and off. Then we could just merge it with the main source and binary and people would have the choice to optimize this way or not. That's my suggestion.
OrIgInAlCampass · 02 Feb 2004, 03:48 UTC
Eh, my nickname back during the Quake heyday was "Stalker". I learned that a few dozen others had that handle so I kept an ear out for a new name.

It was in Quake II, when I was playing one-on-one with a good RL Friend of mine, when I took OrIgInAlCampass (which is abbreviated OCA| where possible). The score was something like 20 (me) to 0 (him), and I was camping like a whore. In frustration he shouted "You.. you... you..... CAMP.... ASS!". I changed my name to Campass. He told me to be more original. It then became OrIgInAlCampass, which is my handle when OCA| and/or OCA are taken.

Funny thing about my quake years though - I never did much netplay. My computer was crap, there weren't any good servers located close enough for a good ping (even on QuakeWorld). So the vast majority of the time was spent playing modem or serial games (at the time, I was in junior high, and the $300 total cost of a hub and NICs was out of the question). We mostly played SuperHeroes, Killer Quake Patch (the one back before it required a .pak file and had more keybindings than keyboards had keys), Airplane Quake (NOT Airquake, it might have been under a different name, but it had only one flying vehicle, added a stinger missle for on foot), and Reaper Bots (where we'd cooperate againsed as many bots as our computers could handle).

At some LAN parties we still play quake. It depends on who's attending mostly - the old schoolers jump at the chance to play quake1, while the newcommers would much rather play CounterStrike or Battlefield 1942.

Quake was the game that got me into PC gaming. Actually, no, I would have to go as far as to say it's what got me interested in computers. It was all the time I spent upgrading my computer, tweaking settings, etc. to get just a few more FPS so I wouldn't have to run in 320x200, that forced me to actually learn what I was doing.

I think I'll stop rambling now =)

-OCA|
OrIgInAlCampass · 02 Feb 2004, 03:50 UTC
James Sonne wrote:You should make all of these things console variables so that people can choose what's on and off. Then we could just merge it with the main source and binary and people would have the choice to optimize this way or not. That's my suggestion.


That's next on the todo list. Right now though, I don't know enough about the engine to figure out how to do that. I'm sure I'll have it down in a few days and a bit of trial and error.

-OCA
hey there, cool to see someone playing with the source. I'm a newb coder. I downloaded all the dev tools (i think). I have C++ embedded 3.0 and 4.0... i try to load the source and get some kind of fatal error. RC1015. I'm trying to load the PocketQuake.rc file (is this something like a dsw file? Which version of embedded does this source work with?

Thanks
Caleb
OrIgInAlCampass · 02 Feb 2004, 14:27 UTC
Anonymous wrote:hey there, cool to see someone playing with the source. I'm a newb coder. I downloaded all the dev tools (i think). I have C++ embedded 3.0 and 4.0... i try to load the source and get some kind of fatal error. RC1015. I'm trying to load the PocketQuake.rc file (is this something like a dsw file? Which version of embedded does this source work with?

Thanks
Caleb


Load PocketQuake.vcw in Embedded C++ 3.0. Assuming you have the PocketPC 2002 SDK installed, all you need to do to compile after opening that file is to copy the "gx.h" file from the PocketQuake source zip to "C:\Windows CE Tools\wce300\Pocket PC 2002\include" (assuming you used the default installation path). Then it should compile without trouble.

-OCA|
Good to see someone working on the pq source. What else do you have planned?
OrIgInAlCampass · 02 Feb 2004, 20:12 UTC
My plans are simply to sacrifice some graphic details for framerate. Don't get your hopes up, I'm not good at coding. I wouldn't even say that I know how to program. Everything I've done so far has been trivial at best (simple if statements, commenting out function calls, etc).

Hopefully I'll be able to squeeze another 10-15% performance increase without changing the feel of Quake. Adding real features is beyond my abilities.

-OCA|
OrIgInAlCampass wrote:
Changes (off the top of my head):

-Killed dynamic lighting
-Removed sky updates (clouds stand still)
-Removed screen flashes from item pickups (no apparent performance benefit, may revert this)
-Re-enabled the gamma slider (doesn't effect the skin, only the gameplay window)


Of those 4 mods, the dynamic lighting is the only thing that could possibly increase performance. GLQuake uses r_dynamic to enable / disable dynamic lighting, so that is the value you should use as well.

The fact that the clouds are moving means nothing performance-wise. Now if you weren't rendering the sky at all then that would help performance. The animation comes from simply offsetting the texture coordinates based on time, which is a trivial thing to do. Screen flashes in software mode are done via a palette trick (if I remember correctly), so it should cost no performance either as you have discovered.

Dan East
How would disabling sky give anymore of a performance increase, wouldn't it be akin to just removing the texture from a wall? The Quake sky is just 2 layers from what I see.

Quake's flashes are indeed done by a pallete switch.
OrIgInAlCampass wrote:My plans are simply to sacrifice some graphic details for framerate. Don't get your hopes up, I'm not good at coding. I wouldn't even say that I know how to program. Everything I've done so far has been trivial at best (simple if statements, commenting out function calls, etc).

Hopefully I'll be able to squeeze another 10-15% performance increase without changing the feel of Quake. Adding real features is beyond my abilities.

-OCA|


The current version of pq qorks fine for my liking. I'm just interested in getting better peformance, so your coding job is good in my opinion.
Ok I do have all those things, but it seems like somehow the path isn't working.. like it can't find a bunch of stuff.. here is an example of the errors i get..

--------------------Configuration: PocketQuake - Win32 (WCE ARM) Release--------------------
C:\Documents and Settings\Caleb\My Documents\Visual Studio Projects\PocketQuake\zlib\zutil.h(87): Could not find the file alloc.h.
C:\Documents and Settings\Caleb\My Documents\Visual Studio Projects\PocketQuake\zlib\zutil.h(119): Could not find the file unix.h.
C:\Documents and Settings\Caleb\My Documents\Visual Studio Projects\PocketQuake\WinQuake\vid_ppc.c(30): Could not find the file gx.h.
C:\Documents and Settings\Caleb\My Documents\Visual Studio Projects\PocketQuake\WinQuake\vid_ppc.c(31): Could not find the file Aygshell.h.

and so on....
then at the end

Generating Code...
Error executing clarm.exe.

PocketQuake.exe - 2 error(s), 0 warning(s)

should I have just used the default paths? this seems like its just a matter of where the source is located..


Thanks!
Caleb
can't get the link to work, any help?
OrIgInAlCampass · 25 Feb 2004, 20:11 UTC
http://209.34.20.35/pqtest.exe
http://209.34.20.35/pqtestsrc.zip

My webserver is on a dynamic IP that changes once a month or so, so the links will stop working every now and then.

Some bad news with this though - my spare time to work on this project has ceased to exist. Things got crazy here fast-like. Hopefully things will return to normal in a few months...

-OCA|
OrIgInAlCampass · 26 Feb 2004, 07:45 UTC
This is nifty. Thanks for the info.

You should now be able to get the files from:
amich.dyndns.org/pqtest.exe
amich.dyndns.org/pqtestsrc.zip

-OCA|
cheers :D [/code]