Making a Game for FIVE Different Consoles - Ludum Dare 46

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
so I recently made a game for Ludum dare a 46 in case you've never watched sub Rocky's intro Ludum dare a is a huge game development competition where you get either 48 or 72 hours to make a game I've participated in a few game jams before and normally I use a game engine like unity to create my entries since having all of this gives you a huge headstart compared to creating everything from scratch but for this gym I decided to give my small brain an extra challenge I had to create my entry with just C++ and a library for graphics I ended up using a great C library called rate Lib for graphics and input I'll link to it will be available in the description I made a simple game with an egg that you have to launch between platforms to avoid falling in lava I [Music] managed to finish and submit my game right before the 72-hour deadline but I wasn't able to upload a web build in time this meant that if someone wanted to play my game they would have to download it I don't think anyone would want to spend their time downloading this when they could just play better entries in their web browser so I checked the rules and apparently porting your game to other platforms after the deadline is not only allowed but also encouraged so I added my web build and this gave me the really dumb idea that you already know if you read the title of this video since my game pretty much only relies on standard C++ functions it could probably compile to just about any platform with only a few changes so I thought it would be interesting to try to port my game to as many consoles as I could out of curiosity I went to my games page on the Ludum dare a website and checked with the possible options were when listing the platform's your game supports it turns out there are options for literally every single console even consoles that don't exist yet so this pretty much sealed the deal for my crazy idea before I go over how i ported my game to all these consoles I should probably explain how the code behind it works the game logic is pretty simple the exposition is constantly changing based on a velocity variable which is constantly increasing by a constant that represents the acceleration of gravity when you press down on the mouse button the cursors position is stored in two variables Mouse down X and mouse down Y then when you release the button I set the velocities X component to the distance between Mouse down X and the cursors current x position and the velocities y component to the distance between Mouse down Y and the cursors Y position and that combined with some really long if statements for collision detection makes for a kind of fun kind of broken game so here's a list of all the consul's I'm going to attempt to port my game to I picked these ones because they all first of all have C++ libraries and our consoles that I own but they also each have interesting limitations that I think will be fun to try to work around all of the libraries I use for each console port will be linked in the description I'm going to start with a PS Vita because I think it'll be the easiest in screen resolution is very close to the resolution of the original game and it's a fairly modern console so memory and performance shouldn't be an issue I start off by commenting out all of the functions that needed to be replaced like loading and drawing sprites fonts and sounds then I went through the code and slowly started replacing stuff first I replaced raelia sprite loading functions with the Vita 2d functions then I replaced all the functions for drawing sprites in the screen then after replacing code for drawing a line I realized I should probably try compiling all of this oh it looks like I missed a few things you wait wait it actually works I didn't actually expect the porting process to be as straightforward as I thought so I was honestly pretty surprised something that really stood out to me when testing for the first time was how nice it felt to play and after that I reacted the UI text which Vita 2d spawn support made really easy and also we added sound effects using a Vita port of an audio library called so loud [Music] and with that my game was now working on the PlayStation Vita I added a download link to the games page and was pretty excited to keep going [Music] finishing the Vita port gave me a lot of motivation so I decided to take on a console that would be a little more complicated next the Nintendo DS the most apparent issue is that the DSS screen resolution is a lot smaller than the games resolution and it's 2d rendering capabilities are pretty limiting so I had to make some changes to the game sprites I played around in and determined how much smaller I should make the sprites and decided to make them half of their current size and after adjusting my sprites and porting over the Vita code I came across my next issue the deus graphics library i'm using doesn't have support for drawing lines and without a line to somewhat guide the player the game will be even more unfair than it already is so being the smart person that i am i came up with a clean and efficient workaround my original plan was to create a dotted line out of sprites i made a prototype of the effect I was aiming for in unity you can set any number of points and it'll distribute those points along a line but then a terrible sinister thought came into my mind what if I set the number of dots to something huge it would just look like a normal line no one would be able to tell the difference so yeah I made a line renderer that works by drawing 101 textures of a square to the screen on a console with 4 megabytes of RAM it doesn't affect performance so we can just pretend like it doesn't exist the last thing I had to do was implement the UI the Dias library I'm using does have support for a simple 8 by 8 or 8 by 16 fonts but for this game that won't really work too long so instead I made sprites for all of the text in the game for the score I made sprites for each digit and use modulus to determine which sprites display on the screen and I did the same thing for the high score and then slap some sound effects on and another platform on the game's Ludum dari page I really like how the Diaz port turned out the touch screen acts kind of like a trackpad and I think this control scheme ended up being the best way to control the game [Music] speaking of ways of controlling the game the next platform I decided to target was the Wii and oh boy isn't this control scheme just great right away I had a problem there were so many different options for graphics libraries and I had no idea which one I should use so being the responsible person that I am I picked a random one lately sprite turns out I would deeply regret this choice later on so using the Vita port as a base I started commenting out code and adding some initialization stuff and button input and then I quickly compiled everything to see if I was on the right track and oh sure let me just delete the Vita 2d header and after that I only had one screen worth of errors which was a pretty big milestone for me so there I was with my code on one monitor and a screenshot of the errors in Microsoft Paint on the other going through and fixing all of my dumb mistakes [Music] and now that I had some sort of code compiling it was just a matter of replacing everything else I replaced all the functions for drawing sprites and pretty quickly I came across an issue Lib wee sprite also didn't have support for drawing lines sure I could do the same thing I did with the DA sport but I didn't really want to start a trend of having unsophisticated hacked together code Lib wee sprite does have support for drawing rectangles so I thought I could be clever and make a line by using a skinny rectangle in some trigonometry but uh yeah let's just go ahead and delete that I searched around and apparently a decade ago someone made an extension for Lib wee sprite with line drawing support but there was no download link or any mention of it on the Internet outside of this wiki page I even reset to the author and he had no idea what I was talking about so I figured my best bet why should this dish this entire ancient library from 2008 I reached out to a friend of mine on Twitter who does a lot of cool 3d wee development and he recommended that I use girl or grr Lib it didn't take very long to install the library and edit my code to use grr Lib and then I just added sound effects in UI which was made even easier because grr Lib also has support for TTFN font rendering overall this definitely isn't the best way to play the game but I'm happy with how it turned out I could have probably made the controls better using IR to track the relative motion of the Wiimote doesn't make a lot of sense using motion controls probably would have been a better method [Music] the last two consoles I wanted to port my game to where the GameCube and the PSP neither of these have touch screens so I thought it would be interesting to try to create a decent control scheme for the game using only buttons I'll start off with the Gamecube port thanks to this king who ported grr live to the Gamecube all I really had to do was take the code for the Wii port and change the controls so I found an old but relevant explanation of GameCube controller input I created two integers to represent an imaginary cursors X&Y positions and added the X and y values of the GameCube analog stick to these every frame this basically creates a virtual invisible cursor that works perfectly with the existing code yeah I don't I don't think that's gonna come back down so maybe just tone this down a bit I made a few other tweaks and now the game had decent controls and yeah that's literally it that's the entire game viewport the audio and everything else from the Wii version is also compatible with the Gamecube so it just works [Music] [Music] all that's left now is the PSP port oh boy things started out relatively well I decided to use a graphics library called G Lib 2d since none of the other runs worked I used the Vita port as a base and replace the functions for image loading image drawing and modified the GameCube code for input another thing I had to do was reduce the size of the sprites to compensate for the PSP smaller screen resolution and because I did that I also had to pretty much divide everything related to pixels and the game's code by - such as gravity the width and height of objects colliders and even the fall speed of platforms as well as other weird and specific parts of my code this is something I also had to do for the D s port but I didn't want to go into too much detail about it then since the D s Court had enough to worry about without it and after compiling the basics of the game worked pretty well but then I had to implement audio for some reason there are no SDK examples for loading any audio format other than this mp3 loading sample from 10 years ago so as a small brained coder I didn't really have a choice I converted all of my sound effects to mp3 integrated the mp3 example onto my game and after seven hours of troubleshooting it lags whenever sound is played you so I decided to just turn off audio by default and allow the player to enable it by pressing select on the splash screen quick tip you probably don't want to press select at this point I was really sick of these decade old examples and didn't even want to mess with font loading so I just did what I did with the DES port and converted all of my text to sprites and drew it all that way and at 7:00 a.m. the PSP port was I mean it's it's functional I guess before doing all this the PSP pretty much served as a paperweight on my desk but I'm probably gonna put it in my drawer now so I'm not reminded of this traumatic experience and with that the download section for tear fried on the Ludum dare a website was looking kind of thick I don't think people are actually going to play most of these ports and I don't really blame them but it's all about the journey porting my game to all of these platforms was a lot of fun and I enjoyed coming up with solutions to the unique problems each console brought but if you do a check of the game I'll link to the download page in the description I think the definitive version is either the DS or the PS Vita port and that's everything I hope you enjoyed this video hopefully it gave you some sort of insight on what it's like to port projects to these different platforms I definitely learned a lot about developing for these consoles through this and definitely want to keep making projects for most of them in the future as always feel free to comment any feedback or suggestions you might have for future videos I'm finally done with exams in schoolwork so the gaps between my videos should become a lot smaller I've also been trying to post more interesting content on Twitter so check that out if you're interested for example a few days ago I got a tech support scammer who claimed to be from Microsoft to play and review one of my games and the conversation was interesting I'll probably continue to post shorter videos and tutorials that don't really fit on my youtube channel to Twitter that's also thanks so much for watching and I'll see you in the next video [Music] you
Info
Channel: PolyMars
Views: 432,101
Rating: 4.957911 out of 5
Keywords: ds, nds, nintendo ds, nintendo, wii, wii u, ps vita, vita, playstation vita, hack, mod, gamedev, game development, making a game, porting, psp, sony, sony psp, gamecube, game cube, ludum dare, ld46, ldjam, gamejam, modding, making a game for ds, making a game for psp, making a game for ps vita, making a game for wii, making a game for gamecube, playstation, code, c++, homebrew, dsi, polymars, devlog, tutorial, fangames, behind the scenes
Id: mE6_A1hRcQk
Channel Id: undefined
Length: 15min 12sec (912 seconds)
Published: Wed Jun 10 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.