The Game Dev Thread

Discussion in 'Computers, Electronics, IT & Gaming' started by TedEH, Aug 29, 2017.

  1. Quaker763

    Quaker763 SS.org Regular

    Messages:
    9
    Likes Received:
    1
    Joined:
    Jan 9, 2015
    Location:
    Melbourne, Australia
    Algorithmically, yes. The HEXRAYS decompiler is rather good at showing how the original code was structured (in C), not the actual code quality itself. Though obviously the compiler they used has probably mangled a lot of what the original code looked like, a lot of the subroutines that have been reconstructed look pretty hacked together. Probably explains why the PC port has a heap of performance issues.
     
  2. TedEH

    TedEH Cromulent

    Messages:
    3,980
    Likes Received:
    496
    Joined:
    Jun 8, 2007
    Location:
    Gatineau, Quebec
    Wasn't the original game for the PS2 or something like that? PC and Playstation are very different beasts to make games for.
     
  3. bostjan

    bostjan MicroMetal Contributor

    Messages:
    13,210
    Likes Received:
    1,295
    Joined:
    Dec 7, 2005
    Location:
    St. Johnsbury, VT USA
    A PS2 game would have been developed on PS@ using a specific software development kit. The PS2's structure is based off of a form of assembly language with built-in vertex-based 3D graphics. Games like that sometimes translate okay into C, but often times the translation is messy and doesn't run very well. Assembly language on a PC is a lot less forgiving, since there are a lot more addresses that have nothing to do with gameplay, and poking them carelessly can be very destructive. On gaming consoles, especially older ones (PS2 was kind of a turning point for that, though), assembly language is a lot more forgiving in the long term.

    Anyway, disassembled and decompiled code in general can be overly frustrating to figure out. And to think that a game on the level of Silent Hill 3 was developed by roughly a dozen experienced people over the course of almost two years, it's not a trivial task to piece that all together. Good luck!

    I tried to make my own 3D game once, from scratch, just for my own personal torture use. What I had hoped to turn out to be a real learning experience just turned out to be a huge waste of time. It did give me a completely new level of respect for whomever figured out how to make the Doom engine, since they started with virtually nothing and ended up with something that, at the time, was a quantum leap in 3D graphics.
     
  4. Quaker763

    Quaker763 SS.org Regular

    Messages:
    9
    Likes Received:
    1
    Joined:
    Jan 9, 2015
    Location:
    Melbourne, Australia
    Yes it was! They ported the renderer etc to Direct3D (DX8) sometime after the original PS2 version came out. It's a pretty good port, however it seems very rushed, and from what I've gathered from the disassembly, they (the 5 or 6 people porting it) were under the pump. It's interesting to note that a lot of the test assets are still included in the game files.

    Interesting, I was under the assumption that SONY provided a heap of C libraries for the PS2? There's no way in hell this was programmed in assembly though, but I'll eat my shoe if I'm wrong. And thanks! I'm working on it in my spare time, but I'm learning a lot so far! Hopefully we'll have some 3D stuff real soon. All we really need from the disassembly is how they determine what level to load when, and how certain things like cutscenes and model head rotation (when Heather/James looks at something 'of interest') works!

    Have you tried making some 2D stuff? I tried leaping into 3D a few years ago and I had the same problem until I made a few really dodgy 2D games haha. It is a very discouraging experience though, especially with the volume of stuff (including math) you need to learn.
     
  5. bostjan

    bostjan MicroMetal Contributor

    Messages:
    13,210
    Likes Received:
    1,295
    Joined:
    Dec 7, 2005
    Location:
    St. Johnsbury, VT USA
    Sony used their own proprietary development kit. If you paid the licensing fees , they'd send a copy of it. It's not like programming a game in assembly...

    Although older game systems were done in something like assembly language. The SNES, for example, used a lot of hardcoding for almost every game. The PS1, if you recall, started out as an add-on for the SNES, then spun off on its own when Nintendo tried to fuck Sony over and Sony wouldn't have. So, Sony, trying to stand out from Nintendo, shook things up a bit, which is why PS2 game development started to revolutionize workflow, and game developers started coding in their own game engines with the PS1 and reusing much of the code to save a lot of time by not reinventing the wheel for every game. By the time XBox rolled around, consoles were essentially using C# with tons of powerful library elements. PS2 was really an inflection point in that evolutionary curve. A lot of developers complained about how cumbersome GameCube was compared to PS2, in terms of development.

    Anyway...

    In a 2D game, you have to make the game physics a certain weird way. If you make things realistic, the game is a lot more frustrating, so there is an art to conceiving how objects react to gravity and collisions in a 2D game - I think that if you take the mathematical aspects seriously, you run the risk of icky gameplay. Of course, there are tasteful ways to incorporate some real physics.

    The game I posted earlier uses a pretty nice wrapper, which has all of the mundane stuff pre-coded for you, ostensibly with bits of it optimized in assembly. I've done such coding myself, and it's a tedious process, and it's not very "sexy" working for weeks on a library of subroutines that play music and sound effects in the background of someone else's game or whatever. The very first 2D games I made had sprites painted pixel by pixel by the game itself, which worked okay if the action was slow paced or if the background was black or the sprites were very simple. Once I figured out that I had to build something that would handle the graphics by painting in layers, using the extra non-display graphics memory to draw sprites off screen, etc., it made things look a lot better. Even so, my homebrewed graphics subroutines still took a second or two to load a new screen, which made it difficult to move the viewing area fluidly in both the x and y directions without a noticeable seam.

    I think that remaking another game is a huge experience to go through. The first games I programmed were things like naughts and crosses and hangman, then I moved on to Space Invaders, Breakout, Combat, etc., and then finally tried coming up with my own stuff (which was laughable). My first game to use the wrapper was a clone of the first overworld area in Crystalis. It was trying to improve the sprites to look more 16bit than 8bit that got me making the graphics in the penguin game I referenced in an earlier post. If I had come up with the penguin game in the 1980s or early 1990s instead, it would have been a thousand times more difficult to make it, even though the look and feel of it is really based off games from that era.

    I'd imagine that taking on something like a Silent Hill remake at an early stage, you'll either build up enough experience and confidence to make your own original 3D game afterward, or else you'll just get frustrated and run out of interest. I'm only saying that because I know I would not have the patience to take on something of that magnitude right off. But then, having a bunch of disassembled code to port into another language or whatever probably fast forwards you a couple years worth of grunt work.
     
  6. TedEH

    TedEH Cromulent

    Messages:
    3,980
    Likes Received:
    496
    Joined:
    Jun 8, 2007
    Location:
    Gatineau, Quebec
    When you're talking commercial games, everyone is always 'under the pump'. (I dunno that expression very well, but I think I get what you mean.) I'd like to say that games have time to do everything in the ideal/correct way, but they never do. Everyone working on them certainly tries, but there's always compromise.

    I've never worked on a PS2, but I'd assume they had C or C++ kits for partners to work with. I don't think you can even get a dev kit (hardware) without significant cost. Not like the XBone where you can do indie work on a retail model. I have worked with the PS3 and 360 kits though - and never had to write any assembly, but they certainly come with their own sets of challenges.

    I've got a friend who, for fun, make home-brew Genesis games- I don't think I have the patience to code that way for fun. :lol:

    I've been using Box2D in the current project I've got going- basically just to provide collision detection, and to provide a bit of a sense of momentum when you stop moving (there's no jumping, it's top down-ish). Years ago, when I first started learning I though "bah, using a physics package is cheating! Unity is cheating! I'm going to do this from scratch!" I've since learned to embrace the idea of not reinventing the wheel. I still do more from scratch than I need to in personal projects (much more than I would if I had time constraints), but I think I have the wisdom now to know when being stubborn about things like that amounts to just shooting myself in the foot. :lol:
     
  7. TedEH

    TedEH Cromulent

    Messages:
    3,980
    Likes Received:
    496
    Joined:
    Jun 8, 2007
    Location:
    Gatineau, Quebec
    I just picked up a copy of Blood Sweat and Pixels, which is supposed to be a collection of stories and interviews that shed some light on commercial game dev process and the troubles involved. I haven't started it yet, so I can't confirm, but I've heard it illustrates the "every game's development is troubled, not just the ones you hear about" idea pretty well.
     
  8. bostjan

    bostjan MicroMetal Contributor

    Messages:
    13,210
    Likes Received:
    1,295
    Joined:
    Dec 7, 2005
    Location:
    St. Johnsbury, VT USA
    PS2 uses a VCL-(vector command line) oriented programming language. The PS2 could play PS1 games, so there were still artifacts from that era, which meant that certain things could only be addressed in assembly, but most of the programming was done in a compiler language. PS3 didn't have the PS1 compatibility mainly in order to work around those limitations for developers.
     
  9. bpprox22

    bpprox22 String Breaker

    Messages:
    407
    Likes Received:
    93
    Joined:
    Nov 26, 2014
    Location:
    Warren, OH
    For anyone interested, this video talks about a TON of different topics within the commercial game lifecycle:

     
    bostjan likes this.
  10. bostjan

    bostjan MicroMetal Contributor

    Messages:
    13,210
    Likes Received:
    1,295
    Joined:
    Dec 7, 2005
    Location:
    St. Johnsbury, VT USA
    Diablo was such an influential game. Seeing him play that rough demo was awesome, but I was shocked that, even with the graphics, music, voice acting, and everything like that being so smooth, the gameplay itself was completely broken. :lol:

    Wait, Battlenet ran on one computer?! Holy smokes!
     
  11. Nyx Erebos

    Nyx Erebos SS.org Regular

    Messages:
    482
    Likes Received:
    23
    Joined:
    Feb 18, 2011
    Location:
    France
    I'm a game dev in Tokyo in a company where we mostly do mobile/web games for bigger companies. And right now as I'm typing that, I'm setting up the unreal engine on ubuntu to do some personal game dev. I mostly want to teach myself the art side of games (models, animations, textures...) and hopefully make a prototype that's worth expanding upon. I lost the drive to do my own stuff for the longest time since it's quite comfortable to just dev at work and play games at home. But I just bought a brand new blade 14 to force myself to get back to it :).
     
  12. Nyx Erebos

    Nyx Erebos SS.org Regular

    Messages:
    482
    Likes Received:
    23
    Joined:
    Feb 18, 2011
    Location:
    France
    And I'm surprised on how smooth everything's working. I installed ubuntu on a usb drive and then compiled UE4 on my main drive (with windows so it's a different file system). I haven't tried to load the same project files from both linux and windows but after reading about it, it seems that they're os agnostic so I am hopeful.
     
  13. TedEH

    TedEH Cromulent

    Messages:
    3,980
    Likes Received:
    496
    Joined:
    Jun 8, 2007
    Location:
    Gatineau, Quebec
    ^ I've been doing the work on my game in Ubuntu for the last few weeks, and then going back to windows every once in a while to make sure stuff still works. I don't know if Linux has gotten more user-friendly or if I just know what I'm doing this time, but it's been a less painful experience than the last few times I tried to make the jump to anything non-Windows. Porting stuff back and forth has been surprisingly easy, even without the advantage of starting with an engine that does most of that work for you. VSCode being a thing now has helped a lot.
     

Share This Page