Sonic and Sega Retro Message Board: Flash Sonic Engine - Sonic and Sega Retro Message Board

Jump to content

Hey there, Guest!  (Log In · Register) Help
  • 2 Pages +
  • 1
  • 2
    Locked
    Locked Forum

Flash Sonic Engine

#16 User is offline x2i 

Posted 13 May 2012 - 02:06 PM

  • Posts: 11
  • Joined: 23-April 12

View PostCrasher, on 13 May 2012 - 12:48 AM, said:

For the slopes, you could check how Fancy Pants Adventure does it.


I have incorporated some of the techniques used in that video, such as the two reference points below his feet to detect angles - thats working fairly well but not perfect. I can see what is meant by sensors now in the genesis games, it's kind of the same concept. Would this work well in a non-tile based version though?

Is anyone else efficient enough at Flash and would wish to help. Some of the math is messing with my brain a little :S

#17 User is offline winterhell 

Posted 13 May 2012 - 02:43 PM

  • Posts: 747
  • Joined: 16-October 10
  • Gender:Male
I would recommend that you have a function that tells you the distance from a point to the closest solid point in a given direction. Or maybe 4 functions Get[Left/Right/Top/Bottom]Distance(int x, int y). That way if you want to see if there is something below Sonic(when in floor mode), you would do
heightA=GetBottomDistance( playerX-9, playerY);
heightB=GetBottomDistance( playerX+9, playerY);
and then do if(heightA<16 || heightB<16) there is a floor.
This is how I do it in my engine, and using such method you can abstract yourself from the collision data. It can be either tiles like the original, or the whole terrain can be a single bitmask. Or even polygonal/splines based.
Unfortunately I may not be able to help much with Flash, as I haven't touched Action script 3 in years. Though I have made a Worms clone that had pixel-perfect collision with the terrain and even destructible terrain. Is this what you are looking for ?
This post has been edited by winterhell: 13 May 2012 - 02:45 PM

#18 User is offline x2i 

Posted 13 May 2012 - 03:10 PM

  • Posts: 11
  • Joined: 23-April 12

View Postwinterhell, on 13 May 2012 - 02:43 PM, said:

Is this what you are looking for ?


To be fair, I want it to be as close to the original Sega Genesis/Mega Drive Sonic's as I can get. I am using AS2 as AS3 is beyond me, I never got on well with it.

Problems I seem to be facing is stuff like sticking to the ground when running downhill, momentum physics - gaining and losing speed on slopes, and in the long run - the stuff such as running up walls, loop-de-loops etc.

Right now though I am just trying to get the math right so that what I do have feels as genuine as it can but I am dreading going too far into the aforementioned knowing so little about it. I've tried for years to find a tutorial or someone willing to help - people who have accomplished it seem to wish to keep the secrets themselves. My plan is that IF I did create something of this calibur, I would be more than happy to release the source code or help others as I know myself how hard it is to find.

#19 User is offline Namagem 

Posted 24 May 2012 - 12:50 AM

  • Posts: 388
  • Joined: 19-August 08
  • Gender:Male
  • Location:USA
This is really cool, and solid start! I'm not a real expert on this, but it feels to me like deceleration happens a little bit too fast. Regardless, this looks amazing. Best of luck on continuing work on this!

#20 User is offline Elratauru 

Posted 24 May 2012 - 01:00 PM

  • Oooh Shiny stuff! don't touch it >:(
  • Posts: 960
  • Joined: 13-April 08
  • Gender:Male
  • Location:Montevideo, Uruguay
  • Project:Web Developer
  • Wiki edits:132
Well, I did one of those kind of proof-of-concept engines a good while back, you can find an example of it on this same forum here.

Also, you test it over here:
http://alforata.devi...llery/#/d31j8rl

It was made a long time ago when I only knew AS2 so It's kinda basic, no slopes or camera, but physics are pretty much exact. I learned AS3 with the past of the years, so I guess I could make something a lot better right now, but my job kills my free time :v:

Anyways, I hope you can use it or check it if really needed, I know the file has been deleted (the sonic.as) but I guess I can try to find it on my HDD when I come home.

#21 User is offline x2i 

Posted 08 June 2012 - 09:03 AM

  • Posts: 11
  • Joined: 23-April 12
That looks pretty good, I'd love to see the source code if you do manage to find it.

Still though, it's the slopes and loops etc... which is going to be the ballache - those who do know how to do it tend to keep it a secret... it'd be nice to have it out in the open, sure there would be even more terrible flash games of Sonic released but it'd give some talented people a chance to show off their ideas if the engine was done for them.

#22 User is offline winterhell 

Posted 09 June 2012 - 07:28 AM

  • Posts: 747
  • Joined: 16-October 10
  • Gender:Male

View Postx2i, on 08 June 2012 - 09:03 AM, said:

Still though, it's the slopes and loops etc... which is going to be the ballache - those who do know how to do it tend to keep it a secret... it'd be nice to have it out in the open

Let me be the bad programmer who spilled the secret. Its here.

#23 User is offline Lapper 

Posted 09 June 2012 - 07:42 AM

  • Freelance Artist
  • Posts: 1204
  • Joined: 15-June 08
  • Gender:Male
  • Location:England
  • Wiki edits:111
I think he may have meant specifically for flash. The physics guide is no easy ride anyways.
This post has been edited by Sonica: 09 June 2012 - 07:42 AM

#24 User is offline Damizean 

  Posted 09 June 2012 - 02:51 PM

  • As classic as rock
  • Posts: 118
  • Joined: 01-February 06
  • Gender:Male
  • Location:Valencia, EspaƱa
  • Project:Various projects
  • Wiki edits:1
If you're going for a Physics engine based solution (or at least, polygon based with linecasts), you might find this useful. It's the Actor class (fairly undocumented and dirty, sorry, had no time to revivit and clean it up) from which derives my Player class (Sonic). It contains all the collision detection & response routines.

#25 User is offline x2i 

Posted 11 June 2012 - 04:25 AM

  • Posts: 11
  • Joined: 23-April 12
Thanks, I shall take a look - time to reinstall visual studio :v:
This post has been edited by x2i: 11 June 2012 - 04:25 AM

#26 User is offline x2i 

Posted 12 July 2012 - 04:30 AM

  • Posts: 11
  • Joined: 23-April 12
I got nowhere with this... I've been without internet for like 2 weeks so only just got back online. :rolleyes:

  • 2 Pages +
  • 1
  • 2
    Locked
    Locked Forum

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