Sonic and Sega Retro Message Board: Still Unnamed 3D Sonic Engine - Sonic and Sega Retro Message Board

Jump to content

Hey there, Guest!  (Log In · Register) Help
Loading News Feed...
 

Still Unnamed 3D Sonic Engine Video Inside

#1 User is offline MarkTheEchidna 

  Posted 10 September 2010 - 11:02 PM

  • Posts: 39
  • Joined: 10-September 10
  • Gender:Male
  • Location:Belo Horizonte, Brazil
  • Project:WebSonic
Hello! Some of you might remember me as one of the creators of the BlitzSonic Engine. (Along with Damizean: He did like, 90% of it after the rewrite, so kudos for him :-) I've been really busy for the last 2 years or so with IRL stuff, mostly college and work, so I almost completely disappeared from the Interwebs. That is, until now.

ALERT: Giant wall of text ahead. If you're not much of a reading person, you can skip directly to the video at the bottom.

Partially motivated by my wish to put in practice what I've learned about linear algebra, computer graphics and game development in college, aswell by the recent Sonic 4 controversy and by a lot of personal reflection about what made the classic Sonic games so good (and why they're so different from what we have today) I decided to get back to fangaming.

What I'm going to show here is what I've been able to put together on my free time during the last 1 month or so. I was planning for a bigger, more 'surprise'-y release on a later date, but I decided that early feedback from the community was necessary to keep the project right on track. Besides that, I suck at keeping secrets :-).

I'm working on a "fully 3D" Sonic engine. That is, it's not an on-rails engine that tries to replicate the classics with 3D graphics, but an engine with completely 3d environments for you to explore and interact.

As I didn't want to stand on completely new grounds when it comes to the controls and physics, I decided to generalize the genesis physics for the 3D case. I've successfully implemented a pretty complete and consistent mathematical generalization of the physics described by Mercury on the physics guide (Thanks, man!). My goal is to have the game to handle exactly like Sonic 3 & Knuckles, considering you only touch the "left", "right", "crouch" and "jump" buttons, yet still allow for full blown 3D controls without switching control modes or whatnot. I'm already quite close to that, save for some minor floating point quirks with the air drag (which I'm not going to fix), and for the fact that collisions are checked using ray-triangle intersections, not height maps. (Also not going to fix.) You would be surprised on how well the physics of the original games stand on the third dimension.

Once the player code is ready, I'm going to release it for peer review, for whoever might be interested. If something's not like the classics (and it's not because of an explicit engineering decision) it's a bug that needs to be fixed.

Besides getting the game to handle properly, I'm using what I've learned from working on BlitzSonic to address the other important/unresolved issues with 3D Sonic games: Camera and Level Design.

For the level design, I'm keeping it faithful to the classics by using tile-based maps. The world is made of 3D, 128x128x128 tiles (each tile is a mesh). All objects are carefully constructed so they're exactly on the same scale as their Mega Drive-era counterparts, and the size of the player model in relation to the view size is also calibrated by adjusting the camera's field of view, to give the exact same feeling of speed as the Mega Drive games.

It might seem strange to use tiles for a 3D game, but they allow for great flexibility and consistency, and they're are going to make the creation of a level editor much easier.

For the camera, I'm addressing the problem by not addressing it at all: If you think about the cameras on the 3D Sonic games, you'll realize they were usually bad because they had to keep constantly changing their direction and position relative to the player. This is Ok on a slow-paced game, but not so Ok on a game like Sonic. The reason they had to do that, however, is because full blown 3D scenery usually occludes the player eventually (where 2D scenery usually doesn't.) If you address the occlusion problem, you don't need to address the camera problem anymore, and a static camera with some manual controls does the job quite well. This is what I'm doing; It is a similar approach to the one Team Ninja has taken on Metroid: Other-M, Thought their camera is certainly much more complex than that. (I haven't played it yet.)

Anyway, back to the engine, unlike most other 3D fan game projects, which are using either Blitz3D, Unity, Unreal or Build as a starting point, I'm working on a 100% custom 3D engine. I might get criticized for that, since it's an awful lot of work (it really is!) and software development these days is all about code reuse, but I decided to take the hard route for a variety of reasons:

1. I'm doing it for fun and learning, and I wanted to learn more about all the math and infrastuctural code that goes behind a full-fledged, modern 3D engine.

2. I did not want it to be based on proprietary technology, and I didn't quite like any of the free/open-source game engines out there. When you rely on proprietary technology, you're bound to be caught on technological roadblocks. Take Blitz3D, for example. The guys from BlitzResearch pretty much abandoned it. The result is that what once was a state-of-the-art 3d engine is now a piece of legacy code forever tied to DirectX 7.0 (which was released on 1999 and has no shader support) That means all the power of current GPUs can't be tapped, and that all the fancy effects can't be achieved (at least not easily/efficiently). All of the engine is based on open industry standards, which won't go away on a near future.

3. A Sonic the Hedgehog game is much more complicated than say, a first person shooter, (at least a simple one) and requires a lot of very specific architectural decisions. (take the collisions, for example) A pre-built solution wouldn't be able to provide that, or would require workarounds. "Generic"/All Purpose 3D engines usually try to be jack-of-all-trades, but end up being aces of none.

4. I'm a Mac user, and I am usually saddened by the lack of Mac support when it comes to (fan) games and game engines. I think the Linux folks should also agree with me. With a completely custom engine, I can address this, by making it cross platform.

5. With a custom 3D engine, I am only limited by what I can code on my free time. I don't have to pay for some extra component or wait until something is implemented for me. I can go and implement it myself, as I need it.

6. There's also another reason for me to code it from the ground up, which I'm going to reveal later. (It's worth the wait.)

Here's the engine's current feature set:

- Cross-platform, OpenGL based. Runs on Mac OS X, Linux and Windows out-of-the-box. Getting it to run on something else shouldn't be hard, provided the right libraries are available. A Direct3D backend for the ~60% or so of Windows users who don't have OpenGL drivers isn't entirely unlikely in the near future;
- Fully programmable, hardware accelerated scene rendering: Uses the full potential of GLSL Vertex and Fragment Shaders; (The FFP is bypassed entirely)
- Tile-Based 3D Environments;
- Objects;
- Spatial indexing using a dynamic, sparse grid structure implemented through hash tables (which have O(1) == constant access time) for super fast scene rendering and animation. Preeliminary tests have been done with 100,000+ objects randomly distributed along the scene space, without any performance hit;
- Asynchronous resource loading;
- Super fast ray-triangle intersections for collisions;
- Multiple render targets;
- Per-pixel (phong) lighting;
- Static (whole stage) and dynamic (local) shadow mapping;
- Automatic generation of static shadow maps during scene load; (Fast!)
- Post processing (glow effect, not enabled on the video)
- Adaptative framerate with support for "non-rendered substeps"; (To ensure playability even on computers with slow/low-end GPUs)
- 3D Sonic physics generalized from the Sega Genesis;
- "Ghost Mapping" to solve the occlusion problem;
- Ringloss;
- A 100% custom Sonic Model, made by taking the original game sprites as reference. Same proportions, same animations; (Not quite an engine feature)
- Blast Processing;
- Zero `Constant Execrations from Gimmicks like Booster`.

Besides that, the engine's code has been carefully profiled and optimized. All care has been taken to ensure great performance. (e.g. the engine tries to keep the same textures on the same GPU texture units whenever possible, to reduce the number of unnecessary flushes on the rendering pipeline).

Sorry for not providing anything playable at this time, but I only want to have public or even private beta tests for the engine when it's more complete. (And when some technical problems are solved)

The video below has a choppy framerate because my MacBook's low-end Intel GMA is struggling to deal with the game and the video capture program at the same time. Sorry about that too. Performance should be much better on good graphics hardware.

Enjoy!



@the admins: Thanks for such a speedy validation.

#2 User is offline Azu 

Posted 10 September 2010 - 11:44 PM

  • I must be stupid.
  • Posts: 1317
  • Joined: 23-February 08
  • Gender:Male
  • Location:Home
Mark's back! I just thinking about you the other day when I saw the BlitzSonic engine on some random YouTube video.

Awesome engine as always. Are you have have custom scripting
This post has been edited by Azu: 10 September 2010 - 11:46 PM

#3 User is offline Namagem 

Posted 10 September 2010 - 11:45 PM

  • Posts: 388
  • Joined: 19-August 08
  • Gender:Male
  • Location:USA
That looks really cool! The camera movement let's you decide if you want to move as if it were 2d or 3d; that's a really cool concept. I also really like the "Melty Wall effect". It's a sure way to prevent camera frustration. I'm not the person to criticize technical aspects of the engine, so I'll leave that for someone else; however, I will say that this looks like something I'd like to play.

#4 User is offline The Taxman 

Posted 10 September 2010 - 11:50 PM

  • Posts: 525
  • Joined: 05-October 04
  • Project:Retro Engine & Related Projects
  • Wiki edits:15
Fantastic work man, especially given the time frame! I'm guessing you still need to implement tweening between animation keyframes? Other than that, I'm really looking forward to whatever you have in store for it smile.png

#5 User is offline Covarr 

Posted 11 September 2010 - 12:19 AM

  • Sentient Cash Register
  • Posts: 1784
  • Joined: 05-February 07
  • Gender:Male
  • Location:Over there
  • Wiki edits:1
This is freaking incredible. I'm thoroughly impressed by the lengths you're going to for this to be as much like the genesis classics as possible. Based on the impression I got from the video, this seems like already it could be adapted to quite a few styles of gameplay, such as the faster gameplay of the 2D classics, as well as the slower, exploration based gameplay of something like Sonic CD or Sonic 3D Flickies' Blastland. But I have a few questions, as well:

1. Are you going to support full analog 3D control, or just 8-directional D-Pad style?

2. What will this engine do as far as checkpoints? In every 2D game so far, they've been posts that you simply had to walk past, but in 3D games they've generally been gates that you could easily miss or go around. Do you prefer one way to the other, or is there some third option you have in mind?

#6 User is offline Aerosol 

Posted 11 September 2010 - 12:30 AM

  • FML
  • Posts: 5294
  • Joined: 27-April 08
  • Gender:Male
  • Location:New York
  • Project:Sonic (?): Coming summer of 2055...?
Great work Mark, nice to see you back. This engine looks like its came a really long way for only being done in a month! Are you thinking about incorporating 2.5d specific methods, such as pushing Sonic onto a background layer for jumping on platforms that are technically in the background? See the Mushroom Hill video if you don't know what I'm talking about. Sonic does this when he jumps on the mushroom right at the beginning.



#7 User is offline Overbound 

Posted 11 September 2010 - 01:22 AM

  • Posts: 489
  • Joined: 09-July 08
  • Gender:Male
  • Location:Iowa
  • Project:Sonic Time Twisted Graphics/Level Design
  • Wiki edits:236
QUOTE (The Taxman @ Sep 11 2010, 05:50 AM)
Fantastic work man, especially given the time frame! I'm guessing you still need to implement tweening between animation keyframes? Other than that, I'm really looking forward to whatever you have in store for it smile.png


I agree the animation did look a bit choppy. Perhaps that was to give it the looks of the 2D game but I'm not sure it works. Anyway this is still incredible stuff the collision detection looks great better than what we see out of Sega from 3D games. Keep up the good work this is the most authentic 3D 2D gameplay style engine I've ever seen.

#8 User is online NomadTW 

Posted 11 September 2010 - 01:50 AM

  • I ain't gotta impress you fucks.
  • Posts: 549
  • Joined: 08-January 09
  • Gender:Male
  • Location:Redmond, WA
Looks neat and all, but maybe a bit too scrunched together for my tastes. The camera is really nice though.

And I'll say that the physics look pretty good, especially the ramp bit with the spindash. The white outline deal with the background looks like it could get disorienting. But hey, I'd have to play it before I can really say it's a bad thing. Hope to see something come from this! Good luck, dude.
This post has been edited by NomadTW: 11 September 2010 - 02:00 AM

#9 User is offline Namo 

Posted 11 September 2010 - 01:52 AM

  • take a screenshot of your heart
  • Posts: 2750
  • Joined: 02-August 09
  • Gender:Male
  • Project:dynamicite.org
That looks pretty damn good, actually. The animations on Sonic are a little choppy, but I'm very pleased with what I'm seeing here. The tiles look kind of like Hidden Palace tiles too.

#10 User is offline MarkTheEchidna 

Posted 11 September 2010 - 07:49 AM

  • Posts: 39
  • Joined: 10-September 10
  • Gender:Male
  • Location:Belo Horizonte, Brazil
  • Project:WebSonic
Hey guys! Thanks for all the feedback on this! =)

QUOTE (Azu @ Sep 11 2010, 01:44 AM)
Are you having custom scripting?

Hmm. Right now, everything is hard-coded into it, but adding some form of scripting support is not entirely impossible.


QUOTE (The Taxman @ Sep 11 2010, 01:50 AM)
I'm guessing you still need to implement tweening between animation keyframes?


Yeah, that's true. I haven't implemented that yet because I wanted first to have as many animations working as possible, so the game felt more "real". (Sonic was a blue placeholder ball mesh before that.) I'm going to figure out the tweening, but it shouldn't be that hard. Just linearly interpolating the positions and normals.


QUOTE (Covarr @ Sep 11 2010, 02:19 AM)
1. Are you going to support full analog 3D control, or just 8-directional D-Pad style?


Right now, I'm only supporting 8-directional controls. The camera angle actually snaps to increments of 45ยบ, so getting Sonic to walk straight along a wall is easy. Adding analog controls might break that, so I'm kinda concerned, but if a lot of people request them, I might try to figure out how to mix them with the classic physics.

QUOTE (Covarr @ Sep 11 2010, 02:19 AM)
2. What will this engine do as far as checkpoints? In every 2D game so far, they've been posts that you simply had to walk past, but in 3D games they've generally been gates that you could easily miss or go around. Do you prefer one way to the other, or is there some third option you have in mind?


That's a good question. I'm not quite sure on how I'm dealing with this issue. The same problem arises with the end-level signs. Maybe we can work out something on this. I'm open for suggestions.

QUOTE (NomadTW @ Sep 11 2010, 03:50 AM)
Looks neat and all, but maybe a bit too scrunched together for my tastes.

You mean, the level or some other aspect?

QUOTE (NomadTW @ Sep 11 2010, 03:50 AM)
The white outline deal with the background looks like it could get disorienting. But hey, I'd have to play it before I can really say it's a bad thing.

I'll say that, yes, the white outline is a little hard to get used, but once you get used to it you won't mind it that much. At least, that was what happened with me. I wanted to get a more subtle effect going, but I didn't want to step on hard-to-fix alpha-sorting issues.

QUOTE (Namo @ Sep 11 2010, 03:52 AM)
That looks pretty damn good, actually. The animations on Sonic are a little choppy, but I'm very pleased with what I'm seeing here. The tiles look kind of like Hidden Palace tiles too.

Taxman pointed out the same thing. I'm going to add tweening so the animations are smoother.

Oh. They're the Hidden Palace tiles, redrawn in high-res. :-)


#11 User is offline Jayextee 

Posted 11 September 2010 - 08:05 AM

  • Comic Mischief
  • Posts: 2889
  • Joined: 22-October 07
  • Gender:Male
  • Location:Kathmandu, Nepal
  • Project:Who knows? Toss a coin, will ya?
  • Wiki edits:27
QUOTE (MarkTheEchidna @ Sep 11 2010, 01:49 PM)
QUOTE (Covarr @ Sep 11 2010, 02:19 AM)
2. What will this engine do as far as checkpoints? In every 2D game so far, they've been posts that you simply had to walk past, but in 3D games they've generally been gates that you could easily miss or go around. Do you prefer one way to the other, or is there some third option you have in mind?


That's a good question. I'm not quite sure on how I'm dealing with this issue. The same problem arises with the end-level signs. Maybe we can work out something on this. I'm open for suggestions.


Oh, if only some kind of radius system could be implemented. You know, like putting said post on a not-totally obnoxious circular pad which registers collision, or something.

#12 User is offline MarkTheEchidna 

Posted 11 September 2010 - 08:26 AM

  • Posts: 39
  • Joined: 10-September 10
  • Gender:Male
  • Location:Belo Horizonte, Brazil
  • Project:WebSonic
You mean, something like the Sonic Heroes checkpoint, but bigger, with a starpost on top?

#13 User is offline Azu 

Posted 11 September 2010 - 08:39 AM

  • I must be stupid.
  • Posts: 1317
  • Joined: 23-February 08
  • Gender:Male
  • Location:Home
So, will this be open-source once you're done with it, unless it's implied in your first post somewhere.
This post has been edited by Azu: 11 September 2010 - 08:39 AM

#14 User is offline MarkTheEchidna 

Posted 11 September 2010 - 08:54 AM

  • Posts: 39
  • Joined: 10-September 10
  • Gender:Male
  • Location:Belo Horizonte, Brazil
  • Project:WebSonic
Yeah, I think I'm going to release the source eventually. If I decide to make a full fledged game out of it, I'll release the source after the game is released. If it ends up being only an engine, or the game gets canned, I'll release the source for the Engine so people can use it. Regardless of that, I'm going to release the Player source code once it's complete (or at least partially complete) for a physics audit of sorts, if someone is interested in that.

#15 User is offline Azukara 

Posted 11 September 2010 - 09:09 AM

  • Don't let's start!
  • Posts: 2692
  • Joined: 17-October 07
  • Gender:Male
  • Location:Meowth's party
  • Project:Sonic World Runner
  • Wiki edits:27
With the 8-directional thing going on and the camera angle, it sort of reminds me of Sonic 3D Blast and Sonic World from Jam. Not bad things at all, by the way. Yes, it'd be really flowing with analog, but I guess Blitzsonic could be left as the analog attempt at making classic physics in 3D (minus the inferior graphics capabilities). Also the graphics are fantastic, and when it becomes open source, will there be an editor of sorts with it? And if so will it feature the ability to not have to use tiles? Still, I'm surprised at how good the physics are looking in that video; and honestly I love how the rolling looks.

Also, about the camera - not sure if want. It's VERY disorienting, and the lines left from the wireframe take up alot of space on the screen when Sonic's behind a wall; and it sort of takes out the immersion of the gameplay. As a kind suggestion did you ever take into thought how Mario Sunshine and Galaxy takes care of an obstacle inbetween player and camera? As you may know, they make it where it shows a shadow of the player on the wall that's in the way of the camera, so it could show where you are going without invading the gameplay too much. Much better on the eyes too.

Really all I was asking is if you could implement something like that along with what you have. I don't doubt I could get used to the camera (which is neat in itself), but the camera still makes it feel somewhat awkward, that's all. Maybe if I saw a less cluttered level (no offense), I'd be able to see if I could handle it better. smile.png
This post has been edited by Azukara: 11 September 2010 - 09:16 AM

  • 2 Pages +
  • 1
  • 2
    Locked
    Locked Forum

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users