A Question Of Optimisation


Playdough

Still Fresh
Joined
Jan 7, 2007
Messages
61
Can anyone explain howcome a game can have system requirements lower than the GP2X, but then when ported the game plays slow on the GP2X?

The example I have in mind is Quake 2. The requrements to play this game in software mode are:

* Windows® 95 or NT 4.0 with 100% compatible computer system
* Pentium® 90 MHz Processor (133 MHz recommended)
* Memory:

Win 95 - 16 MB RAM Required (24 MB recommended)
Win NT 4.0 - 24 MB RAM Required

But as far as I know the current Quake 2 for the GP2X is quite slow.

Is making a fullspeed Q2 (that uses software mode) for the GP2X a matter of optimising code, or is there more to it?
Is the Pentium (or AMD or insert other PC processor here) itself just better at doing certain things than the GP2X ARM's - regardless of speed?

The main reason I ask it because a small minority of the GP2X population here DO have a love for 3D (yes, even if it's on a handheld) and considering what a good engine Q2 was, maybe software Q2 could be used as a base engine for many GP2X specific 3D games (as in, designed for the 3.5" screen and Gp2X controls in mind)?
 
I am in Madrid right now in an internet cafe (being extremely pissed off at the whole lot of these bandwidth hogging "I´ll go down to the internet cafe only to video-chat with my stupid friends on msn that I´ll see tomorrow in school anyways" dickheads because I can´t do my online banking as it´s fucking slooooooow) but I will answer this question just cause it makes me a little sad. There is plenty of information on why the architecture of and ARM processor is majorly different from the likes of Intel and AMD on this forum. The ARM processor that the gp2x utilizes is fast, yes, but it does not have float-point support or any other extensions that Intel and AMD processors have which would allow for a mathematical and graphical intense game like quake 2 to run at acceptable speeds. It is not a question of optimization at all but a question of what was the gp2x designed for. it was designed for portability, low energy consumption and mainly focused on homebrew software and emulation of older(!) console systems. If you have a look at the tremendous amount of software that is available right now for it, why would you want a portable quake 2 anyways? The controls are not even made for a game like that, better get a psp for 3d games. Try EgoBoo if you would like to know how 3d can look on the gp2x. That game is probably the best example for a partly optimized 3d game. It does not run flawlessly yet but maybe it can give you an impression of what is possible with 3d software acceleration (as this is the only thing the gp2x can do as there is no real h/w graphics acceleration implemented). Also you might enjoy playing quake 1 on it, which runs very fast and maybe you will realize that the controls are just not made for complex fps games. Play the doom-engine games available or duke nukem 3d!

EDIT: Dammit Craigix! you beat me to it!!!
 
First, I never had a look on the GP2X version of Q2. But are you sure that it runs any smoother on a 100MHz pentium ?

Second, you cannot compare a RISC and a CISC by looking at clock cycle only, as a CISC instruction generaly can do
severall things at once (like doing arithmetic on values stored in RAM).

Third, Q2 uses FPU for the rendering (IIRC). GP2X has to emulate with libfloat.

Last but not least : Q2 was designed to fit pentium architecture. Products that takes a specific architecture to its limits are probably not the easiest to port.
 
Playdough posted on Feb 5 2007 at 04:54 PM said:
Can anyone explain howcome a game can have system requirements lower than the GP2X, but then when ported the game plays slow on the GP2X?

The example I have in mind is Quake 2. The requrements to play this game in software mode are:

Compare the size and power requirements of the Pentium to the size and power requirements of the ARM processor, and you'll have your answer :)

Yes, the Pentium is much faster than the ARM processor (eg. it has a hardware FPU to start with, rather than the software FPU on the GP2X), but it also takes up significantly more power. I'd very much doubt it would run at all on a pair of AA batteries...
 
Last edited by a moderator:
Playdough posted on Feb 5 2007 at 04:54 PM said:
The main reason I ask it because a small minority of the GP2X population here DO have a love for 3D (yes, even if it's on a handheld) and considering what a good engine Q2 was, maybe software Q2 could be used as a base engine for many GP2X specific 3D games (as in, designed for the 3.5" screen and Gp2X controls in mind)?

Well if 3D is so important to you the GP2X is not the best choice. You may want to add a PSP or DS to your collection. The GP2X never was cut out for 3D and there are plenty of other choices that are. It will only get so good due to hardware, and that will never be as good as even a DS for 3D.
 
Last edited by a moderator:
Squidge, Rixed and Craigx, thanks for your answers. I don't know anything about processor architectures, but suspected that yes, the Pentium just has some abilities the ARM doesn't.
Lately there seems to be bit of animosity towards 3D on the GP2X, hence the timing for my question, and xnopasaranx, I'm happy you answered the way you did.

xnopasaranx posted on Feb 5 2007 at 05:15 PM said:
but I will answer this question just cause it makes me a little sad. There is plenty of information on why the architecture of and ARM processor is majorly different from the likes of Intel and AMD on this forum.
Now that some people have answered the question in particular I see how other similar posts apply to this. If that makes you sad... well I won't comment on that. I wasn't aware (I only suspected) that it was something Intel specific in this particular case, hence me ASKING the QUESTION. Why is that when a question is asked theres always atleast 1 person who makes it look like the answer is blaringly obvious and not worth asking? It's only obvious to those who already know the answer :p .

xnopasaranx posted on Feb 5 2007 at 05:15 PM said:
If you have a look at the tremendous amount of software that is available right now for it, why would you want a portable quake 2 anyways?

Another perspective I'll never understand.
How about "Because I just do"?
For me thats similar to saying"With all these apples, oranges, pears, and the other fruits we have around, why would you want meat?" Should everyone just stop trying to do new newer things for the GP2X just because there's already a lot of other stuff? It's an open system, some people will just naturally consider the possibilities. The fact that the handheld wasn't made specifically with 3D in mind doesn't mean it's a uesless aspiration.

xnopasaranx posted on Feb 5 2007 at 05:15 PM said:
The controls are not even made for a game like that, better get a psp for 3d games.
Well I enjoy having Quake 1 on it, and the controls are fine for me. I didn't see that as a possible reason why there's no fast Q2.

xnopasaranx posted on Feb 5 2007 at 05:15 PM said:
Play the doom-engine games available or duke nukem 3d!
Already do :p . In this case the idea for using Q2 as a base for GP2X specific 3d games, and not Q1 is because Q2 was just easier to make content for IMO.

My point for answering your post in detail?
Not all of us are coders, and some of us just never will be. I believe coding just isn't for me (atleast not on any useful level). HOWEVER that doesn't mean I wouldn't like to do other cool stuff with my GP2X or contribute to its user base. I'm a 3D animator, not the greatest fan of Sony, and believe it or not, I prefer to use an open system despite the fact that I can't code. I made an informed choice when getting this Handheld and am happy with it. There seems to be the idea around here that if you want anything to do with 3D on the Gp2X u should just get a PSP. Come on, give us some credit.
My line of questioning on these forums has always been with the intention of eventually contributing to the community in my own way however small.

Now tht I know why Q2 doesn't work well on The 2X, I will consider making some TC's for Q1 instead.
I think making anything knowing that it's for a 3.5 inch screen will make modding much simpler and easier than on current bigger systems so I would quite like that.

DaveC like many here I love the GP2X cause I'm nostalgic. That also applies nicely to my love of 3D.
I'm not looking for PSP style gragpics and effects :) so hopefully Quake 1 will be fine.
 
Last edited by a moderator:
Playdough posted on Feb 5 2007 at 07:45 PM said:
I'm a 3D animator, not the greatest fan of Sony, and believe it or not, I prefer to use an open system despite the fact that I can't code. I made an informed choice when getting this Handheld and am happy with it. There seems to be the idea around here that if you want anything to do with 3D on the Gp2X u should just get a PSP. Come on, give us some credit.
My line of questioning on these forums has always been with the intention of eventually contributing to the community in my own way however small.

100% agree.

Now tht I know why Q2 doesn't work well on The 2X, I will consider making some TC's for Q1 instead.

Who said there never will be playable Q2 on the gp2x ?? ;-)
 
Last edited by a moderator:
B)-->
b._.o._.b said:

I have that too, I was a big Decent fan back the, although I'm yet to really dig into the GP2X version. I doubt I will be planning to do any thing with that though, since I have no idea if that's moddable (honestly I didn't think it was).


Who said there never will be playable Q2 on the gp2x ?? ;-)

And I would be one happy son of a gun.
But in the meantime... :) .
 
Last edited by a moderator:
yeah - if good coders could port Quake 2 to PSX (which is way slower than gp2x and psx cpu does not have fpu either..) so there should be a way to port q2 to gp2x..
 
Playdough posted on Feb 5 2007 at 05:54 PM said:
Can anyone explain howcome a game can have system requirements lower than the GP2X, but then when ported the game plays slow on the GP2X?

The example I have in mind is Quake 2. The requrements to play this game in software mode are:
One point I did not see mentionned is that Q2 software renderer for the PC has its critical loops written in assembly language and that makes a difference.

When I ported Q2 to the PS2, I just swapped two instructions gcc could not schedule correctly in the critical loop of the renderer and voilà 10% more FPS, from 10 to 11 :D

Also floating-point can be an issue, especially since Q2 developers made some mistakes such as writing FP constants without trailing F, resulting in many computations being done as double instead of float, as per ANSI C rules.
 
Last edited by a moderator:
The Quake 2 port could definitely be further optimized and very likely made playable. I don't see why GLquake with Gpu940 would be any faster than woogal's port, it would more likely be a slower but better looking port.
 
evol posted on Feb 5 2007 at 09:28 PM said:
could the fp code be rewriten to fixed ?

Sure

evol posted on Feb 5 2007 at 09:28 PM said:
or would it take a massive amount of work so no one wants to dig into it ?

Exactly!
 
Last edited by a moderator:
evol posted on Feb 6 2007 at 12:45 PM said:
@Playdough
i seem to have missed that the map content were released
http://rome.ro/2006/10/quake-map-sources-released.html

Hey, thanks. I wasn't aware of the release (I haven't needed to reverse engineer any compiled BSP's in years, but this is something everyone who ever fiddled with Quake modding should have :) ).

To everyone else, atleast now I know that Quake 2 is theoretically possible. I was starting to think the differences in processors just meant it couldnt be done.
The hard part for me will be trying to work out what kinda things I can get away with (Mod/mapping wise), and what kinda ideas are better suited to a handheld.
 
Last edited by a moderator:
Playdough posted on Feb 6 2007 at 11:25 PM said:
To everyone else, atleast now I know that Quake 2 is theoretically possible. I was starting to think the differences in processors just meant it couldnt be done.

A lot of things are theoretically possible on the GP2X - fullspeed, full featured SNES, GBA, Genesis/MegaCD/32X emus, 3D, a fast PSX emulator, brilliant video player etc etc. But it all boils down to the fact that they take an extraordinary amount of work, often far beyond the scope of a hobbyist programmer who codes in their spare time.
 
Last edited by a moderator:
Playdough posted on Feb 5 2007 at 11:08 AM said:
I have that too, I was a big Decent fan back the, although I'm yet to really dig into the GP2X version. I doubt I will be planning to do any thing with that though, since I have no idea if that's moddable (honestly I didn't think it was).
OMG, you didn't know Descent was moddable? The Definitive collection came with 120 of the best user-made levels in the world and a level editor.

See here: http://www.descent2.com/tools/ Apparently they have 27 different helpful modding tools.
 
Last edited by a moderator:
Back
Top