Allegro.cc - Online Community

Allegro.cc Forums » Off-Topic Ordeals » Any interest in a 'ray casting' competition?

This thread is locked; no one can reply to it. rss feed Print
Any interest in a 'ray casting' competition?
Thomas Harte
Member #33
April 2000
avatar

It cropped up recently in another thread and I've thrown my mind back to the great long ray casting threads of the past and am considering organising a little ray casting competition. This thread is intended to canvas interest.

General rules would be that only ray casting style algorithms are allowed (i.e. the overwhelming portion of the display is calculated conclusively by rays cast in a predictable and sequential fashion - if anybody really needs a definition), judging would be done by vote amongst all entrants (voting for your own entry disallowed), aim would be to create at least a 10 minute segment of gameplay - which will probably mean a level or two. A number of categories would exist for awards, including one specifically flagged up for engines substantially put together during the period of the competition. Hence people with existing code can enter but those who write from scratch get a bit of a bonus.

Sample artwork for optional use and basic plot would be provided at the start of the competition and the whole thing would run for maybe a month. Since those of us writing from scratch will probably need to come up with a level editor as well. Or else spend some quality time with graph paper!

I guess entries will have to be by source code so that all entrants can judge each other properly. If necessary an agreement not to further distribute source can be made and after results only binaries made available.

Possibly a drawing library will be provided offering the basics (i.e. column filling for walls, row filling for floors), as the Allegro sprite scaler is rubbish for this sort of purpose and nothing suitable for floors is included.

Categories are likely to include, off the top of my head:

- best technical
- best audio
- best visual
- best gameplay
- most atmospheric
- most promising (i.e. if a whole game were to be developed)
- best wholly original (the category for those who substantially created code during the month period)

If anybody would be interested in providing art or sound, please post!

Fladimir da Gorf
Member #1,565
October 2001
avatar

By "Ray casting", you mean a wolfenstain-like engine, or are all kinds of engines allowed that use ray casting in some way (for example, something like my isometric engine)?

OpenLayer has reached a random SVN version number ;) | Online manual | Installation video!| MSVC projects now possible with cmake | Now alvailable as a Dev-C++ Devpack! (Thanks to Kotori)

Thomas Harte
Member #33
April 2000
avatar

Quote:

By "Ray casting", you mean a wolfenstain-like engine, or are all kinds of engines allowed that use ray casting in some way (for example, something like my isometric engine)?

I mean literally what I said:

Quote:

the overwhelming portion of the display is calculated conclusively by rays cast in a predictable and sequential fashion

So, a Wolfenstein style engine fits this description but also has the following limits:

  • orthogonal walls

  • first person perspective

  • no height variations

  • fully opaque walls only

None of which should be requirements for the competition. Although I was planning on a plot set indoors as the majority of engines are likely to be first person shooters.

As for your engine (and may I add - when I posted about a raycasting approach to cube based isometric engines using triangular casts a couple of years ago the ideas were not 'well received'), without any idea of the implementation specifics I can't judge whether it meets the definition. Although "Isometric surface rendered with modified raycasting techniques" seems to strongly imply that it does.

Opinions from anyone interested as to whether engines should be further limited to first person capable?

EDIT: would you enter if the rules continued to be drafted so that you could?

HoHo
Member #4,534
April 2004
avatar

When is the deadline? If it's in August or later I might try doing something with a little test program I'm currently modifying heavily.

__________
In theory, there is no difference between theory and practice. But, in practice, there is - Jan L.A. van de Snepscheut
MMORPG's...Many Men Online Role Playing Girls - Radagar
"Is Java REALLY slower? Does STL really bloat your exes? Find out with your friendly host, HoHo, and his benchmarking machine!" - Jakub Wasilewski

Thomas Harte
Member #33
April 2000
avatar

At the minute there is no deadline because there is no competition! Planning 4 months in advance may not even be so ridiculous if my experience of trying to get people to help out with artwork for other things is anything to go by...

Neil Walker
Member #210
April 2000
avatar

can i draw a picture using PovRay then draw some sprites jumping around?

Neil.
MAME Cabinet Blog / AXL LIBRARY (a games framework) / AXL Documentation and Tutorial

wii:0356-1384-6687-2022, kart:3308-4806-6002. XBOX:chucklepie

Thomas Harte
Member #33
April 2000
avatar

Quote:

can i draw a picture using PovRay then draw some sprites jumping around?

No. To quote again:

Quote:

only ray casting style algorithms are allowed (i.e. the overwhelming portion of the display is calculated conclusively by rays cast in a predictable and sequential fashion - if anybody really needs a definition)

It is an implied rule of this and every other competition that you cannot essentially submit someone else's code. If it wasn't then in this case we could all just submit the actual Wolfenstein 3d or Duke Nukem 3d code or any other more interesting form of ray casting.

If you wanted to rely on your background having been generated in the prescribed manner then you would have to rely on the PovRay code being considered part of your project.

For the avoidance of doubt, I take the implied rule to be that the code for all entries must be sufficiently original to the author that they are deserving of any prize they win.

That is all assuming you meant "can [you] ... and still enter the competition". Otherwise, ummm, sure - go ahead. And don't feel you need to ask for permission next time!

EDIT:
The ideology behind the competition is that a lot of people seem to at some time work on a Wolfenstein style engine. A competition based around these would be fun but at the same time too restrictive if it enforced an "exactly like Wolfenstein" rule. Hence the competition is intended to bring in a lot of "quite similar to Wolfenstein and Duke Nukem" projects while still allowing for big surprises such as Fladimir's engine described above.

People can try and win technical categories by thinking around the problem and subverting the form but those that are newer programmers or simply have restricted time can throw together something Wolfenstein style and know that the majority of entries won't be technically advanced beyond theirs.

In addition the art and plot will not exceed the limits of a Wolfenstein style affair so those who are good at getting to the completed engine stage but then lack the motivation to do anything with it sufficiently to show it off can get some nice art to throw in and an excuse to actually put something together for general consumption. Which is probably the main reason for the popularity of these competitions anyway.

EDIT2: so, what am I looking at so far? 0 entries?

HoHo
Member #4,534
April 2004
avatar

Is there any minimal system that a program must run interactively?

__________
In theory, there is no difference between theory and practice. But, in practice, there is - Jan L.A. van de Snepscheut
MMORPG's...Many Men Online Role Playing Girls - Radagar
"Is Java REALLY slower? Does STL really bloat your exes? Find out with your friendly host, HoHo, and his benchmarking machine!" - Jakub Wasilewski

Fladimir da Gorf
Member #1,565
October 2001
avatar

I could join, but I definitely wouldn't make anything like a Wolfenstain engine at all ;) I don't know yet what kind of an engine I'm going to put together...

By the way, is it legal that you use raycasting to calculations, but that you use hardware routines to render the image? If only to use glLine() to draw the scene using lines or something?

EDIT: By the way, what do you exactly mean by:

Quote:

when I posted about a raycasting approach to cube based isometric engines using triangular casts a couple of years ago the ideas were not 'well received'

OpenLayer has reached a random SVN version number ;) | Online manual | Installation video!| MSVC projects now possible with cmake | Now alvailable as a Dev-C++ Devpack! (Thanks to Kotori)

Tobi Vollebregt
Member #1,031
March 2001

I'll participate.

HoHo said:

Is there any minimal system that a program must run interactively?

800 MHz Amd Duron ;D

________________________________________
website || Zipfile reader @ Allegro Wiki || Download zipfile reader

HoHo
Member #4,534
April 2004
avatar

Quote:

800 MHz Amd Duron ;D

Couldn't it be something that supports SSE2 or at least SSE? Does duron support sse?

__________
In theory, there is no difference between theory and practice. But, in practice, there is - Jan L.A. van de Snepscheut
MMORPG's...Many Men Online Role Playing Girls - Radagar
"Is Java REALLY slower? Does STL really bloat your exes? Find out with your friendly host, HoHo, and his benchmarking machine!" - Jakub Wasilewski

Thomas Harte
Member #33
April 2000
avatar

Quote:

Is there any minimal system that a program must run interactively?

There will be, yes. But it'll be substantially more than a "286+".

Quote:

I could join, but I definitely wouldn't make anything like a Wolfenstain engine at all

That's cool. I wouldn't either. Plot requirements would be about as specific as my brilliant ray casting definition! Supplied graphics will be in the form of wall and floor textures + some sprite objects.

Quote:

By the way, is it legal that you use raycasting to calculations, but that you use hardware routines to render the image?

100% legal. Just make an effort to be platform neutral if possible. Or I won't be able to play!

Quote:

EDIT: By the way, what do you exactly mean by:
...

There was some conversation into the drawing of isometric maps based on 3d tile maps and I proposed a zero overdraw method based on ray casting for maps that consist overwhelmingly of filled or empty cubes - like the old 8bit isometric games. Specifically I reproduced the map of ant attack as the format of the original data is available.

Really it was nothing like what you seem to be doing, which looks like a normal voxel heightmap sort of thing but without the perspective? Although I'm a bit confused as to why you would use ray casting for that but at least you get no overdraw anyway around. I haven't tried your demo as I don't have access to a Windows PC here. But if you're looking for someone to run out a Mac port, drop me a line!

EDIT:

Quote:

Couldn't it be something that supports SSE2 or at least SSE? Does duron support sse?

Ummm, my IBM G4 definitely doesn't support SSE - couldn't you include a processor neutral path?

EDIT2:
The Ant Attack map looks like this:
{"name":"antattackmap.gif","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/7\/c\/7c6400aef6d9f9d4ab0c2001973320f2.gif","w":525,"h":285,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/7\/c\/7c6400aef6d9f9d4ab0c2001973320f2"}antattackmap.gif

HoHo
Member #4,534
April 2004
avatar

Quote:

Ummm, my IBM G4 definitely doesn't support SSE - couldn't you include a processor neutral path?

I guess I could but it will be about 3-4x slower

__________
In theory, there is no difference between theory and practice. But, in practice, there is - Jan L.A. van de Snepscheut
MMORPG's...Many Men Online Role Playing Girls - Radagar
"Is Java REALLY slower? Does STL really bloat your exes? Find out with your friendly host, HoHo, and his benchmarking machine!" - Jakub Wasilewski

Thomas Harte
Member #33
April 2000
avatar

Quote:

I guess I could but it will be about 3-4x slower

No it won't. The comparison is between "being able to run it" and "not being able to run it" - the latter is substantially more than 3-4x slower than the former! If you can use the gcc constructs for vector units to which I've seen allusions then I can simply build it to use altivec and we'll all be happy.

I'm getting the strong impression that nobody wants a competition that is engine type specific?

Fladimir da Gorf
Member #1,565
October 2001
avatar

Quote:

looks like a normal voxel heightmap sort of thing but without the perspective? Although I'm a bit confused as to why you would use ray casting for that but at least you get no overdraw anyway around.

That's correct, but is there really any other sensible way?

Quote:

I'm getting the strong impression that nobody wants a competition that is engine type specific?

I think all the engines would otherwise look more or less the same. I've already decided what kind of an engine I'm going to make. Let's just say it's the only another situation besides the engine I posted where I've ever used raycasting. ;)

OpenLayer has reached a random SVN version number ;) | Online manual | Installation video!| MSVC projects now possible with cmake | Now alvailable as a Dev-C++ Devpack! (Thanks to Kotori)

Tobi Vollebregt
Member #1,031
March 2001

Quote:

There will be, yes. But it'll be substantially more than a "286+".

In that case, I'll participate if my system >= minimal system. Would be a bit dull to enter a compo without being able to run the entries (or even run my own entry ;) ).

Quote:

Does duron support sse?

nope

________________________________________
website || Zipfile reader @ Allegro Wiki || Download zipfile reader

Thomas Harte
Member #33
April 2000
avatar

Quote:

That's correct, but is there really any other sensible way?

There's no perspective, so all transforms are linear. You could use linear scanlines even if you had perspective because z doesn't change along them in any case. Not that it's directly relevant.

Pretend your floor is entirely flat for a moment. Then you have nothing more complicated than an ordinary affine texture filler. So you start each scanline knowing what pixel you start on and how you move for each screen pixel to find the correct texel. From that you can draw the entire scanline.

You can then prestore the 'starts' and 'per pixel movements' for each scanline and you have an entire display without any ray casting. You can move the view by adding offsets to the 'starts' and rotate it by rotating the 'starts' and 'per pixel movements'.

To add height, simply draw from the bottom of the screen to the top - effective front to back. Instead of plotting individual pixels you plot horizontal lines using a buffer keeping the current 'low' point in each screen column so that you don't overdraw.

And no ray casting!

Fladimir da Gorf
Member #1,565
October 2001
avatar

Quote:

You could use linear scanlines even if you had perspective because z doesn't change along them in any case.

Quote:

To add height, simply draw from the bottom of the screen to the top - effective front to back. Instead of plotting individual pixels you plot horizontal lines using a buffer keeping the current 'low' point in each screen column so that you don't overdraw.

Well, that's exactly what I'm doing, but isn't that still kind of raycasting? Even though you could call that "vertical scanline rendering" or something...

Quote:

And no ray casting!

If you say so... Maybe I should change the name of the tutorial I'm writing :P

OpenLayer has reached a random SVN version number ;) | Online manual | Installation video!| MSVC projects now possible with cmake | Now alvailable as a Dev-C++ Devpack! (Thanks to Kotori)

Thomas Harte
Member #33
April 2000
avatar

Quote:

isn't that still kind of raycasting

It could be derived from a ray casting algorithm (although I'd approach it from linear algebra), but I've seen some horrendous 'ray casting' approaches to textured floors which are literally doing a vanilla plane intersection test (including the divide) per pixel.

nonnus29
Member #2,606
August 2002
avatar

I'll participate. I'm thinking of doing raycasting walls and polygonal models.

Billybob
Member #3,136
January 2003

Here's my submission: [url http://www.allegro.cc/forums/view_thread.php?_id=355478]
enjoy...
Oh yeah those links are dead.
[url http://www.progranism.com/junk/Advanced%20Raycaster.zip]
[url http://www.progranism.com/junk/SmartRay%20July%2016,%202003/]

Done and done!
No 10 minutes of game play, but I'll take the hit anyway. I think it'll do just fine in the technical department, don't you? :)
And it "casts" rays, so it fits the rule requirement. Inside it actually does an intersection calculation, but still that's regular, predicatable casting of rays.
Too bad it's Windows only...*sigh* oh well, it's old.

aybabtu
Member #2,891
November 2002

Gah...this means I'll have to learn pathfinding, doesn't it? :-/

About the minimal system, my computer's pretty old (Pentium 2 300MHz....ugh) but, we're making raycasters people. Even DOOM only needed like a 486.

I probably won't win, but it would be fun to enter, I'll definitely try.

HoHo
Member #4,534
April 2004
avatar

Quote:

we're making raycasters people.

Quote:

General rules would be that only ray casting style algorithms are allowed (i.e. the overwhelming portion of the display is calculated conclusively by rays cast in a predictable and sequential fashion - if anybody really needs a definition)

I think raytracingfits nicely under these rules ;) I cast rays in sequental fashion, only that after first hit I cast some more rays

__________
In theory, there is no difference between theory and practice. But, in practice, there is - Jan L.A. van de Snepscheut
MMORPG's...Many Men Online Role Playing Girls - Radagar
"Is Java REALLY slower? Does STL really bloat your exes? Find out with your friendly host, HoHo, and his benchmarking machine!" - Jakub Wasilewski

Thomas Harte
Member #33
April 2000
avatar

Quote:

Here's my submission

Dude! Don't cast all your rays at linear angle offsets (e.g. 30 degrees then 29.5 degrees then 29 degrees, then 28.5 degrees...) or you'll end up with weird distortions. Like those particularly visible in screenshots 2 and 5!

Are you doing a cast onto floors as well?

Quote:

think raytracingfits nicely under these rules

Yes it does. But you've pointed out one area of my definition that needs clarity.

"the overwhelming portion of the display is calculated conclusively by rays cast in a predictable and sequential fashion"

Elements of the display must be calculated in a predictable and sequential fashion through the casting of rays. Many rays to one display element is intended to be allowed.

I guess the correct thing to do for the competition will be to take machine details from all entrants (as they'll also be the judges). If you want a judge to be able to allocate you any marks, make sure your code will work on their machine. Perhaps we should also have a category of shame for code that repeatedly crashes or is otherwise buggy.

Oscar Giner
Member #2,207
April 2002
avatar

Quote:

I think raytracingfits nicely under these rules I cast rays in sequental fashion, only that after first hit I cast some more rays

Actually that's the difference between raytracing and raycasting: in raycasting you only trace one ray per pixel, so you cannot do transparencies, reflections or real time lightning and shadowing.



Go to: