UPDATE: Please note that SGDK has been updated since this video was created. If you are using a version of SGDK newer than 1.7, then please write "u16 ind = TILE_USER_INDEX;" instead of "u16 ind = TILE_USERINDEX;" and it should compile fine :)
I'm having an issue with the resources.res - i copied your code and it appears to be working but instead of showing the image it just shows a grey screen. Also, on the code itself, the text stays white, and on the resources.h, it says 'identifier "Image" is undefined'. Is there something I haven't installed? Will changing to Windows 11 after seting up the template change anything? Please help!
@@saltedmutton7269 Does everything work correctly when you try to compile and run the sample folder with the text? If I were to guess then I would say that maybe check that you added #include to main.c
Hey all, Just an FYI: in case you're using a newer version of the SGDK, you'll want to use u16 ind = TILE_USER_INDEX; instead of u16 ind = TILE_USERINDEX;
This is really cool, I have always wanted to make a Genesis game, and now I can. Once I have SGDK figured out, I’m going to make a Shadow the Hedgehog game for Genesis. Thank you for your tutorials on all this!
Oh cool! If you don't mind, please give a little summary of how you get it set up in Mac/Linux, as that is an issue that comes up all the time and, being a Windows user, I have no idea how to help people :)
@@PigsysRetroGameDevTutorials I actually rewatched this lesson last night and studied it. Had a blast with palette and variables exprimentation. I'm really stoked to revisit this series a year later and see that you keept making a bunch of these! Now that I have the time I hope be able to go through all of them and to make something cool out of this. Creating my first working rom was a totally cannonical event hahahha. Thanks a bunch!!!
haha just finished lesson 2. and realized I've been saying variables when I meant values haha. This is my first serious progamming ever and I'm pumped!
I followed the previous video, but I'm getting stuck @3:32 here. I didn't know I needed to install the Genesis Code extension in Visual Studio Code to get some of these run commands, and now that I have them and have restarted VSC, all that I get are errors that the module '%GDK%' could not be loaded any time I try to compile.
1. This may have been an issue with CMD not being the default. I seem to have fixed this issue by using the command "Terminal: Select default Profile" and selected Command Prompt (cmd) to change the profile to use command prompt instead of Powershell. 2. My next issue was with the "Compile and Run" or the "Run" function. Even after setting the emulator .exe pathway in the extension's settings, for whatever reason, it did not like any use of spaces within folder or file names. After I changed the folder "1 backgrounds" to "1backgrounds" it calls the emulator correctly via the specified path. 3. After renaming folders, reopening Visual Studio, and opening the folder "1backgrounds", it gave me errors about "#include " and I couldn't figure out what was wrong with it. I deleted the line, I re-typed the same line "#include " and the error went away. It didn't make sense to me but that's how it happened. If I hit any more snags I'll update it here, and hopefully we'll all help each other out in the end.
Yea i have previously noticed palette PAL0 that actually has 16 colours but the other 3 palettes only display 15 colours as the first colours of those palettes is always transparent so in reality the megadrive can really only display 61 raw colours, ouch man those sado masochistic sega devs really were torturing the game devs with these hardware specs which is why i have to more than admire the work Pyron has done with his management of the megadrives limited colours, he really is a beast at that. BTW major thanks Pigsy for this tutorial it truely is a godsend for a noob like myself. 👍
I'm not 100% sure if that is a limit of the hardware or of just the way SGDK implements the palette system. I've just started learning to use a new graphic tool so I'm gong to experiment with it and see if I can get 64 colours on the screen or not.
@@PigsysRetroGameDevTutorials i read in some documents that the bakground colour can be assigned away from the palettes and it's this colour that shows through PAL0's first transparent colour so its technically a trick and good foresight on Sega just to get that extra colour on screen at least this is how i understand it.
For those who are having issues with not being able to produce the resource.h file, for me was to have java properly installed even after you run the installation for java make sure that for windows you have the environment variables under path add the java bin folder to it and make sure you close vs code or any cmd prompt then retry.
@@videogamesandfilm6821 Sorry im late, but if you go into environment variables there should be a variable called Path, if there isnt, make one, click edit->new, then add the path to the java bin folder eg. C:\Program Files (x86)\Java\jre1.X.XXX.X\bin then close everything
I see several comments in regards to the error where it can't find resources.h. Like the others it can't find the file and gives error 127 when trying to compile.
I'm not sure if this info will be useful to anyone, but I had a problem where I could use genesis code to compile but couldn't run the ROM immediately. I would get a strange error saying something like "failed to open 1 for reading". I had no idea what that meant but I guessed it was a problem with the project folder being named "1 background" so i renamed it to "1background" and what do you know?? It worked! Hope this helps anyone with a similar issue.
When you say the folder doesn't want to compile, what happens? Do you get some kind of error message? Can you compile the Pigsy template folder before you start to make changes and add in the background? Did you manage to compile when following Matt's set up video?
@@denraimei32 That's great to hear! I still make silly typo mistakes like accidentally deleting a semi-colon all the time - you'll get used to it :) Now that you have successfully set up your environment and compiled a rom with graphics, you're already past the most tricky part. The rest of the tutorials should go pretty smoothly. Congrats!
Love the Videos! Need Help tho: Having an issue right off the bat with this one, got 3 errors, which may only actually be 2 error, b ut Idk. The terminal is saying it is having issues opening the source file Genesis.h and the second error is it "cannot open sources file resource.h". I can offer more pics or info if needed. I followed the setup video, its possible I missed something but I'm fairly certain I set up everything correctly and my programming is ok, but let me know what yall think of the errors I shared. Would love to finish this tutorial so I can move on.
Hey Pigsy, I can compile, and run everything fine, however intellisense is simply not recognizing anything related to SGDK. I have no red squiggles but I get no autocomplete for any of the SGDK functions. Can you please advise as to why this might be?
Same here. I CAN spit out roms just fine with CTRL+P "task make" but VSCode (actually IntelliSense I guess judging by your comment above) is apoplectic at me right now and refuses to talk to SGDK.
I did all the steps, but where is "main c" it says there is an error, and I can't start the emulator with the castlevania tech demo as it appears at the end of the tutorial. Help! Grateful.
What kind of error is it? Can you compile the sample programme before making the changes in the lesson? Try looking through the finished code carefully and checking for any errors or typos.
hi just wondering if you can help im getting a res/resources no such file or directory error and cant compile any idea why? new to visual studios so any help would mean alot :)
@@PigsysRetroGameDevTutorials yeah i have but ive a red line under it saying includepath ive looked up and cant seem to get a right answer to how also i dont have a inc folder in my template new to visual studios sorry :P any help would mean alot
getting the following error message when compiling and running: Windows cannot find 'gens'. Make sure you typed the name correctly, and then try again.
Make sure the resources.res file is located in the correct folder (the res one). Red lines normally mean something bad, but VSC sometimes gives me a red line under the include resources line but it still works. I hope you can work it out
I would like to try to do that kind of game one day if we ever get Mega CD support in SGDK, but I don't really fancy doing it on the base console. On UA-cam do a search for Greg Gallardo as he has been programming those kind games in SGDK and has included Github links with his code
@@angvil33 How?😢 I don't understand this whole thing. Whenever he compiles the game it creates a "resource.h" file automatically but when I do it nothing happens. I did everything as he did it but nothing works the same! Please help!
This does not work. Have done the things in the last setup video. Now all of the sudden the Pigsy SGDK template is used and not SEGA_VSCode_Template-master. That was not in the first video. When creating the resource.res file there are no color coding when I type in the IMAGE row. When I try to compile CTRL+SHIFT+P No option for Genesis Code: Compile & Run is in the list. Something is not working with the new template that i downloaded from Dropbox. Using VSC 1.87.1 EDIT: Missed the config at the end in the first video. Did the config from Retro Sega Dev video in your video list. But when using the config in the first video I get some errors %GDK%\bin\make -f %GDK%\makefile.gen release && START /B C:\Users\jan\Dropbox\Development\SEGA\Blastem\blastem.exe %CD%/out/rom.bin At line:1 char:46 + %GDK%\bin\make -f %GDK%\makefile.gen release && START /B C:\Users\jan ... + ~~ The token '&&' is not a valid statement separator in this version. + CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException + FullyQualifiedErrorId : InvalidEndOfLine EDIT 2: =========================== Never mind. I was using the power shell. Needed to close the terminal and re-open it to use the cmd in stead. Everything is working now. Sorry to spam the comments
There's definitely something between the other setup video VSC template and this template that's not playing nice together. I might clean everything out and start over to see what happens. But I haven't been able to complete this lesson because ctrl+shift+p does not compile, it just brings up an exhausting list of commands. Has there been an updated version of the template that works better?
Amazing tutorial, but would you possibly know why I cant use any of those functions (such as Compile and Compile & Run)? It surely cant be because the emulator path is set to BlastEm instead of Gens, right?
Thank you for this tutorial series. Great. But I have one problem. When I click on the .png files for background and foreground in VS Code, everything looks fine. Colored. When I compile the code and let it run in an emulator, Blastem or Gens, background an foreground are always green. No colors. Any idea what happens?
That is definitely a palette problem. Make sure you are setting up the palettes correctly, and then check that you are using those some palettes for your background. It all being green/red indicates that you haven't correctly assigned the palette in that first step. I hope you can find the mistake. Good luck
I'm getting an 'undefined reference to hintCB' error on trying to compile and I have no idea what that means. Google search came up short as well. Any help on this much appreciated. That aside, great stuff so far Pigsy! Hope I'll be able to follow your tuts to the end EDIT: No wait, it's all good. I needed to roll back from gsdk 1.80 to 1.70. Now I just get some incompatible type warnings for bools :} So if anyone else has weird compiler errors, changing your gsdk version might help.
I had the very same problem and I know you fixed it by rolling back (I'm on 1.80), but I figured out that mine worked by deleting the "boot" folder. It rebuilds it and compiles it.
@@PigsysRetroGameDevTutorials I don't even remember. Also, SGDK 1.80 somehow decided to misspell "palette" as "pallete", thus causing it to not compile. So anyways, that's how I managed to solve that.
I need help compiling the ROM, it keeps on saying "C:\Users\username\Desktop\backround>%GDK%\bin\make -f %GDK%\makefile.gen release The system cannot find the path specified." Am I doing something wrong?
@@PigsysRetroGameDevTutorials I was only able to compile the other guy's template. I must've screwed up the setup somehow, I'll try again later and see.
Nicely done, but this didn't work for me - my vdp.h has 2 underscores in the TILE_USER_INDEX define...it's the Feb 22 release (1.70). My VS Code setup also sucks, won't compile and very few code completes shown, the Genesis code addon seems very flakey, you should maybe do a 'bare bones' version with command line compiles etc?
Maybe try using the compiling method used in Matt's video (the one linked in the intro video). sorry, but I've only ever used the Genesis code add on to compile, so am not familiar with other ways
@@PigsysRetroGameDevTutorials I just went my usual Vi and batch file route that I've used for lots of stuff, it's just "c:\sgdk\bin\make -f c:\sgdk\makefile.gen" for the compile and another line to launch rom.bin in blastem. 2 keystroke macro in Vi runs the batch file. I do like VScode, it's uncommon for me to have issues with it, but I've run so many odd things in it (including loads of IBM mainframe stuff recently) it's probably sulking.
Bro, I was so excited about making a game.. now I've spent three days trying to switch the background image for my own seamless one I found, I resized and cropped it to the same size (512x256) then in Gimp, Image -> Mode -> Indexed, set it to 16 colors, change back to RGB then Indexed mode again, choose the mega drive palette I have imported, uncheck the "Remove unused colors from tilemap" option... I have tried a billion different combinations, 15, 16, png, bmp.. I only get messed up graphics, nothing, one color covering the screen or an emulator error "M68K attempted to execute code at unmapped address 83838B68" 😫 I'm losing my mind over the fact that I can't find any information about how to do this.
Haha, I know how frustrating it can be, but I'm sure it's just a little thing you're missing. If you followed my tutorial and using the background I provided is working, then the issue must be your background image. Please email me the image (my address is in the About section of the channel) and I'll check to see what the problem is (although please give me until the end of next week)
I obviously didn't give up and made some progress, I tried cropping it to only 24 px high, and it worked!! I increased it to 48 px and just got a black screen, but when I changed compression from BEST to 2 that one also worked, so it's some size issue
Did i miss something here, or do you have an extra file that wasn't mentioned by the name of resources.h that we are referencing but that we haven't yet created?
Can't figure out why I keep getting corruption when implementing a scrolling foreground. Finished the rest of the tutorials just trying to add some stuff and keep getting stuck at this. ua-cam.com/video/Qyj19lYwAdk/v-deo.html
this is so frustrating Pigsy, it's not working for me at all. when I try to compile it says it can't read the files from resources.h. I have no idea what I'm doing, I can't even do the first tutorial. before I even start it says cannot open source file libres.h Gutted.
HELP!!! %GDK%\bin\make : The module '%GDK%' could not be loaded. For more information, run 'Import-Module %GDK%'. At line:1 char:1 + %GDK%\bin\make -f %GDK%\makefile.gen debug + ~~~~~~~~~~~~~~ + CategoryInfo : ObjectNotFound: (%GDK%\bin\make:String) [], CommandNotFoundException + FullyQualifiedErrorId : CouldNotAutoLoadModule What am I missing here, i feel like ive double checked ive followed everything XD
Keep getting errors!!! stuck on this one. It says it doesn't know what type name IMAGE is in the resources.res but intelisense seems to know its a thing. My &bg1 variable isn't carrying over into main.c tho, intellisense doesnt see it over there. /SGDK/projects/backgroundproject/src/res/resources.res:1:1: error: unknown type name 'IMAGE' IMAGE bg1 "background.png" BEST ALL ^~~~~
I started over with your VStudio template and got it working finally!!! Something not configured right in the JSON files of the template I was using. I added the tasks.json from the template I was using to yours for compile. Everything's working like its supposed to now. Stoked to make a cheesy genesis game!
@@danielturnell1840 Hey Daniel, can you please share your project template? I am having the same issue, and have retried multiple times, but the intellisense never works, making it impossible to work with.
@@babababa201 I can. I'm trying to convert all my tutorial newby code into a functions library right now. I think I have the earlier completed working version still I can DB or something. I found that the resources.res issue was like a VS bug. if you close and reopen VS a lot of those errors will go away. Anytime you edit the resources.res file it has to remake the .h file and you need that .h file to link the code together. For some reason VS won't recognize the changes. I think it's because of the header file #ifndef tho and not really a VS bug per say. I haven't tried to test it. But If your code is just bad and fails to compile it might not create that .h file at all. And it's a good idea to clean before recompile any time you add or edit a resource.
@@babababa201 here's my project so far drive.google.com/drive/folders/1zqLzoLqEXxUH4yV7Q68jlg-hWEUk4cP7?usp=sharing this should compile with some warnings. You can't actually link variables in the .h the way I'm doing. It creates a huge memory leak. I have to redo them all so the variables only get called once in whatever .c file I need them in. I'm going to try to fix these with structs. The original code is in the main.c file commented out though. so you can just uncomment them. Make sure you have the environment variable set up right. I just have a System Variable GDK set to C:\SGDK. I keep my project files in a folder inside C:\SGDK\projects (where the dev kit is) My graphics png files are all wrong still but kinda sorta work. I've only re-done them about 100 times so I'm trying to get the code working better before I spend more time in aesperite making stuff again.
@@danielturnell1840 Daniel thank you so much for sharing this. Earlier today I was trying to follow along without having any intellisense, and it just makes any experimentation near impossible. Your project seems to have the intellisense working perfectly, so I am going to look further into why it works in yours but not in my original project. I have my environment variable set, and can compile and run, but intellisense doesn't pick up anything. I'm going to use your project as my template moving forward and investigate further. Thanks again for taking the time. I really appreciate you helping out. Im not new to programming but am new to C, so I have no doubt its some stupid thing I messed up somewhere.
None of it is working for me although I followed the initial setup perfectly :c Here's the error I'm getting: C:\Users\{my username}\Desktop\SGDK_Projects\Templates\1 backgrounds>%GDK%\bin\make -f %GDK%\makefile.gen release C:/SGDK/bin/mkdir.exe -p src/boot C:/SGDK/bin/mkdir.exe -p out C:/SGDK/bin/mkdir.exe -p out/src/ C:/SGDK/bin/gcc.exe -DSGDK_GCC -m68000 -Wall -Wextra -Wno-shift-negative-value -Wno-main -Wno-unused-parameter -fno-builtin -fms-extensions -Iinc -Isrc -Ires -IC:/SGDK/inc -IC:/SGDK/res -BC:/SGDK/bin -O3 -fuse-linker-plugin -fno-web -fno-gcse -fno-unit-at-a-time -fomit-frame-pointer -flto -MMD -c src/main.c -o out/src/main.o src/main.c: In function 'main': src/main.c:7:15: error: 'TILE_USERINDEX' undeclared (first use in this function) u16 ind = TILE_USERINDEX; ^~~~~~~~~~~~~~ src/main.c:7:15: note: each undeclared identifier is reported only once for each function it appears in src/main.c:9:5: warning: implicit declaration of function 'VDP8drawImageEx' [-Wimplicit-function-declaration] VDP8drawImageEx(BG_B, &bg1, TILE_ATTR_FULL(PAL0, FALSE, FALSE, FALSE, ind), 0, 0, FALSE, TRUE); ^~~~~~~~~~~~~~~ make: *** [out/src/main.o] Error 1
TILE_USERINDEX is now TILE_USER_INDEX. Taken from another comment (I havent used the program, just curious of what it does) and seems like that could help you.
UPDATE: Please note that SGDK has been updated since this video was created. If you are using a version of SGDK newer than 1.7, then please write "u16 ind = TILE_USER_INDEX;" instead of "u16 ind = TILE_USERINDEX;" and it should compile fine :)
I'm having an issue with the resources.res - i copied your code and it appears to be working but instead of showing the image it just shows a grey screen. Also, on the code itself, the text stays white, and on the resources.h, it says 'identifier "Image" is undefined'. Is there something I haven't installed? Will changing to Windows 11 after seting up the template change anything? Please help!
@@saltedmutton7269 Does everything work correctly when you try to compile and run the sample folder with the text?
If I were to guess then I would say that maybe check that you added #include to main.c
where do i have to place this on?
It's really cool to see you teaching tutorials from everything that you learned on your SotN and Shinobi projects..
Thanks. Hopefully it'll get more people into the hobby. I look forward to what kind of games people come up with.
@@PigsysRetroGameDevTutorials I also really hope interesting stuff comes up from this!!!
Hey all,
Just an FYI: in case you're using a newer version of the SGDK, you'll want to use
u16 ind = TILE_USER_INDEX;
instead of
u16 ind = TILE_USERINDEX;
where do i have to place this on?
your initiative is commendable, I can't wait to receive more tutorials from someone who already carries a big name in the Mega Drive scene!
I hope other people eventually do their own tutorials too. I still have a lot I could learn myself!
Thanks!
Thanks, much appreciated.
I really hope this continues forward, you're very easy to follow along with!
That's a relief to hear. I was worried that I might not have explained things clearly enough. The next lesson should be coming next week!
This is really cool, I have always wanted to make a Genesis game, and now I can. Once I have SGDK figured out, I’m going to make a Shadow the Hedgehog game for Genesis. Thank you for your tutorials on all this!
Just started myself , not new to programming but just got to absorb information for a while before I can get right into it . Good luck !!
Just wanted to say - another successful build. And I did it from a Linux and Mac machine to boot!
Definitely a very easy video to follow. Thanks!
Oh cool! If you don't mind, please give a little summary of how you get it set up in Mac/Linux, as that is an issue that comes up all the time and, being a Windows user, I have no idea how to help people :)
Thank you for this series👍
You're welcome :)
Thanks for this! It was insanely interesting. I'm watching all your tutorials before trying it out. Can't wait!!!
Good luck!
@@PigsysRetroGameDevTutorials I actually rewatched this lesson last night and studied it. Had a blast with palette and variables exprimentation. I'm really stoked to revisit this series a year later and see that you keept making a bunch of these! Now that I have the time I hope be able to go through all of them and to make something cool out of this. Creating my first working rom was a totally cannonical event hahahha. Thanks a bunch!!!
haha just finished lesson 2. and realized I've been saying variables when I meant values haha. This is my first serious progamming ever and I'm pumped!
Glad to see you are still at it. More tutorials will be coming next year!@@yateoi
Thanks
Thanks, much appreciated!
It's just perfect ! Thank you , i start for one week and i can't stop now . Sgdk medadrive /genesis and your tutorials are addictiv.
I followed the previous video, but I'm getting stuck @3:32 here. I didn't know I needed to install the Genesis Code extension in Visual Studio Code to get some of these run commands, and now that I have them and have restarted VSC, all that I get are errors that the module '%GDK%' could not be loaded any time I try to compile.
Try manually adding the path of your SGDK in the command
1. This may have been an issue with CMD not being the default. I seem to have fixed this issue by using the command "Terminal: Select default Profile" and selected Command Prompt (cmd) to change the profile to use command prompt instead of Powershell.
2. My next issue was with the "Compile and Run" or the "Run" function. Even after setting the emulator .exe pathway in the extension's settings, for whatever reason, it did not like any use of spaces within folder or file names. After I changed the folder "1 backgrounds" to "1backgrounds" it calls the emulator correctly via the specified path.
3. After renaming folders, reopening Visual Studio, and opening the folder "1backgrounds", it gave me errors about "#include " and I couldn't figure out what was wrong with it. I deleted the line, I re-typed the same line "#include " and the error went away. It didn't make sense to me but that's how it happened.
If I hit any more snags I'll update it here, and hopefully we'll all help each other out in the end.
Yea i have previously noticed palette PAL0 that actually has 16 colours but the other 3 palettes only display 15 colours as the first colours of those palettes is always transparent so in reality the megadrive can really only display 61 raw colours, ouch man those sado masochistic sega devs really were torturing the game devs with these hardware specs which is why i have to more than admire the work Pyron has done with his management of the megadrives limited colours, he really is a beast at that.
BTW major thanks Pigsy for this tutorial it truely is a godsend for a noob like myself. 👍
I'm not 100% sure if that is a limit of the hardware or of just the way SGDK implements the palette system. I've just started learning to use a new graphic tool so I'm gong to experiment with it and see if I can get 64 colours on the screen or not.
@@PigsysRetroGameDevTutorials i read in some documents that the bakground colour can be assigned away from the palettes and it's this colour that shows through PAL0's first transparent colour so its technically a trick and good foresight on Sega just to get that extra colour on screen at least this is how i understand it.
@@krushingbro6620 That makes sense.
@@PigsysRetroGameDevTutorials It's the hardware.
@@jc_dogen Ah ok, thanks for confirming
For those who are having issues with not being able to produce the resource.h file, for me was to have java properly installed even after you run the installation for java make sure that for windows you have the environment variables under path add the java bin folder to it and make sure you close vs code or any cmd prompt then retry.
can you please explain further dude, I'm having a nightmare with this. Where exactly do I add this java bin etc, can you be more specific please?
Thanks, now everything works :D
Thank You!
@@videogamesandfilm6821 Sorry im late, but if you go into environment variables there should be a variable called Path, if there isnt, make one, click edit->new, then add the path to the java bin folder eg. C:\Program Files (x86)\Java\jre1.X.XXX.X\bin then close everything
@@MeanLemur24432 Cheers dude, I got it working in the end. now stuck trying to learn C+ and the MD VDP :D
Everything worked out! Very well explained :-)
Glad to hear it!
Thank you for the amazing tutorials
I see several comments in regards to the error where it can't find resources.h. Like the others it can't find the file and gives error 127 when trying to compile.
Have you ever solve this issue?
WTH same issue he just writes don't worry about why but doesn't explain why ? any luck with this?
I'm not sure if this info will be useful to anyone, but I had a problem where I could use genesis code to compile but couldn't run the ROM immediately. I would get a strange error saying something like "failed to open 1 for reading". I had no idea what that meant but I guessed it was a problem with the project folder being named "1 background" so i renamed it to "1background" and what do you know?? It worked! Hope this helps anyone with a similar issue.
Thanks for the tutorial ! The only thing is that I had to work directly in the SGDK folder to be able to compile or it would return errors.
I did everything you said, but the folder doesn't want to compile for some reason.
When you say the folder doesn't want to compile, what happens? Do you get some kind of error message? Can you compile the Pigsy template folder before you start to make changes and add in the background? Did you manage to compile when following Matt's set up video?
@@PigsysRetroGameDevTutorials Excellent news! I finally got the rom compiled. My file needed a ; right before the word "while". Haha.
@@denraimei32 That's great to hear! I still make silly typo mistakes like accidentally deleting a semi-colon all the time - you'll get used to it :) Now that you have successfully set up your environment and compiled a rom with graphics, you're already past the most tricky part. The rest of the tutorials should go pretty smoothly. Congrats!
Just finished the setup and first tutorial, took some time but i got everything working, when is next episode?
Great to hear it! The next episode will be out later this week.
i followed the vid until 10:37 when i hit compile it doesnt give me the rom file for some reason
i found out that resources.h does not appear when i hit compile
Can you compile the basic template file before making any changes?
yes
This is really cool! Do you have a Patreon? I would like to donate to the cause for these videos!
A few people have asked about Patreon, so I'll probably start one soon now that the tutorials are finally being uploaded. Thanks for the support :)
Love the Videos! Need Help tho:
Having an issue right off the bat with this one, got 3 errors, which may only actually be 2 error, b ut Idk. The terminal is saying it is having issues opening the source file Genesis.h and the second error is it "cannot open sources file resource.h". I can offer more pics or info if needed. I followed the setup video, its possible I missed something but I'm fairly certain I set up everything correctly and my programming is ok, but let me know what yall think of the errors I shared. Would love to finish this tutorial so I can move on.
Hey Pigsy, I can compile, and run everything fine, however intellisense is simply not recognizing anything related to SGDK. I have no red squiggles but I get no autocomplete for any of the SGDK functions. Can you please advise as to why this might be?
Same here.
I CAN spit out roms just fine with CTRL+P "task make" but VSCode (actually IntelliSense I guess judging by your comment above) is apoplectic at me right now and refuses to talk to SGDK.
I did all the steps, but where is "main c" it says there is an error, and I can't start the emulator with the castlevania tech demo as it appears at the end of the tutorial. Help! Grateful.
What kind of error is it? Can you compile the sample programme before making the changes in the lesson? Try looking through the finished code carefully and checking for any errors or typos.
Hello, know you some Training Programms to Train to Programm like this?
hi just wondering if you can help im getting a res/resources no such file or directory error and cant compile any idea why? new to visual studios so any help would mean alot :)
It's hard to say, but first just double check to make sure that you have created the resources.res file within the res folder
@@PigsysRetroGameDevTutorials yeah i have but ive a red line under it saying includepath ive looked up and cant seem to get a right answer to how also i dont have a inc folder in my template new to visual studios sorry :P any help would mean alot
He has a Sega emulator in Russian, how do I convert it to English
Sorry, I don't understand. Who has a emulator in Russian? Is the Gens emulator you downloaded in Russian?
@@PigsysRetroGameDevTutorials I downloaded it now it has a good debugger
@@Hack-rom-Classic- It does! Blastem is better overall, but the devs version of Gens will do fine for these tutorials.
getting the following error message when compiling and running: Windows cannot find 'gens'. Make sure you typed the name correctly, and then try again.
Dude thank you
not working, the first lesson worked but the genesis header file and resources.res files cant be found...red lines underneath...wah
It's giving me red lines as well but it still compiles. Strange but at least it seems to work.
Make sure the resources.res file is located in the correct folder (the res one). Red lines normally mean something bad, but VSC sometimes gives me a red line under the include resources line but it still works. I hope you can work it out
@@PigsysRetroGameDevTutorials having same issue anyone figure this out driving me crazy cant get it to work
HELP: I tried making a new background on my own and now it won’t compile. Something about the image being 32 BPP
Did i miss something? I can not find this template to download.
Will you ever do a tutorial on doing pseudo 3D sprites and backgrounds, like Outrun, super hang on etc?
I would like to try to do that kind of game one day if we ever get Mega CD support in SGDK, but I don't really fancy doing it on the base console. On UA-cam do a search for Greg Gallardo as he has been programming those kind games in SGDK and has included Github links with his code
@@PigsysRetroGameDevTutorials okay thanks!
Que medidas en Pixel por fondo? Hice un fondo de 640 Pixel 224 Pixel pero no sale entero
genesis compile doesnt work for me. I take java error. You could show us resources.h file, we could write manually.
i success with reinstall java by different way
@@angvil33
How?😢
I don't understand this whole thing. Whenever he compiles the game it creates a "resource.h" file automatically but when I do it nothing happens.
I did everything as he did it but nothing works the same! Please help!
This does not work. Have done the things in the last setup video. Now all of the sudden the Pigsy SGDK template is used and not SEGA_VSCode_Template-master. That was not in the first video. When creating the resource.res file there are no color coding when I type in the IMAGE row. When I try to compile CTRL+SHIFT+P No option for Genesis Code: Compile & Run is in the list. Something is not working with the new template that i downloaded from Dropbox. Using VSC 1.87.1
EDIT: Missed the config at the end in the first video. Did the config from Retro Sega Dev video in your video list. But when using the config in the first video I get some errors
%GDK%\bin\make -f %GDK%\makefile.gen release && START /B C:\Users\jan\Dropbox\Development\SEGA\Blastem\blastem.exe %CD%/out/rom.bin
At line:1 char:46
+ %GDK%\bin\make -f %GDK%\makefile.gen release && START /B C:\Users\jan ...
+ ~~
The token '&&' is not a valid statement separator in this version.
+ CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : InvalidEndOfLine
EDIT 2: ===========================
Never mind. I was using the power shell. Needed to close the terminal and re-open it to use the cmd in stead. Everything is working now. Sorry to spam the comments
There's definitely something between the other setup video VSC template and this template that's not playing nice together.
I might clean everything out and start over to see what happens. But I haven't been able to complete this lesson because ctrl+shift+p does not compile, it just brings up an exhausting list of commands.
Has there been an updated version of the template that works better?
How do you do palette cycling?
Awesome 👍
my vscode didnt make a resources.h file, am I missing something?
Tried to load my own images and got artifacts. How to properly export images for sgdk?
Amazing tutorial, but would you possibly know why I cant use any of those functions (such as Compile and Compile & Run)? It surely cant be because the emulator path is set to BlastEm instead of Gens, right?
Type the character ">" before typing compile and run into the bar
@@awesome_dude332 Yo, thank you.
I cant find Genesis Code: when i do shift ctrl p could someone help?
10/10
Thank you for this tutorial series. Great.
But I have one problem. When I click on the .png files for background and foreground in VS Code, everything looks fine. Colored.
When I compile the code and let it run in an emulator, Blastem or Gens, background an foreground are always green. No colors. Any idea what happens?
That is definitely a palette problem. Make sure you are setting up the palettes correctly, and then check that you are using those some palettes for your background. It all being green/red indicates that you haven't correctly assigned the palette in that first step. I hope you can find the mistake. Good luck
@@PigsysRetroGameDevTutorials Thanks. Problem is solved. Everything working fine.
Can this be done with CodeBlocks?
I'm getting an 'undefined reference to hintCB' error on trying to compile and I have no idea what that means. Google search came up short as well. Any help on this much appreciated.
That aside, great stuff so far Pigsy! Hope I'll be able to follow your tuts to the end
EDIT:
No wait, it's all good. I needed to roll back from gsdk 1.80 to 1.70. Now I just get some incompatible type warnings for bools :} So if anyone else has weird compiler errors, changing your gsdk version might help.
how do you roll back gsdk from 1.80 .1.70? sorry am new to this
wait nvm i think i figured it out
I had the very same problem and I know you fixed it by rolling back (I'm on 1.80), but I figured out that mine worked by deleting the "boot" folder. It rebuilds it and compiles it.
Attempt 1: "#include " was seen as an error, and therefore couldn't compile
What does the error message say?
@@PigsysRetroGameDevTutorials I don't even remember.
Also, SGDK 1.80 somehow decided to misspell "palette" as "pallete", thus causing it to not compile.
So anyways, that's how I managed to solve that.
@@The-E-Base Glad you managed to work things out
@@PigsysRetroGameDevTutorials aaaaaand now the Genesis-Code commands and its terminal are missing after a Windiws update.
Я сделал это!! Первый урок урок пройден! Все получилось!!! Спасибо!
I need help compiling the ROM, it keeps on saying "C:\Users\username\Desktop\backround>%GDK%\bin\make -f %GDK%\makefile.gen release The system cannot find the path specified." Am I doing something wrong?
Did you manage to get it working in the end, or are you still stuck?
Im getting error 127 whenever I try to compile.
Can you compile the regular template file ok (before you make any changes)?
@@PigsysRetroGameDevTutorials I was only able to compile the other guy's template. I must've screwed up the setup somehow, I'll try again later and see.
Nicely done, but this didn't work for me - my vdp.h has 2 underscores in the TILE_USER_INDEX define...it's the Feb 22 release (1.70). My VS Code setup also sucks, won't compile and very few code completes shown, the Genesis code addon seems very flakey, you should maybe do a 'bare bones' version with command line compiles etc?
Maybe try using the compiling method used in Matt's video (the one linked in the intro video). sorry, but I've only ever used the Genesis code add on to compile, so am not familiar with other ways
@@PigsysRetroGameDevTutorials I just went my usual Vi and batch file route that I've used for lots of stuff, it's just "c:\sgdk\bin\make -f c:\sgdk\makefile.gen" for the compile and another line to launch rom.bin in blastem. 2 keystroke macro in Vi runs the batch file. I do like VScode, it's uncommon for me to have issues with it, but I've run so many odd things in it (including loads of IBM mainframe stuff recently) it's probably sulking.
Bro, I was so excited about making a game.. now I've spent three days trying to switch the background image for my own seamless one I found, I resized and cropped it to the same size (512x256) then in Gimp, Image -> Mode -> Indexed, set it to 16 colors, change back to RGB then Indexed mode again, choose the mega drive palette I have imported, uncheck the "Remove unused colors from tilemap" option... I have tried a billion different combinations, 15, 16, png, bmp.. I only get messed up graphics, nothing, one color covering the screen or an emulator error "M68K attempted to execute code at unmapped address 83838B68" 😫 I'm losing my mind over the fact that I can't find any information about how to do this.
Haha, I know how frustrating it can be, but I'm sure it's just a little thing you're missing. If you followed my tutorial and using the background I provided is working, then the issue must be your background image. Please email me the image (my address is in the About section of the channel) and I'll check to see what the problem is (although please give me until the end of next week)
@@PigsysRetroGameDevTutorials Thanks man! I sent you the images and admit defeat
I obviously didn't give up and made some progress, I tried cropping it to only 24 px high, and it worked!! I increased it to 48 px and just got a black screen, but when I changed compression from BEST to 2 that one also worked, so it's some size issue
Nevermind, my picture obviously contained way too many unique tiles
Did i miss something here, or do you have an extra file that wasn't mentioned by the name of resources.h that we are referencing but that we haven't yet created?
Don't worry you didn't miss anything. No need to create resources.h, you only need to create the resources.res file
Can't figure out why I keep getting corruption when implementing a scrolling foreground. Finished the rest of the tutorials just trying to add some stuff and keep getting stuck at this.
ua-cam.com/video/Qyj19lYwAdk/v-deo.html
this is so frustrating Pigsy, it's not working for me at all. when I try to compile it says it can't read the files from resources.h. I have no idea what I'm doing, I can't even do the first tutorial.
before I even start it says cannot open source file libres.h
Gutted.
Okay I think I broke it
halp
HELP!!!
%GDK%\bin\make : The module '%GDK%' could not be loaded. For more information, run 'Import-Module %GDK%'.
At line:1 char:1
+ %GDK%\bin\make -f %GDK%\makefile.gen debug
+ ~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (%GDK%\bin\make:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CouldNotAutoLoadModule
What am I missing here, i feel like ive double checked ive followed everything XD
Never mind, i need to type cmd in the terminal to be able to access the environment variables
Keep getting errors!!! stuck on this one. It says it doesn't know what type name IMAGE is in the resources.res but intelisense seems to know its a thing. My &bg1 variable isn't carrying over into main.c tho, intellisense doesnt see it over there.
/SGDK/projects/backgroundproject/src/res/resources.res:1:1: error: unknown type name 'IMAGE'
IMAGE bg1 "background.png" BEST ALL
^~~~~
I started over with your VStudio template and got it working finally!!! Something not configured right in the JSON files of the template I was using. I added the tasks.json from the template I was using to yours for compile. Everything's working like its supposed to now. Stoked to make a cheesy genesis game!
@@danielturnell1840 Hey Daniel, can you please share your project template? I am having the same issue, and have retried multiple times, but the intellisense never works, making it impossible to work with.
@@babababa201 I can. I'm trying to convert all my tutorial newby code into a functions library right now. I think I have the earlier completed working version still I can DB or something. I found that the resources.res issue was like a VS bug. if you close and reopen VS a lot of those errors will go away. Anytime you edit the resources.res file it has to remake the .h file and you need that .h file to link the code together. For some reason VS won't recognize the changes. I think it's because of the header file #ifndef tho and not really a VS bug per say. I haven't tried to test it. But If your code is just bad and fails to compile it might not create that .h file at all. And it's a good idea to clean before recompile any time you add or edit a resource.
@@babababa201 here's my project so far drive.google.com/drive/folders/1zqLzoLqEXxUH4yV7Q68jlg-hWEUk4cP7?usp=sharing
this should compile with some warnings. You can't actually link variables in the .h the way I'm doing. It creates a huge memory leak. I have to redo them all so the variables only get called once in whatever .c file I need them in. I'm going to try to fix these with structs. The original code is in the main.c file commented out though. so you can just uncomment them. Make sure you have the environment variable set up right. I just have a System Variable GDK set to C:\SGDK. I keep my project files in a folder inside C:\SGDK\projects (where the dev kit is) My graphics png files are all wrong still but kinda sorta work. I've only re-done them about 100 times so I'm trying to get the code working better before I spend more time in aesperite making stuff again.
@@danielturnell1840 Daniel thank you so much for sharing this.
Earlier today I was trying to follow along without having any intellisense, and it just makes any experimentation near impossible. Your project seems to have the intellisense working perfectly, so I am going to look further into why it works in yours but not in my original project.
I have my environment variable set, and can compile and run, but intellisense doesn't pick up anything. I'm going to use your project as my template moving forward and investigate further.
Thanks again for taking the time. I really appreciate you helping out. Im not new to programming but am new to C, so I have no doubt its some stupid thing I messed up somewhere.
None of it is working for me although I followed the initial setup perfectly :c
Here's the error I'm getting:
C:\Users\{my username}\Desktop\SGDK_Projects\Templates\1 backgrounds>%GDK%\bin\make -f %GDK%\makefile.gen release
C:/SGDK/bin/mkdir.exe -p src/boot
C:/SGDK/bin/mkdir.exe -p out
C:/SGDK/bin/mkdir.exe -p out/src/
C:/SGDK/bin/gcc.exe -DSGDK_GCC -m68000 -Wall -Wextra -Wno-shift-negative-value -Wno-main -Wno-unused-parameter -fno-builtin -fms-extensions -Iinc -Isrc -Ires -IC:/SGDK/inc -IC:/SGDK/res -BC:/SGDK/bin -O3 -fuse-linker-plugin -fno-web -fno-gcse -fno-unit-at-a-time -fomit-frame-pointer -flto -MMD -c src/main.c -o out/src/main.o
src/main.c: In function 'main':
src/main.c:7:15: error: 'TILE_USERINDEX' undeclared (first use in this function)
u16 ind = TILE_USERINDEX;
^~~~~~~~~~~~~~
src/main.c:7:15: note: each undeclared identifier is reported only once for each function it appears in
src/main.c:9:5: warning: implicit declaration of function 'VDP8drawImageEx' [-Wimplicit-function-declaration]
VDP8drawImageEx(BG_B, &bg1, TILE_ATTR_FULL(PAL0, FALSE, FALSE, FALSE, ind), 0, 0, FALSE, TRUE);
^~~~~~~~~~~~~~~
make: *** [out/src/main.o] Error 1
TILE_USERINDEX is now TILE_USER_INDEX.
Taken from another comment (I havent used the program, just curious of what it does) and seems like that could help you.
if you're reading this, TILE_USERINDEX is now TILE_USER_INDEX