Forum Archive

Go Back   3D Realms Forums > General Topics > Programming Forum
Blogs FAQ Community Calendar

Notices

 
 
Thread Tools
Old 05-28-2009, 04:06 AM   #1
Bad Sector

Bad Sector's Avatar
RayFaster 2, my new Flash-based 3D engine :-)
These days i started working on the second version of RayFaster (the first version was used to make Rombo), which is practically a rewrite from scratch (although the GUI code from RF1 - which can be seen in this preview version of the next Rombo version - will be moved to RF2 almost unmodified). Unlike RayFaster 1, which used classic raycasting in the same way as Wolf3D or similar games using pretty much the same old method, RayFaster 2 uses an original raycasting algorithm to render the world. Its not anything groundbreaking (like anything that can be seen in Flash... its like programming an old 486 when it comes to speed), but its a nice method to render dynamic 3D worlds in Flash.

The rendering is based on sectors, pretty much like Doom and Build, although unlike Doom the world is dynamic while unlike Build raycasting is used instead of projecting trapezoids. Like Build, RayFaster 2 uses a portal-like approach for rendering sectors (although it "follows" the portals while rendering each span instead of processing each sector separately - i tried the former approach and it was slower than following the portals per span), so there is no need of preprocessing of any sorts. Of course using a BSP+PVS or similar structure would make it faster, but then i would lose the dynamic part which i like :-).

The engine is still under development. I've just added sprite support to the engine and i want to add them in editor too (the editor is written in Java and has a duplicate of the rendering code in Java - i made the Java version first actually - so i have to keep both in sync). Currently the sprite you'll see above is added in the world using code.

At this point there is only rendering code. No collision detection/response or smooth camera movement (goes from zero speed to max speed instantly and the camera's height is set hardly to a bit above the ground instead of "falling" or "raising").
Bad Sector is offline  
Old 05-28-2009, 10:50 AM   #2
IceColdDuke
Re: RayFaster 2, my new Flash-based 3D engine :-)
Thats actually really cool, what are your goals with it? Thats actually a bad ass concept.
IceColdDuke is offline  
Old 05-28-2009, 07:10 PM   #3
Bad Sector

Bad Sector's Avatar
Re: RayFaster 2, my new Flash-based 3D engine :-)
Well, a game :-P.

I have an idea about some dude who has to escape a hidden facility where human experiments are done. Nothing fully fleshed out, but i have some images in my head about how the game would look like in the engine and want i want to implement for it to look as i want it.
Bad Sector is offline  
Old 06-01-2009, 01:14 AM   #4
Fragger00
Re: RayFaster 2, my new Flash-based 3D engine :-)
Wow. Awesome.
Fragger00 is offline  
Old 06-19-2009, 07:04 AM   #5
Bad Sector

Bad Sector's Avatar
Re: RayFaster 2, my new Flash-based 3D engine :-)
Updated the engine. I added those sprites in the editor yesterday (i was procrastinating all this time - ok, i was messing with mochiads for my games Rombo, which uses RayFaster 1, and Dungeon Knight... i made $20 so far, so in a few decades i might be able to live from that :-P). Also i added aligned and flat/floor sprites and independent x/y scaling. They can be seen at the same place:

* The sign "Warning WATER" above the river is an aligned sprite.
* The graffiti "RayFaster 2 Rules" at your left is an aligned sprite.
* The sign "RayFaster Cave" across the cave is also an aligned sprite.
* Two cracks, one on the floor and one on a wall are flat and aligned sprites respectively.
* Some papers on the floor at the other side of the river are flat sprites.
* The plants in the river are the same sprite scaled differently in x/y.
* Two gargoyles, one is 1:1 scaled and the other is smaller are uniformly scaled.
Bad Sector is offline  
Old 06-19-2009, 08:50 AM   #6
peoplessi

peoplessi's Avatar
Re: RayFaster 2, my new Flash-based 3D engine :-)
Really cool stuff. I like the look of the engine now. I would adjust the steps, when you move on a lower or higher block. It's bit jerky/sudden, or simply not smooth Small issue, but makes a big difference.

What is your aim with this project? Seems really cool at this point.
__________________
Duke Nukem Forever
Who am I to judge?
peoplessi is offline  
Old 06-19-2009, 10:18 AM   #7
Bad Sector

Bad Sector's Avatar
Re: RayFaster 2, my new Flash-based 3D engine :-)
The camera movement is temporary right now. I'll add a point/ball physics system (not rigid body, it doesn't make much sense for this engine, not being fully 3D etc) and attach the camera to a physics object so the movement will be more natural.
Bad Sector is offline  
Old 06-19-2009, 10:58 AM   #8
Daedolon
Re: RayFaster 2, my new Flash-based 3D engine :-)
Nice, that's very impressive. I can see all the floor/ceiling texture rendering, working doors and enemies, weapons, items... I wish I was so good with programming.
Daedolon is offline  
Old 06-19-2009, 01:24 PM   #9
lordlonelobo

lordlonelobo's Avatar
Re: RayFaster 2, my new Flash-based 3D engine :-)
Cool stuff. I'm guessing due to lack of collision detecting, it's possible to climb up walls. Just letting you know, if you didn't already.

But very very cool for flash.
lordlonelobo is offline  
Old 06-19-2009, 08:59 PM   #10
Bad Sector

Bad Sector's Avatar
Re: RayFaster 2, my new Flash-based 3D engine :-)
Yeah, collision won't allow you to climb to more than some predefined value and the "climbing" will be smooth.

Btw i just added static (non-animated) 3D models :-)

http://www.badsectoracula.com/peponi/rayfaster2/



(note: the framerate above is awfully low because the Linux Flash player sucks. In Windows -which i run via a virtual machine- i get more than 410fps at the same spot :-P).
Bad Sector is offline  
Old 06-20-2009, 02:27 AM   #11
unforgiven
 
Re: RayFaster 2, my new Flash-based 3D engine :-)
Cool thing , it could be a commercial engine for iPhone
unforgiven is offline  
Old 06-20-2009, 06:44 AM   #12
Bad Sector

Bad Sector's Avatar
Re: RayFaster 2, my new Flash-based 3D engine :-)
Yes. And since it is written in haXe, this is possible since haXe has an experimental iPhone target right now (of course it still needs a Mac and an iPhone and i lack both :-P but the possibility is there).

Although i would need to convert the renderer to use OpenGL ES.
Bad Sector is offline  
Old 06-20-2009, 12:20 PM   #13
Bad Sector

Bad Sector's Avatar
Re: RayFaster 2, my new Flash-based 3D engine :-)
Added some basic collision detection and response. It needs more work though :-p
Bad Sector is offline  
Old 06-20-2009, 01:49 PM   #14
peoplessi

peoplessi's Avatar
Re: RayFaster 2, my new Flash-based 3D engine :-)
One word: awesome. Feels really good now. I could see a lot use for such engine. Have you thought about multiplayer capability?

Really solid work, I'm really impressed. My skills in coding are far far from this
__________________
Duke Nukem Forever
Who am I to judge?
peoplessi is offline  
Old 06-20-2009, 03:17 PM   #15
Daedolon
Re: RayFaster 2, my new Flash-based 3D engine :-)
Very impressive, I like how smooth the fan shadow moves (is it a real sector?), the models and all. I got the distinct Ultima Underground/Arx Fatalis feel from the video, it could go far with some procedurally generated levels and rpg elements.
Daedolon is offline  
Old 06-20-2009, 06:52 PM   #16
Bad Sector

Bad Sector's Avatar
Re: RayFaster 2, my new Flash-based 3D engine :-)
Yes the fan is a sector with a dark shading level and the "rotate" sector effect (sectors can have sector effects applied to them, although currently the only one i have is the rotate one :-p).
Bad Sector is offline  
Old 06-22-2009, 01:17 AM   #17
Bad Sector

Bad Sector's Avatar
Re: RayFaster 2, my new Flash-based 3D engine :-)
Added some basic scripting. This can be used to add more complex behavior in maps than what is available from a basic trigger-effect scheme.
Bad Sector is offline  
Old 06-22-2009, 02:24 AM   #18
lordlonelobo

lordlonelobo's Avatar
Re: RayFaster 2, my new Flash-based 3D engine :-)
Man, this seems so complex for flash. How long has it taken you to get this far?

Side note, is that ubuntu?
lordlonelobo is offline  
Old 06-22-2009, 03:02 AM   #19
Bad Sector

Bad Sector's Avatar
Re: RayFaster 2, my new Flash-based 3D engine :-)
29 days so far, although i had a few procrastinating days watching anime and playing games :-P.

Yes, that is Ubuntu :-)
Bad Sector is offline  
Old 06-22-2009, 06:24 AM   #20
tvc 15

tvc 15's Avatar
Re: RayFaster 2, my new Flash-based 3D engine :-)
Impressive stuff. Do you plan to do a FPS like Rombo? An adventure game would be cool, maybe something like Realms of the Haunting?
__________________
In a nation run by swine, all pigs are upward-mobile and the rest of us are f*cked until we can put our acts together: Not necessarily to Win, but mainly to keep from Losing Completely - Hunter S. Thompson
tvc 15 is offline  
Old 06-22-2009, 07:08 AM   #21
Daedolon
Re: RayFaster 2, my new Flash-based 3D engine :-)
Your wall renderer seems to not start from the topmost row of pixels:



Though this seems only be the case with sectors inside the main area.
Daedolon is offline  
Old 06-22-2009, 01:35 PM   #22
Bad Sector

Bad Sector's Avatar
Re: RayFaster 2, my new Flash-based 3D engine :-)
@tvc 15:
Actually i'm thinking something like the original System Shock (with a little simpler UI though - not that i mind the SS1 UI but Flash has some limitations) broken in several chapters (Flash isn't really a platform for long complex games, so i'll do a short complex one :-p).

@Daedolon:
Yeah, i know this. I probably have an off-by-one clipping issue when following a portal :-).
Bad Sector is offline  
Old 06-24-2009, 06:12 AM   #23
Bad Sector

Bad Sector's Avatar
Re: RayFaster 2, my new Flash-based 3D engine :-)
The editor in action, or at least the 3D part of it :-P.
Bad Sector is offline  
Old 06-24-2009, 09:13 AM   #24
Pikachu
 
Re: RayFaster 2, my new Flash-based 3D engine :-)
This is actually cool! Who made the music? It's awesome, very Amiga demoscene! OK THIS IS THE GREATEST FLASH GAME EVER!!!!
Last edited by Pikachu; 06-24-2009 at 12:33 PM.
Pikachu is offline  
Old 06-24-2009, 08:06 PM   #25
Bad Sector

Bad Sector's Avatar
Re: RayFaster 2, my new Flash-based 3D engine :-)
Hm, what?
Bad Sector is offline  
Old 06-24-2009, 08:37 PM   #26
Pikachu
 
Re: RayFaster 2, my new Flash-based 3D engine :-)
Quote:
Originally Posted by Bad Sector View Post
Hm, what?
The Rhombus game,it's like THE BEST FLASH GAME EVER!!!!

I want it for DS. 0_0
Pikachu is offline  
Old 06-24-2009, 09:39 PM   #27
Bad Sector

Bad Sector's Avatar
Re: RayFaster 2, my new Flash-based 3D engine :-)
Actually a friend of mine told me some months ago that Rombo would be cool if it was remade on the iPhone (with 3D models and more detailed world). The problem is that i don't have an iPhone or a Mac.

And he says that for practically everything :-P.

But i have a DS! Not a DS SDK though...
Bad Sector is offline  
Old 06-25-2009, 05:56 AM   #28
Bad Sector

Bad Sector's Avatar
Re: RayFaster 2, my new Flash-based 3D engine :-)
And so, i started working on a game with this engine



It's called Electric Perspective :-)
Bad Sector is offline  
Old 06-25-2009, 07:50 AM   #29
lordlonelobo

lordlonelobo's Avatar
Re: RayFaster 2, my new Flash-based 3D engine :-)
Ham? as in radio?

Also, looks very cool. I just played some Rombo, and that's pretty good, so RayFaster2 should be cool.
lordlonelobo is offline  
Old 06-25-2009, 08:01 AM   #30
Pikachu
 
Re: RayFaster 2, my new Flash-based 3D engine :-)
Quote:
Originally Posted by bad sector View Post
and so, i started working on a game with this engine



it's called electric perspective :-)
omg it looks like system shock and descent mixed with neopets!


Musssssttttt plaaaaaay! 0_____0
Pikachu is offline  
Old 06-25-2009, 08:15 AM   #31
Bad Sector

Bad Sector's Avatar
Re: RayFaster 2, my new Flash-based 3D engine :-)
Haha thanks :-) (what is neopets? :-P)

There isn't much to play right now - all you can do is walk around the room :-P. Currently i'm trying to lay out a style for the game, so this look might be altered a bit (athough not as much as Rombo changed since the first days)
Bad Sector is offline  
Old 06-25-2009, 01:44 PM   #32
Pikachu
 
Re: RayFaster 2, my new Flash-based 3D engine :-)
Quote:
Originally Posted by Bad Sector View Post
Haha thanks :-) (what is neopets? :-P)

There isn't much to play right now - all you can do is walk around the room :-P. Currently i'm trying to lay out a style for the game, so this look might be altered a bit (athough not as much as Rombo changed since the first days)
Wow,, that did change alot. What made you decide to code this in Flash as opposed to Java?

Oh and is your XM player custom, or is it a third-party xtra?
Pikachu is offline  
Old 06-25-2009, 06:01 PM   #33
Bad Sector

Bad Sector's Avatar
Re: RayFaster 2, my new Flash-based 3D engine :-)
Well if you check the two games in my Runtime Terror site, they both show some pre-game ads (Rombo also has in-game leaderboards which in some countries also show ads). So the more people play the game, the more ads will be shown and the more money i would make (although so far the results are in the ...bubblegum money range - i've made about $25 in a month from both games :-P).

There is a whole network out there of webgame sites which will gladly post my game (they have their own ads). Unfortunately this network is built around Flash, so if i used Java i wouldn't be able to use this network. In this case i would need to hunt some sponsorship deal, like i did with my Square Shooter game which is written in Java. However even then, i wouldn't make as much as i did. For example i got $300 from Square Shooter but if i had made it in Flash the sponsor who licensed it told me he would pay me $1500.

Ironically Square Shooter, which is made in Java (a non popular platform for webgames) so far has made me much more than all my Flash games combined :-P.

The reason though is that although i've got offers for both games, in one offer (for Dungeon Knight) the sponsor suddenly disappeared and in the other (for Rombo), the offer was too low. I could continue trying to find some sponsorship though, but i decided to keep the full rights for the games and try to monetise them myself.

Although i do plan to make a small "sponsor-friendly" game at some point, since inevitably i would need the cash for Electric Perspective (i plan to hire a musician to write some MOD music for me).

As for the module player, that is a MOD player not XM. I have written it myself :-). It is the second player ever made for Flash and so far the only reusable (the other one is a standalone player released in GPL license while mine is a library in zlib license which is very liberal). It also the more accurate than the other one. There are still a few glitches but it the playback is very close to what i consider the most accurate player available for the PC platform: MilkyTracker. I have the player (Flash MOD Player) located here (note: the site has music with the player). I know at least one developer besides me using it: Lexaloffle Games' Cat Cat Watermelon has some 8bit chiptune in the menu which is played back with Flash MOD Player.
Bad Sector is offline  
Old 06-25-2009, 09:00 PM   #34
Pikachu
 
Re: RayFaster 2, my new Flash-based 3D engine :-)
Ah cool, interesting design choices. Thank you for the answers! :3
Pikachu is offline  
Old 06-30-2009, 05:37 PM   #35
Rider

Rider's Avatar
Re: RayFaster 2, my new Flash-based 3D engine :-)
MOD music? Wow, that sounds like it would be awesome! Good luck on the project, it looks to be coming along quite nicely already!
__________________
Duke4.net - Duke's OTHER home.
HeadbangersFM - The station that keeps your head banging!
-------------
She's pretty, not "damn-she's-making-my-noodle-dance-samba"-pretty, but still very pretty... - Micki!
Rider is offline  
Old 07-10-2009, 11:48 AM   #36
R22B
Re: RayFaster 2, my new Flash-based 3D engine :-)
I usually don’t get excited about a lot of things but that is honestly the coolest thing I’ve ever seen – even in its simplest form.

I’m going to shoot you a PM.
R22B is offline  
Old 08-02-2009, 09:54 AM   #37
AllAmericanJBert

AllAmericanJBert's Avatar
Re: RayFaster 2, my new Flash-based 3D engine :-)
Sorry to bring back up this "older" thread, but has any progress been made on RF2?
__________________
*I taught myself C, C++, C#, VB, HTML, and Javascript. At the moment, I am teaching myself Java, Perl, Objective C, and x86 assembly.*

I'm nuts!
Last edited by AllAmericanJBert; 08-02-2009 at 09:55 AM. Reason: Forgot to add a comma.
AllAmericanJBert is offline  
Old 08-03-2009, 11:51 AM   #38
joey007

joey007's Avatar
Re: RayFaster 2, my new Flash-based 3D engine :-)
I don't know.
__________________
THE sig of useless words. Panda bears are the least racist mammal theyre white, black, and Asian! :p
joey007 is offline  
Old 08-10-2009, 08:13 AM   #39
Bad Sector

Bad Sector's Avatar
Re: RayFaster 2, my new Flash-based 3D engine :-)
Hi (i was going to reply to your PM but i see you asked about it here too, so i'm replying here).

Feature-wise the latest thing i added to RayFaster 2 is scripting which can be seen at the same place as before. After that i decided to try and make a game, Electric Perspective, but i never went beyond the initial mockup stage (although i fixed some collision issues). I'm not sure if i'll finish EP, make something else (Rombo 2?) or not use RF2 at all. The reason is that currently i'm not in a mood to make a new game (August being the hottest month in an already very hot country -Greece- doesn't help :-P). Also the editor (this one here) is a dual personality: the 3D window rocks, allowing intuitive editing of almost everything that can be edited from a 3D perspective (lighting, texturing, rotation, scaling, adjusting heights, etc). On the other hand, the 2D window sucks because adding new sectors is a PAIN (you have to draw linedefs and assign sector IDs manually - all the help you get from the editor is to find an unused ID). At some point i'll try to make sector creation implicit (like in Build) but this requires some extra work and also i'm not 100% sure how to do this :-P.

As for what i'm working on these days (that was in the PM only but i'm answering it here too :-P)... well, a bunch of stuff. I started writing a cross-platform generic 3D brush-based world editor in Java and JOGL, Runtime World (you can see a video of the editor in action - thats only 3-4 days of work), although it has been about ~12 days since i wrote some code (according to the timeline view in the Trac page above :-P). Also i'm writing one of my occasional "research" engines (aka toying around :-P), Runtime Grimaw (from "gridmap world") which is based on a mix of the early Tomb Raider engines and my Alithia engine (video). Of course like Alithia, Stigma, Orasis and a bunch of other engines, this might never see the day of light and its just for testing some ideas i have :-).
Bad Sector is offline  
Old 08-22-2009, 10:06 AM   #40
Spardanian

Spardanian's Avatar
Re: RayFaster 2, my new Flash-based 3D engine :-)
Flash evolution
__________________
...and these who will not be able to fly should walk the earth...
Spardanian is offline  
 

Bookmarks

Tags
build, doom, raycasting, rayfaster, rombo


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -6. The time now is 06:43 AM.

Page generated in 0.17448997 seconds (100.00% PHP - 0% MySQL) with 15 queries

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.

Website is ©1987-2014 Apogee Software, Ltd.
Ideas and messages posted here become property of Apogee Software Ltd.