don't click here

Programming

Discussion in 'Project: Sonic Retro (Archive)' started by Retro_Stew, Nov 9, 2008.

  1. Dark Phantron

    Dark Phantron

    Member
    15
    0
    0
    Hello there.

    Unless I misread something somewhere, you're needing a programmer right?

    I'm quite skilled in Microsoft C#/XNA programming, so I could be the project's programmer. All I need is your 'okeydokie', and I'll get started on it.

    By the way, is there any particular reason why you'd want to use that EO2 engine? As a programmer, I myself wouldn't really feel safe making a Sonic project based on some guy's engine. I'd make an engine from scratch to make sure that I can program in anything I need to. Most importantly though, I'd do this to make sure that Sonic's physics work like Sonic's, and that the game runs at as high a framerate as possible.

    I know how to develop a game, so I could probably get a presentable engine (probably something like Sonic 2 HD's Tech Demo with a working camera system and small level... maybe with badniks as well) within a month. Since the art isn't done I could just use Sonic 2-3&K graphics to fill in until the art is finished.
     
  2. Matwek

    Matwek

    Member
    805
    0
    16
    I say go for it, I know very little about programming but im guessing with all the ideas being thrown around the majority of them will require additional programming when it comes to implimenting them.
    Obviously people would need to see somekind of demo like you stated before taking it any further (getting the physics right being the main aim to start with), as I said I'm way out of my depth on stuff like this so people in the know may disagree with me but currently we have a distinct lack of programers on this project, hopefully this will at least kick start some interest.
     
  3. Dark Phantron

    Dark Phantron

    Member
    15
    0
    0
    That's partly why I'd want to program it in C#/XNA. I've got pretty good at making objects very object oriented in it, so that means it should be fairly easy for anyone (including those without C#/XNA) to add their own bits and pieces here and there.

    That was the plan! :) I'll get started on it sometime this week.

    Glad to be of service! :)
     
  4. Dark Phantron

    Dark Phantron

    Member
    15
    0
    0
    Okay, been going over some programming stuff in my head trying to figure the best way to program this.

    My first priority is the graphics engine & input (should easily be completed in the first day). It would be very difficult to program Sonic without being able to see him or control him! :P The only thing I don't know is what format you're going to be using for the textures. If you're gonna use BMP, JPEG, TGA, PNG, or DDS files I won't need to spend any extra work making a custom content processor for loading the textures into the program.

    My second priority would be Sonic's engine. Thanks to the public Sonic 2 disassembly, it shouldn't take long for me to track down Sonic's speed variables to be sure they're completely (or atleast very close) accurate. Then there's the camera system, and that'd be piece of cake. The rest (as long as Sega didn't do anything weird in their code somewhere) should just be simple collision checking and physics-y stuff (for things like running up/down hills), which again shouldn't take long.

    My third priority would be making the level engine. I think I heard somewhere that Sonic's courses were made out of 128x128 tiles that are made from 16x16(or something, don't remember exactly) tiles, so all I'd need to program is a system that will bake the 16x16 tiles into 128x128 tiles. This should be really easy. For me the difficult part would be making a bug-free user friendly editor to construct the level and tiles with.

    My fourth priority would be inserting Badniks, graphic effects (like the 'poof' created from destroying a Badnik'), and programming Sonic's death and ring systems. This should also be fairly easy.

    My fifth priority would be music & sound. When I get to this point I'll need to know what formats you will be using for Music and SFX. XNA has easy implementation of .WAV, but if you're going to use something like .OGG file types then I'll have some work to do here. Either way, it should be easy.

    My sixth priority would be setting up certain key elements like bosses, special stages, fully set up Zone structure (where completing Act 1 leads to Act 2, Act 2 leads to Level 2, etc.), making Tails and Knuckles playable (very easy, could also very easily set up Amy and Nack so that all I'd need to do to make them playable is essentially type Amy/Nack.IsPlayable = true in the code.)

    My final priority, with Sonic, the level editor, Badniks, music & sound systems complete, would be content filling. This would involve everyone else in the project, obviously. With a little luck everyone's work would come together and the project would start looking like a true sequel to S3&K. At this point the only worry would be a cease and desist from Sega, although since it'd be freeware with completely custom art, music, and engine this probably wouldn't be a concern. I whole-heartedly believe that modern Sega couldn't make an okay sequel to S3&K even if their lives depended on it, so if we had to shut the project down it would really suck.

    If I have extra time by this point I'll throw in multiplayer (with LAN and Internet ability included, hey why not?) and anything else that might come to the team's minds.

    I know that it might seem like I'm promising the world here for the programming end of things, but you have to realize that our modern programming tools makes things extremely to do things that might have been difficult 15 years ago. Plus I'm just that good. :)

    I'd say about 2-6 months is the time it'd take to get the engine finished, provided nothing really craptacular happens. (I'll of course back stuff up so that it doesn't)

    I'll be starting on it this weekend.
     
  5. Jayextee

    Jayextee

    Unpopular Opinions™ Member
    3,253
    62
    28
    Atro City
    I DONE MAKED GAMES.
    Out of those, I'm personally inclined toward .PNG for the translucency support (also lossless, unlike JPEG which is unsuitable for pixel art) -- what would the hit on CPU usage be like with, say, eight screen 'layers' of fullscreen 320x224 PNGs flying around? Just wanting to know where to shoot here.


    Since we're working at the same resolution as the Megadrive/Genesis, a pixel-perfect recreation of the physics is a bare minimum to expect, really. I think Sega were quite hackish with the code in some respects, but there's no reason there should be any real barriers in the physics department.


    Right. In the original games, all graphics are stored as 16-colour 8x8 tiles (choosable from 4 palette lines), which are then mapped onto 16x16 blocks (using any of the palette lines, therefore a 64-colour block is more than possible). In turn, the 16x16s are mapped to the 128x128 "chunk". Also, the collision/heightmap is mapped to the 16x16s.

    Before this happens, we're probably all going to have to discuss what nature of graphical effects are to be included; personally I'd love an engine capable of things like light flares, particle effects and translucencies (Additive and subtractive, you know - all the different types). However, there are those here who feel that such things can't actually be used in moderation, so shouldn't be included. Either way, we'll reach a democratic vote on this.

    It'll likely be a compressed format we use, and .OGG lends itself to looping audio.


    Yes. Don't know about additional character being playable though.

    C&Ds are always a worry. However, fangames have been completed which do not use 100% custom materials without such troubles, so we'll see, huh? :)


    I'd love multiplayer, some will whine at it even being mentioned. A discussion will be had at some point.


    I hope I don't come across as rude when I say; you'll have to put your money where your mouth is, so to speak, before we can put much stock in you, although you sound very promising indeed.

    Is there any chance of you working on something with replaceable placeholder graphics? This way, we can have a sort of working 'core' and see how progress is going in a very real way.
     
  6. Ollie

    Ollie

    DIGGY DIGGY HOLE Member
    Just a matter of interest. Does anyone still have the demo that was in the OP? It seems to have been deleted.
     
  7. Rika Chou

    Rika Chou

    Tech Member
    5,276
    169
    43
    Link still works, it just has hot linking protection. So just copy/paste it and it should would.
     
  8. Dark Phantron

    Dark Phantron

    Member
    15
    0
    0
    That'll make things pretty easy for me. As for CPU usage, I'm using a Geforce 7600 GT with 2 gigs of ram, and in an unrelated project I've been working on I could draw several 1024x768 layers before any noticeable slowdown, and that was before I discovered instancing and other great memory reducing concepts. CPU usage shouldn't be much of an issue.

    Pixel-perfect recreation, huh? I want to have it as pixel-perfect as possible too, but it may take a while to get it right. I intended to do it pixel-perfect anyways, though.

    Excellent. I have a good idea on how I'll program this.

    I don't really want to get too far into the pixel shader stuff until the democratic votes are over. However, the past few months I've learned how to do a lot with shaders, so I should be able to create any type of effect we'll need.

    EDIT: Oops, forgot to finish this sentence here. Okay then, I haven't worked with .OGG files before. This shouldn't be a problem either.

    I don't know either. Just want to be prepared.

    My thoughts exactly.

    I could always make an 'unofficial' multiplayer pack or something. :P

    If I worked on some project and some random guy that appeared from the blue saying that he could program everything I wanted for me, I'd probably be more skeptic than you are. I'm glad you think of me as very promising though! :)

    I should have a basic prototype by the end of Sunday.

    I always make my projects with easily replaceable graphics. The working core thing should also help coordinate the project's efforts, so that it'd be easier to see what sprite needs work or what music needs to be made, and so on.
     
  9. Stealth

    Stealth

    Tech Member
    594
    30
    28
    Sonic Mania, HCGE, Sonic Megamix, SonED2, [...]
    Fuck you too, guy. Seriously.

    What kind of stupid ignorant shit is that? You have the fucking nerve to just barge in here, insult the work of the only remaining founder of the Sonic the Hedgehog technical "community", the original Sonic fangame programmer, the original Sonic the Hedgehog level editing author and author of the currently most widely-used utility, and one of the few people most well-known for making the original Sonic the hedgehog games his bitch by creating awesome technical hacks and ports, with you clearly not even having had the decency to read about it, try it out, or even read other threads on this forum regarding the same issue, and THEN proceed to wave your e-dick around without even having anything to show for it?

    And the rest of you, you're eating it the hell up, despite those facts. I am deeply offended. You could have AT LEAST said something to the effect of "Hey, Stealth's cool, and so is E02. It may not be the end-all answer to all of the worlds ills, but it is well-built, and it is powerful, so you might want to try it before you make comments like that, especially considering the fact that your comments seem to indicate that you don't even understand what it is".

    For your information, I don't accept anything less than perfection from myself. The physics in my Sonic the Hedgehog reproduction for my own E02 are no less than 99% accurate, with the remaining 1% MOSTLY being taken up by the superior path handling system that would have been entirely impractical on the Genesis, and the entire game system is HIGHLY expansible, including EVERYTHING that makes it "Sonic". ALSO, you fail to see that I already PERSONALLY expressed what actual "cons" there are to using the E02 engine myself when -I- tried to kick this forum into gear. I know what it can and can't do, and yes, this group could develop an EXCELLENT game with E02 if someone had actually tried, which is why they made the initial choice to go with it. It is a solid, EXISTING system, including the most accurate Sonic the Hedgehog reproduction to-date. Whether or not they choose to use it (which I was already under the impression that they had changed their mind about) isn't my concern so much as whether or not it was a well-informed and well-thought decision. If they want some entirely unnecessary frills that I don't provide, that's their business.

    Throwing C# into the mix also makes me laugh and vomit. Microsoft.. goodbye standards and portability (and if I'm not mistaken, that's one of the things this group was looking for, which is one of the only "cons" to development with E02). Normal MSVC is bad enough, and I personally don't even touch C++ if my hands aren't tied. If you can't do it with C, it's not worth trying. This isn't even to mention the fact that you seem to be concerned only with developing a follow-up to a game that ran on the GENESIS that JUST runs "reasonably" on hardware that was developed within the last 5 years or so. That's the attitude that has plagued the entire industry for the last decade, and it's utterly disgusting.

    Also, I might as well get this out there while I'm already at it. I'm disgusted by the conversations that were going on about billion-color non-palletized graphics. First of all, I imagine that they still would have used palettized graphics in a 2D Sonic game on the Saturn, and the highest-end system running any 2D games at the moment (GBA/DS platforms) use a higher number of colors, but are STILL restricted to 2 palettes (one 256-color palette for backgrounds, and one 256-color palette for sprites), and THAT should be the MAXIMUM that ANYONE developing this sort of project should aim for. Also on the subject of graphics, I'm also still disgusted by the talk about .gif/.png/etc that people keep bringing up to ANYONE developing any games or utilities. Those formats are BLOATED with TOO MUCH UNNECESSARY DATA. PNG is a complete NIGHTMARE. Settle for something more practical like .pcx or .tga. Practicality seems to be a point lost on too many people these days. And a final thought, I'm also disgusted by all this talk about .mp3/.ogg/etc. The people that mentioned moduled music have it right. It's the perfect balance between size and quality, and it's not hard to use. It also lends itself well to looping, speed/pitch effects, channel toggle, and even things like dynamic music. That sort of thing is by far not "out-of-date", as it is still relevant and in-use today, and in general anyone using anything else is just being wasteful. As far as Sonic Jam goes, streaming PCM from files on the CD was a poor choice on Sega's part, but it was probably due to not having enough time to otherwise accurately reproduce the original music. The Saturn certainly had the ability to use CD audio, but for a large soundtrack, moduled music would certainly still be a superior decision, as it would take up MUCH less space and not require streaming (in addition to the other benefits I already mentioned)

    And the clencher -

    If you were actually concerned with doing this, you could have started doing it with E02 forever ago. There's nothing stopping you, and even if you weren't going to use it in the end, it's still a solid way to see the content put to practical use and attempt to prototype other things. There is absolutely nothing stopping you from doing that if you feel that that's the sort of thing that the project needs to move forward. Don't expect anything else to do any more good than my original demonstration, because that's exactly what I attempted to do, and apparently it didn't work for more than a day or so. If you want anyone else to do anything about it, kick them in the ass NOW
     
  10. GerbilSoft

    GerbilSoft

    RickRotate'd. Administrator
    2,971
    76
    28
    USA
    rom-properties
    I'm going to have to disagree with you on this. PNG is actually a very good format, and is relatively simple to integrate into any program by using the open-source libpng. That, and most images are actually smaller in PNG format than in an equivalent uncompressed format due to gzip compression. Sure, there might be some CPU overhead when loading the image, but on most systems made after 1999 (and maybe even earlier), disk I/O is the bottleneck, not CPU.

    GIF, on the other hand, *is* an obsolete format with regards to games. Pretty much the only good use for GIF is animated web graphics, and even that's being phased out by APNG.
     
  11. nineko

    nineko

    I am the Holy Cat Tech Member
    6,305
    481
    63
    italy
    I 100% agree with the above points. I know I had frictions with Stealth in the past, but I was wrong and he was right, I was ignorant about many things concerning his SonED2 and his E02, and I was just going by "what people said". If this thing is going to end up on a fan engine and not on a Genesis, E02 is the best pick we currently have. It is well programmed and reasonably optimised, something that gets forgotten way too often these days, as Stealth said too. Using an unnecessary language like C# would lead to a sloppy engine, which maybe will replicate the physics just like E02 does (I doubt that), but would require a computer at least twice as powerful, if not more. New programmers are getting lazy, I will never stress this enough. Stealth has been a programmer since forever so he knows what "optimization" means. I'm younger than him but I, too, had the chance to make programs on computers where the RAM was in kilobytes rather than in megabytes or even in gigabytes, and processors' speeds were less than 10MHz, and I feel disgusted when I see people using 64-bit variables to store a boolean and stuff like that. Probably ProSonic will be a valid Sonic engine too, I still think Saxman is going to do a great work with it, and probably it will be a fair competitor to E02 in the future, but as things are currently, E02 is the best option for a project like this. And no, I won't edit my previous post in this thread, because I thought that when I posted that and I would lie if I say that I didn't think that, but opinions aren't set in stone, and people can change their mind.

    I agree also about the palette discussion. We don't need billion colors to do something good, palettes are still the best approach when it comes to graphics, in my opinion. Unlimited colors would only increase the file size a lot without a reasonable improvement in the quality. Besides, effects like Super Sonic can be done very easily with palette rotations, but would require other techniques such as HUE rotation (oh hi I need to eat your CPU power) to be done without palettes. 256 colors are a lot for pixel art. I can hear ICEknight saying that they didn't use gradients back in the day, they used dithering and an NTSC filter. Well then, ICEknight is right.

    Finally, module files. Should I really write down my thoughts about them? They can give a lot of flexibility to the soundtrack as Stealth also mentioned, speed/pitch changes, channel muting, looping, and so on, and they can be as high quality as we want them to be, it all depends on the samples used in them. They can sound exactly like MIDI files if you throw a GM/GS/XG soundfont into them, so people who are more familiar with MIDI files won't lose their work at all, since it can be "ported" to the better XM/IT format without losing any feature, nonetheless they can GET new features which aren't standard in a MIDI, like looping. But module files can sound like a YM2612 too if you load proper samples. Basically module files can sound like EVERYTHING YOU WANT, they're superior, and I will support this choice of format as long as it will be possible. If you go for mp3/ogg/wav/aif/aac, good luck at making them loop flawlessly. Also, filesize.

    Just my two cents, but as the note in my signature says, feel free to ignore this post.
     
  12. Stealth

    Stealth

    Tech Member
    594
    30
    28
    Sonic Mania, HCGE, Sonic Megamix, SonED2, [...]
    My point is the content of the format. Have you actually looked inside of PNG? It's sickening. There are way too many things IN the format, and as I've been told in a recent conversation with a very respectable individual, it wasn't even developed properly in the first place, due to things like misusing the compression format, and layering more and more filters and crap on top to try and compensate. Anyway, the main point of my argument was that PNG is ENTIRELY unnecessary for game development. There are SO many options and "features" to PNG and other formats that go entirely UNNEEDED, and you'd be better off using a straightforward format that's designed to hold a palletized image, and nothing else. For me, for example, libpng would just be a ton of added clutter. I don't see where it has any real practical use in this project, either. It's for image sharing, not for game development
     
  13. GerbilSoft

    GerbilSoft

    RickRotate'd. Administrator
    2,971
    76
    28
    USA
    rom-properties
    There are definitely chunks defined in the PNG standard that aren't needed for most purposes, but from what I've seen, the basic four chunks (IHDR, IDAT, PLTE for paletted images, and IEND) don't seem too problematic. It's all the other stuff like sBIT, tRNS, cHRM, and gAMA that make things irritating.

    I suppose that if you're developing a game designed for a 320x240 display, then PNG is overkill. It's when you start getting into higher resolutions that PNG can help out with e.g. load times.
     
  14. nineko

    nineko

    I am the Holy Cat Tech Member
    6,305
    481
    63
    italy
    On the good side, the PNG format provides a very good compression which is usually better than any other image format; on the bad side, PNG chunks introduce a lot of overhead, many people maybe don't know that each PNG chunk requires 4 bytes to tell the size of the chunk itself, 4 bytes of chunk identifier, 4 bytes of checksum. That's 12 bytes per chunk, including the "IEND" chunk which is ALWAYS empty by definition, so its 12 bytes are always the same. You may think that 36, 48 or even 60 bytes of overhead aren't that much when the files are bigger than some kilobyte, but their relative weight is much higher in sprites that are just a few hundred bytes big. PCX is obsolete in many ways, but once again, it's the best choice for something like this, because it's so easy to decode it's almost painful (even I could write a PCX reader in Quick Basic, and I hate to work with graphics so yeah).
    PNG is a good format, yes, not the absolute truth.

    edit: typo
     
  15. muteKi

    muteKi

    Fuck it Member
    7,851
    131
    43
    In regards to moduled music I've been doing everything in ModPlug anyway so I have nothing against using it over OGG or MP3 format (I have them saved in XM format, incidentally).

    In fact, moduled formats would be easier to critique and edit!
     
  16. Tweaker

    Tweaker

    Banned
    12,387
    2
    0
    As I've said through other mediums, the concern was never that moduled music was less practical or less technically optimized. My personal concern was the lack of prominent, available talent that is proficient enough with modtracking to create high quality, Sonic-esque music that both fits the mood and has samples that bring the music up to relatively decent standards. Remember—even FM synthesis has 44khz, fresh, realtime sound. Most modules may have samples which aren't as top-notch quality for space reasons or something.

    If I had to point out superb moduled music, then consider the past music in Sonic CD. The samples used were extremely appropriate, sound modern, fit the style of music very well, and just sound... well, good. Do we have the kind of talent who can track modules with that same level of quality and aesthetic appeal? If so, then it's the right decision to make. If not, though, then the only practical choice we have is through a PCM-based music format, where the only limitations on what the music can sound like are up to the creative abilities of its composer.

    Want another example of a fantastic module? Listen to this. Fantastic samples, fantastic melody, and a very modern, appealing soundscape. This is the level of quality we should strive to achieve; running a MIDI and applying sample rips from the Microsoft GS Synthesizer just won't cut it.

    So, here's my question—who has the talent? Who's willing? Is this even a feasible course of action considering the talent we have available? We seriously need to explore this if moduled music is the way to go.
     
  17. I still don't understand why this is being done on a pc written engine and not as a rom hack. It would kind of avoid all this bitching... and be playable on every platform with a Genesis emulator on it.
     
  18. DimensionWarped

    DimensionWarped

    Erinaceous! Oldbie
    Have you ever seen a rom hack that even comes close to being a whole new game? I know I haven't. Even Megamix is a long way off from that.
     
  19. Rika Chou

    Rika Chou

    Tech Member
    5,276
    169
    43
    That does not mean it's not possible, just because it hasn't been done. With the right people working on this, with the work I've seen posted so far, it could be done. (though the awesome sprites that are being made would suffer because of the palette limits.)

    It could always be done for the 32x, that way the sprites would work. It could be written from scratch so it wouldn't be a ROM hack. (Though Sonic 2 and 3 were both kinda hacks of the previous game...)

    Though in the end I just don't want this to be for PC only, as long as I can play it on a game system then I'll be happy.
     
  20. Chimpo

    Chimpo

    Why is Tekken 6 afraid of Tekken 7? Member
    8,635
    1,497
    93
    Los Angeles, 2029
    Aiming for Genbu!
    ITT: Temper Tantrums.

    What the fuck is this shit? What are we, 12?

    And I'd really hate to see this be turned into a rom hack. Fuck that shit homes, let's get some real blast processing going.