Quake 2 on Falcon030

All 680x0 related coding posts in this section please.

Moderators: simonsunnyboy, Mug UK, Zorro 2, Moderator Team

User avatar
calimero
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2291
Joined: Thu Sep 15, 2005 10:01 am
Location: STara Pazova, Serbia
Contact:

Re: Quake 2 on Falcon030

Postby calimero » Thu Jun 04, 2015 8:45 pm

wow! you really made brilliant engine! These half life screenshots show engine in even better manner than Quake maps!
using Atari since 1986.http://wet.atari.orghttp://milan.kovac.cc/atari/software/ ・ Atari Falcon030/CT63/SV ・ Atari STe ・ Atari Mega4/MegaFile30/SM124 ・ Amiga 1200/PPC ・ Amiga 500 ・ C64 ・ ZX Spectrum ・ RPi ・ MagiC! ・ MiNT 1.18 ・ OS X

User avatar
CiH
Atari God
Atari God
Posts: 1136
Joined: Wed Feb 11, 2004 4:34 pm
Location: Middle Earth (Npton) UK
Contact:

Re: Quake 2 on Falcon030

Postby CiH » Thu Jun 04, 2015 9:44 pm

I'd really love to know where this is all going to end up. I suspect Doug hasn't worked that out yet! :mrgreen:
"Where teh feck is teh Hash key on this Mac?!"

User avatar
dml
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3474
Joined: Sat Jun 30, 2012 9:33 am

Re: Quake 2 on Falcon030

Postby dml » Thu Jun 04, 2015 9:55 pm

CiH wrote:I'd really love to know where this is all going to end up. I suspect Doug hasn't worked that out yet! :mrgreen:


Well, it probably seems quite random so far.

Just now I'm trying to figure out how much more can be bought for the least amount of effort by selectively adding bits and bobs (different kinds of hybrid lighting which seem to suit Falcon) and trying nearby things (like reading other game maps that share features).

There are a few difficult things which still need to be done to make it useful - submodels (movable scenery) - and object models being the most obvious.

But I'll probably start doing something with it before completing those things, and will get a sample version out for people to play around with meantime.

User avatar
Zogging Hell
Atari Super Hero
Atari Super Hero
Posts: 882
Joined: Sat Apr 29, 2006 12:08 pm
Location: Bristol, UK
Contact:

Re: Quake 2 on Falcon030

Postby Zogging Hell » Thu Jun 04, 2015 11:26 pm

Blimey Doug, I'm sure at some point I'm going to flip onto this thread to find you've got Crysis running on the Falcon... 8O
Firebee, Falcon CT60, Milan 040, Falcon MkI, TT, Mega STe, Mega ST + Lots of STs of various flavours

User avatar
dml
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3474
Joined: Sat Jun 30, 2012 9:33 am

Re: Quake 2 on Falcon030

Postby dml » Fri Jun 05, 2015 12:32 pm

Cobbled this together last night. Intentionally short, but should cover it!

https://www.youtube.com/watch?v=WpwlZgQPCpk

The upgrade only cost around 10kb of new code, so it was worth the extra digging involved in locating the info :)

[EDIT] fixed the link to the aspect-corrected version. previous upload was broken.
Last edited by dml on Fri Jun 05, 2015 2:08 pm, edited 1 time in total.

mikro
Hardware Guru
Hardware Guru
Posts: 2015
Joined: Sat Sep 10, 2005 11:11 am
Location: Kosice, Slovakia
Contact:

Re: Quake 2 on Falcon030

Postby mikro » Fri Jun 05, 2015 1:00 pm

To me, apart from Doug's usual greatness :), this is the definitive proof that good looking scenes do not need to be hires (320x200). It's very well visible in many demos (Tat's works come to my mind as typical examples where he's using 384x100 resolution; it's not as blocky as 160x100 would be and it still looks good). And when I saw this: https://youtu.be/UrJXPDuKV-A?t=1m17s I couldn't help to compare it with this: https://youtu.be/qqS37B9-FXY?t=2m29s .. bearing it mind Doug's engine does all the "unnecessary" stuff which could have been optimized away in a demo, I'm totally confident we could have such screen in 1:1 visual quality.

User avatar
dml
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3474
Joined: Sat Jun 30, 2012 9:33 am

Re: Quake 2 on Falcon030

Postby dml » Fri Jun 05, 2015 1:09 pm

Sorry - the aspect ratio got broken after uploading. It should have been letterbox, not square/squashed. It seemed ok in the preview. YT trying to be too clever again. I may redo it if I get a chance.

@mikro - agreed there's a lot of compute work involved in the camera's activites w.r.t the scenery - for a demo with a known trajectory you can just flatten a lot of the work at earlier stages and spend most of the time rasterizing instead. I haven't tried this yet but it's one of the experiments on the list. Also one of the tasks ahead - splitting the stages more cleanly to reuse specific bits without headaches.

User avatar
dml
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3474
Joined: Sat Jun 30, 2012 9:33 am

Re: Quake 2 on Falcon030

Postby dml » Fri Jun 05, 2015 1:16 pm

...in fact there one very specific, and high-gain optimization which could be done for a demo scenario with fixed trajectory. Currently the engine must throw polygons at the viewport which are within the viewcone AND in the PVS (set of potentially visible chunks from the current camera position, irrespective of view direction).

The PVS is necessarily conservative - it tends to switch huge lumps of map on and off as you move around. It is far from precise, but enough to get rid of most of the rest of the map, most of the time.

This means it is throwing fully occluded polygons at the rasterizer, much of the time. Polygons hidden completely behind walls. That puts a lot of pressure on the rasterizer backend to get rid of the unwanted stuff at drawtime.


However the rasterizer knows when even a single pixel of any specific polygon reached the framebuffer in the end - too late to be useful in a game, but not too late for a demo. This info can be fed back into the engine as a filter for replay, so it only throws visible polygons at the framebuffer to begin with. The speed increase should be... *quite good*.

It's absolutely CLF of course... but that's what we do in demos! :)

mikro
Hardware Guru
Hardware Guru
Posts: 2015
Joined: Sat Sep 10, 2005 11:11 am
Location: Kosice, Slovakia
Contact:

Re: Quake 2 on Falcon030

Postby mikro » Sat Jun 06, 2015 8:16 am

I guess it wouldn't be hard to store your movement + visibility information and replay it back? Just to make Amiga guys a bit disturbed? ;)

About CLF -- how do you think visibility in Ocean Machine's voxels or Silkcut's mountains is achieved? ;) The engine is much simpler, so only the sorting is precalced but that's it. Yeah. In fact, the Falcon version of Silkcut is the true breath taking material here because I switched the precalcs off (to be able to run it on VGA/60 Hz!)

EvilFranky
Atari Super Hero
Atari Super Hero
Posts: 870
Joined: Thu Sep 11, 2003 10:49 pm
Location: UK
Contact:

Re: Quake 2 on Falcon030

Postby EvilFranky » Sat Jun 06, 2015 9:39 am

mikro wrote:I guess it wouldn't be hard to store your movement + visibility information and replay it back? Just to make Amiga guys a bit disturbed? ;)

About CLF -- how do you think visibility in Ocean Machine's voxels or Silkcut's mountains is achieved? ;) The engine is much simpler, so only the sorting is precalced but that's it. Yeah. In fact, the Falcon version of Silkcut is the true breath taking material here because I switched the precalcs off (to be able to run it on VGA/60 Hz!)


Mikro - It would be good to read some more stuff like this about your TBL conversions, I don't believe there is a blog of sorts around?

User avatar
dml
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3474
Joined: Sat Jun 30, 2012 9:33 am

Re: Quake 2 on Falcon030

Postby dml » Sat Jun 06, 2015 10:06 am

mikro wrote:I guess it wouldn't be hard to store your movement + visibility information and replay it back? Just to make Amiga guys a bit disturbed? ;)


:) It should be easy to strip out the earlier layers so the sorting and visibility is precalculated. The thing I mentioned before could just help shave off the occluded polygons which couldn't be detected until later. I expect doing both together could get 150%-200% performance on complicated scenery. Only a few % on simpler stuff.

The collision detection itself takes about 5-15% even when the camera is not moving, because gravity is constantly trying to push the player box through the map, which must continually push back. It gets a lot worse if you walk across uneven ground, especially if the polygons are not axis-aligned. Eliminating that will also help remove framerate spikes.

mikro wrote:About CLF -- how do you think visibility in Ocean Machine's voxels or Silkcut's mountains is achieved? ;) The engine is much simpler, so only the sorting is precalced but that's it. Yeah. In fact, the Falcon version of Silkcut is the true breath taking material here because I switched the precalcs off (to be able to run it on VGA/60 Hz!)


I figured they were precalculating something but without a better frame of reference on those CPUs its difficult to guess what sort of things are going on under there :) It's easier for me to guess what *I* might try to precalculate, which could be a different thing completely :)

So the Falcon version is actually working harder than the original because precalcs are off?

User avatar
dml
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3474
Joined: Sat Jun 30, 2012 9:33 am

Re: Quake 2 on Falcon030

Postby dml » Sat Jun 06, 2015 10:13 am

Zogging Hell wrote:Blimey Doug, I'm sure at some point I'm going to flip onto this thread to find you've got Crysis running on the Falcon... 8O


:D

Probably won't manage that.


However a few speculations...

1) If Half-Life maps can be displayed, then I'm guessing TeamFortress #1 maps should work too. It's the same engine.
2) I think CounterStrike (#1) maps also uses the same format, or very close.
3) I have been reviewing the Source engine map format from a distance and its pretty close in some areas to Quake II, with a lot of 'optional extra' stuff added. I think it may still be possible to draw the static geometry from Source engine maps using a software rasterizer. That means HalfLife #2, Portal, CounterStrike/Source among others... having said that, later games rely more and more on the 'extra' stuff and less on the static geometry, so I don't know what the 'ugly factor' will be for each game when software-rasterized! Some of those maps are also immensely complex, and could be limited to slideshow performance.

User avatar
Zogging Hell
Atari Super Hero
Atari Super Hero
Posts: 882
Joined: Sat Apr 29, 2006 12:08 pm
Location: Bristol, UK
Contact:

Re: Quake 2 on Falcon030

Postby Zogging Hell » Sat Jun 06, 2015 11:22 am

In the low res Half Life's levels remind me a bit of Goldeneye, maybe with a few map mods... :)
Firebee, Falcon CT60, Milan 040, Falcon MkI, TT, Mega STe, Mega ST + Lots of STs of various flavours

User avatar
jvas
Captain Atari
Captain Atari
Posts: 449
Joined: Fri Jan 28, 2005 4:30 pm
Location: Budapest, Hungary
Contact:

Re: Quake 2 on Falcon030

Postby jvas » Sat Jun 06, 2015 11:42 am

Hats off DML, hats off. Brilliant!


User avatar
MasterOfGizmo
Atari God
Atari God
Posts: 1267
Joined: Fri Feb 08, 2013 12:15 pm
Contact:

Re: Quake 2 on Falcon030

Postby MasterOfGizmo » Sat Jun 06, 2015 2:10 pm

dml wrote:
AdamK wrote:I'm sorry Doug, but the coolest Quake2 engine ever has been done: https://www.youtube.com/watch?feature=p ... Mli33ornEU (Quake2 on osciloscope). You can only take 2nd place ;)


Yeah, was wondering when that was going to happen :)

X:Y plotting from a preprocessed 2ch audio sample. Not technically 'running' quake as such, but certainly does qualify as 'drawing' it in a cool and crazy way.


dml wrote:
AdamK wrote:I'm sorry Doug, but the coolest Quake2 engine ever has been done: https://www.youtube.com/watch?feature=p ... Mli33ornEU (Quake2 on osciloscope). You can only take 2nd place ;)


Yeah, was wondering when that was going to happen :)

X:Y plotting from a preprocessed 2ch audio sample. Not technically 'running' quake as such, but certainly does qualify as 'drawing' it in a cool and crazy way.


dml wrote:
AdamK wrote:I'm sorry Doug, but the coolest Quake2 engine ever has been done: https://www.youtube.com/watch?feature=p ... Mli33ornEU (Quake2 on osciloscope). You can only take 2nd place ;)


Yeah, was wondering when that was going to happen :)

X:Y plotting from a preprocessed 2ch audio sample. Not technically 'running' quake as such, but certainly does qualify as 'drawing' it in a cool and crazy way.

User avatar
dml
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3474
Joined: Sat Jun 30, 2012 9:33 am

Re: Quake 2 on Falcon030

Postby dml » Sat Jun 06, 2015 3:32 pm

Looking closer at the Source engine specs, two things stand out as difficulties.

1) The VTF texture format requires a special loader of its own - the source for that is available but depends on another NVidia loader (which may or may not be usable). It's also quite large. Not sure I would find time to write a new one for all the compression variants possible etc.

2) The world coordinate range seems to be +/-32768 where the Falcon engine is +/-4096. So the maps are probably too big in terms of dimensions. This I think is fixable - but fiddly, and probably disrupts support for the other engines.

Apart from those two things the rest looks like it could be made to work for the static parts of the maps at least.

User avatar
dml
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3474
Joined: Sat Jun 30, 2012 9:33 am

Re: Quake 2 on Falcon030

Postby dml » Mon Jun 08, 2015 8:42 am

At the weekend I had a shot at displaying maps for Source Engine / Half-Life #2 (2004).

This is proving quite difficult because I noticed quite late in the process that lightmaps are positioned within their own texture space, separate from base textures - and 16x the resolution of Q2 maps. (Something like Quake3 maps in native format). This means the maps can't be rendered as-is using the routines available.

The lightmaps are stored in a sort of HDR format (colourbits + exponent) so I translated that into linear colour for now.

The base textures are also so large that they wouldn't be usable as they are - even if I could read the VTF format (which I can't without a lot of extra effort).

So I had been trying to display just the geometry + lightmaps alone, which is kind of working at some level - but there's still something going wrong - invisible, disappearing & corrupted polygons. If I can figure out whats going on I'll post an update but I may not get time for a few days at least.
You do not have the required permissions to view the files attached to this post.

User avatar
dml
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3474
Joined: Sat Jun 30, 2012 9:33 am

Re: Quake 2 on Falcon030

Postby dml » Mon Jun 08, 2015 2:56 pm

Over lunch I made a bit more progress - the flaky geometry is fixed but the lightmaps are still very wrong. At least the map surfaces are present though and look sensible.
You do not have the required permissions to view the files attached to this post.

User avatar
dml
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3474
Joined: Sat Jun 30, 2012 9:33 am

Re: Quake 2 on Falcon030

Postby dml » Mon Jun 08, 2015 5:57 pm

heh heh :twisted:

Source Engine barely coming to life on F030!

Got the lightmaps sorta working. Starting to see light pools from windows and shadows from complex detail 'props' cast on walls and floors. The props aren't part of the static geometry so they won't show - but their shadows are visible.

grab0023.png

grab0024.png

grab0025.png

grab0026.png


I'll try to write some code another day which renders the lightmaps in truecolour and it should look a lot better. It's currently hampered by the surface cache which isn't needed if the base textures are ignored.

The HDR light levels will continue to be a problem, but not much can be done about that without relighting the levels, or always reindexing the lightmaps with some sort of normalizing function of the camera's locale.
You do not have the required permissions to view the files attached to this post.

DrTypo
Atari freak
Atari freak
Posts: 73
Joined: Sat Apr 09, 2011 12:57 pm
Location: Paris, France

Re: Quake 2 on Falcon030

Postby DrTypo » Mon Jun 08, 2015 7:04 pm

Source engine coming to life on Falcon... that's a red letter day!

Silliness aside, I like the experimentation you're doing. We're in completely uncharted territory here.

8-bit computers have been pushed quite far in modern days. It's nice to see people also pushing the Falcon...

User avatar
neo_rg
Atariator
Atariator
Posts: 24
Joined: Sat Jan 24, 2004 11:36 pm

Re: Quake 2 on Falcon030

Postby neo_rg » Mon Jun 08, 2015 7:52 pm

Not bad....

Bet you can't put a Rowntree's Fruit
Pastille in your mouth without chewing it... :D

User avatar
dml
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3474
Joined: Sat Jun 30, 2012 9:33 am

Re: Quake 2 on Falcon030

Postby dml » Tue Jun 09, 2015 12:41 pm

neo_rg wrote:Bet you can't put a Rowntree's Fruit
Pastille in your mouth without chewing it... :D


I think I tried it once as a kid, didn't last long :D

User avatar
dml
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3474
Joined: Sat Jun 30, 2012 9:33 am

Re: Quake 2 on Falcon030

Postby dml » Tue Jun 09, 2015 12:47 pm

DrTypo wrote:Silliness aside, I like the experimentation you're doing. We're in completely uncharted territory here.
8-bit computers have been pushed quite far in modern days. It's nice to see people also pushing the Falcon...


It is quite good fun to explore these map formats. I'm quite surprised that the complexity/performance of the static map data is remaining quite similar across such a wide span of time, from Quake 1 through Source Engine. The BSP tree ensured that each additional polygon incurred a diminishing cost relative to the previous, so doubling the map complexity doesn't incur double the cost, providing there are some walls in the way.

What really hurts is sprawling outdoor scenery. HL2 is full of that so while I haven't got anywhere near testing those levels I bet they don't work too well...

I notice the Source Engine maps also contain a lot of extra portal and occlusion data which my engine can't use so that probably won't help either.

AnthonyJ
Atari freak
Atari freak
Posts: 67
Joined: Sat Jan 26, 2013 8:16 am

Re: Quake 2 on Falcon030

Postby AnthonyJ » Tue Jun 09, 2015 2:32 pm

dml wrote:It is quite good fun to explore these map formats. I'm quite surprised that the complexity/performance of the static map data is remaining quite similar across such a wide span of time, from Quake 1 through Source Engine.

There is definitely a trend from the artists to move more and more detail into models that they build in standard 3D tools, and include less in the map itself. I guess that is probably linked to what you're seeing. I think this is partly because Maya / Max etc are better than Radiant for making detailed objects, and unlike in q3 where models could be baked into the BSP, HL and derived have more physics interactions with the map objects so keep them separate.

How far are you away from switching on rendering of models? I seem to recall you have done some refactoring to make that possible but it needs a bit more work...

While you're looking into other formats you might want to look at RTCW as another branch of q3-ish maps which might be within reach (esp. multiplayer centric ones, which perhaps have less detail?). Wolf:ET suffers from the outdoor problem I guess.

(impressive recent updates btw!)


Social Media

     

Return to “680x0”

Who is online

Users browsing this forum: No registered users and 1 guest