don't click here

PROSONIC IS NOW OPEN SOURCE

Discussion in 'Fangaming Discussion' started by saxman, Jul 16, 2008.

Thread Status:
Not open for further replies.
  1. saxman

    saxman

    Oldbie Tech Member
    My engine uses 5 layers. They are layer B (background), L (low), H (high), SL (sprite low), and SH (sprite high). Excluding layers B, SL, and SH, there are 2 layers for the main level tiles. That's all you need to reproduce the material in the original games, because that's all the original games ever used. Sonic can be in front of a tile, or behind. It's that simple. So what's the beef?
     
  2. P.P.A.

    P.P.A.

    SONIC 2 SUCKS, SONIC CD FOREVER Member
    644
    0
    0
    Germany
    Sonic MD (Currently: Art for Zone 3)
    I think it's the desire for a ridiculously high amount of sexy parallax scrolling and overlapping background layers. Which I share.
     
  3. Chimpo

    Chimpo

    I Gotta Be Me Member
    8,648
    1,511
    93
    Los Angeles, 2029
    Don't Forget! Try Your Best!
    Because I want to do stuff like this
     
  4. saxman

    saxman

    Oldbie Tech Member
    My engine already does parallax scrolling of sorts through virtual layers. I call them virtual because they're really sizeable images formed by a list of parameters. I'll show you an example of some code I whipped up to get reproduce Chemical Plant's background:

    Code (Text):
    1.     backcell[0].BorderT = 0;
    2.     backcell[0].BorderB = 287;
    3.     backcell[0].BorderL = 0;
    4.     backcell[0].BorderR = 0x3FFF - 16;
    5.     backcell[0].DrawLimitT = 0x8000;
    6.     backcell[0].DrawLimitB = 0x7FFF;
    7.     backcell[0].DrawLimitL = 0 + 16;
    8.     backcell[0].DrawLimitR = 0x3FFF + 16;
    9.     backcell[0].ImageOffsetX = -16;
    10.     backcell[0].ImageOffsetY = 0;
    11.     backcell[0].ImageScopeX = 0xFFFF;
    12.     backcell[0].ImageScopeY = 0xFFFF;
    13.     backcell[0].CellIntervalX = 0.125;
    14.     backcell[0].CellIntervalY = 0.25;
    15.     backcell[0].ImgIntervalX = 0;
    16.     backcell[0].ImgIntervalY = 0;
    17.     backcell[0].SlideSpeedX = 0;
    18.     backcell[0].SlideSpeedY = 0;
    19.     backcell[0].DistortionA = 0;
    20.     backcell[0].DistortionB = 4;
    21.     backcell[0].DistASpeed = 0.5;
    22.     backcell[0].DistBSpeed = 0.5;
    23.     backcell[0].Transparent = 1;
    24.    
    25.     backcell[1].BorderT = 288;
    26.     backcell[1].BorderB = 303;
    27.     backcell[1].BorderL = 0 + 16;
    28.     backcell[1].BorderR = 0x3FFF;
    29.     backcell[1].DrawLimitT = 0x8000;
    30.     backcell[1].DrawLimitB = 0x7FFF;
    31.     backcell[1].DrawLimitL = 0 + 16;
    32.     backcell[1].DrawLimitR = 0x3FFF + 16;
    33.     backcell[1].ImageOffsetX = -16;
    34.     backcell[1].ImageOffsetY = 0;
    35.     backcell[1].ImageScopeX = 0xFFFF;
    36.     backcell[1].ImageScopeY = 0xFFFF;
    37.     backcell[1].CellIntervalX = 0.125;
    38.     backcell[1].CellIntervalY = 0.25;
    39.     backcell[1].ImgIntervalX = 0;
    40.     backcell[1].ImgIntervalY = 0;
    41.     backcell[1].SlideSpeedX = 0;
    42.     backcell[1].SlideSpeedY = 0;
    43.     backcell[1].DistortionA = 1;
    44.     backcell[1].DistortionB = 4;
    45.     backcell[1].DistASpeed = 0.25;
    46.     backcell[1].DistBSpeed = 0.5;
    47.     backcell[1].Transparent = 0;
    48.    
    49.     backcell[2].BorderT = 304;
    50.     backcell[2].BorderB = 0x7FF;
    51.     backcell[2].BorderL = 0;
    52.     backcell[2].BorderR = 0x3FFF - 16;
    53.     backcell[2].DrawLimitT = 0x8000;
    54.     backcell[2].DrawLimitB = 0x7FFF;
    55.     backcell[2].DrawLimitL = 0 + 16;
    56.     backcell[2].DrawLimitR = 0x3FFF + 16;
    57.     backcell[2].ImageOffsetX = -16;
    58.     backcell[2].ImageOffsetY = 0;
    59.     backcell[2].ImageScopeX = 0xFFFF;
    60.     backcell[2].ImageScopeY = 0xFFFF;
    61.     backcell[2].CellIntervalX = 0.5;
    62.     backcell[2].CellIntervalY = 0.25;
    63.     backcell[2].ImgIntervalX = 0;
    64.     backcell[2].ImgIntervalY = 0;
    65.     backcell[2].SlideSpeedX = 0;
    66.     backcell[2].SlideSpeedY = 0;
    67.     backcell[2].DistortionA = 0;
    68.     backcell[2].DistortionB = 4;
    69.     backcell[2].DistASpeed = 0.5;
    70.     backcell[2].DistBSpeed = 0.5;
    71.     backcell[2].Transparent = 0;
    That's internal engine code. But those 'backcells' are really just arrays of parameters that tells the engine what to draw and where. I don't consider them actual "layers" since they're not bitmaps.

    EDIT: In fact, these cells are demonstrated in this early video -- http://www.youtube.com/watch?v=lJRAB9y46fk
     
  5. Chimpo

    Chimpo

    I Gotta Be Me Member
    8,648
    1,511
    93
    Los Angeles, 2029
    Don't Forget! Try Your Best!
    So....Can I do stuff like in the Astal video?
     
  6. saxman

    saxman

    Oldbie Tech Member
    Yes
     
  7. Hivebrain

    Hivebrain

    Administrator
    3,049
    161
    43
    53.4N, 1.5W
    Github
    You could do that kind of thing with objects à la Star Light Zone.
     
  8. MK

    MK

    Hacker Oldbie
    310
    0
    0
    New England, USA
    Secret :o o:
    God I'm so looking forward to this. I'm seriously considering using it for my hax.
     
  9. SMTP

    SMTP

    Tech Member
    10 days to go! :D
     
  10. GasparXR

    GasparXR

    I'm back! Member
    9 days, 4 hours and 44 minutes =P
     
  11. saxman

    saxman

    Oldbie Tech Member
    Here's what to expect from this release:

    - Abbility to import levels from Sonic 2 (and 'maybe' Sonic 1)
    - A complete integrated editing environment that will allow you to edit tile layout, block mappings, collision, and the abbility to import new tiles from a BMP or PCX image
    - True YM2612 and PSG emulation
    - Player code ported directly from the Sonic 2 disassembly
    - BLAST Programming Interface (BPI)
    - A couple basic objects ported from Sonic 2 (rings, path swappers, and 'maybe' a few others)

    What will be lacking is particularly in the last item I listed -- there's a severe lack of objects. I'm working on the scripting portion of the engine to allow at least limited ability to create new objects. This will be an area that I will continue to work on, but don't expect a whole lot from this release regarding objects. All the other major stuff will be there in regards to level design. This should be enough to start a game, and will give me some time to work on getting other things done with the engine while you work with what you have.
     
  12. Sappharad

    Sappharad

    Oldbie
    1,415
    70
    28
    Care to elaborate on this YM2612 and PSG emulation? You're doing an engine from scratch, yet you're emulating the sound? I suppose it's authentic and all, but it seems out of place.

    What about the source code? Will you be open to porting right away, or is that coming "when it's ready?"
     
  13. saxman

    saxman

    Oldbie Tech Member
    The YM2612 and PSG emulation is something I have alway said I wanted to do. A lot of credit goes to Cyan Helkaraxe for making this particular part of the engine work, because I didn't even know what I was doing in regards to trying to get it working. What we did was use the YM2612 and PSG source files from Gens and put them into the ProSonic project. Cyan figured out what needed to be done to use them, and *BOOM*, instant emulation.

    I wanted this sound emulation because what's better than allowing people to port some of their songs from their Sonic hacks into ProSonic? Some people would prefer to use OGG files or something like that, and that's fine. But for those who want their game to have a classic Genesis feel to it, this helps with that. It also allows games to have the common sound effects used across the games without having to use bulky PCM-based files that use up more space.

    It's not what I'd consider a major feature, but I think some people would appreciate having it.

    Oh and in regards to the source, I'm not ready to release any source code yet. I'd like to make some more progress with it first. But it'll happen.
     
  14. GasparXR

    GasparXR

    I'm back! Member
    Oh boy, that 'maybe' gets my hopes up a little more. :\
    Finally, the painful 8x8, 16x16, then 128x128 editing can stop! =D

    Will we eventually get a release of PS with a music editor? We could use write midi music, then convert to xm, then to smps using xm3smps, but it would come in handy.

    I thought you were trying to recreate it yourself. =P

    Would that be a interface that looks like the checker patterns from GHZ?

    Perhaps the base for a monitor? That is, we still have to choose the sprite for it and set the item(s) we want Sonic to receive, but just the main coding for one?
     
  15. P.P.A.

    P.P.A.

    SONIC 2 SUCKS, SONIC CD FOREVER Member
    644
    0
    0
    Germany
    Sonic MD (Currently: Art for Zone 3)
    :D
    :/
    Will that be editable, both in behaviour and looks? I didn't like a lot of things about how Sonic felt in S2.
    ???
     
  16. GasparXR

    GasparXR

    I'm back! Member
    Does that include the DASM files? Because I already have a level with edited art and such in S2 =\
     
  17. Phos

    Phos

    Going for the high score on whatever that little b Member
    3,318
    0
    0
    Will we be able to add new abilities to Sonic?
     
  18. saxman

    saxman

    Oldbie Tech Member
    I need to make an FAQ or something, because I'm answering the same questions over and over! No biggie though, I'll be more than happy to answer again on the repeats, as well as the new ones.

    - I don't know what DASM means. Is that disassembly? Levels are imported through a combination of savestate and ROM. It grabs most of the stuff from a savestate, but grabs the object layout from the ROM. It looks in the same location as the unedited Sonic 2 for objects. So... will it work, I dunno!

    - I ported Sonic's code rather than doing my own because I saw greater advantages in doing a port. And thanks to my port, I can make the BLAST Programming Interface (BPI) work to a larger degree.

    - The BPI is a functionality I have been holding out on for a while, but I'll go ahead and reveal it. It's essentially Motorola 68000 emulation under the hood. It's designed to run code from objects from your disassemblies. It's not finished, and only a couple objects work. This feature will be improved on in the future.

    - No music editor will be designed simply because I see no advantage in doing one. It's up to the community to create one.

    - No monitors will be available in this release. The BPI still has a ways to go.

    - You can't add new abilities to Sonic right now. He is as he is in this release.

    - Also, this is not really an answer to a question, but I thought I'd add that I've designed a file format specifically for title cards, title screens, etc. I don't know to what extent it will be implemented into this engine by it's initial release, but I figured that is probably something people are interested in. Correct me if I'm wrong.
     
  19. GasparXR

    GasparXR

    I'm back! Member
     
  20. So in this first release there will be springs right?
     
Thread Status:
Not open for further replies.