I have followed the platformer tutorial and I am making my own game.
A) Can someone help with creating an intro screen with instructions for the game? Is there a tutorial I can follow or how would I go about creating an intro screen with the name of the game plus instructions?
B)How can I create background music to the game - a sound effect when collecting the coins (rubbish) and a sound effect when colliding with trees (they are the enemy)
The premise to my game is based on our school Eco beasts warriors who lead sustainability in our school.
Character must collect all the black bin bags of rubbish and not crash or jump on trees as this is cutting them down.
What do you think? Any ideas to make it better?
Thank you! Love MakeCode! canât wait to introduce to my students!
Iâll see about a more full response tomorrow, but for now a quick start - one thing you might be interested in is our livestreams we do each day, they can be a bit fast at times as we try to make things but theyâre recorded too (that said, theyâre an hour long a piece / not editted). This one is one of my favorites weâve done, and towards the end we make a big intro scene using an extension. This gets to be slightly more advanced than normal, but we talk about our reasoning a bit / make a cute game!
We make a post under the live section for each stream, so if you look through and find a game that looks fun you can skim through the video to see how they were made.
If you just want a simple static image, one thing you can do is put a background image block at the start of the on start, and then put in a pause block after it for a few seconds. There is one concern here - if you do this, youâll want to set a boolean flag after the pause that says âIâm done showing the splash screen!â, so that you can make sure the player pressing buttons doesnât try to do something while the splash screen is up. (This can be a very fun intro to both the debugger and conditionals - write the game without the flag at first, make it so the player jumps when the a button is pressed, and then when you press a at the start the game will crash. After you do that, press the debugger button below the simulator and do it again - it will stop on the crash and you can point the variables and show them that the variables not assigned / use conditionals to fix it).
For music, we have several different types - the easiest to use are the play sound and play melody blocks:
The sound block has some predefined sounds you can use, and the melody block has an editor to craft 8 note sounds of your own. You can put that in an overlap event between the player and the tree. One thing youâll want to consider is that depending on the event you might trigger the music multiple times in a short period - for example, if youâre making the noise for collecting the rubbish, youâll want to be sure to destroy the rubbish too so it doesnât start the noise each frame.
cool !, for question A just use diffrent backgrounds for the intro screen with timing and art , then make it so if the player presses A while in the title screen the game starts! , and for instruction in the game category for blocks there is a speech block you can use that for instuctions
now for question B use the music catogory , add more detail for the rubbish , and make the tile map flat with a background of a city , beach , and park !, so you can really feel like helping the enviroment .
if you need more help just ask !
Thanks! I watched the recording of the live stream, so fast! Lots of it is very complex for me but was good to watch and I will definitely keep watching!
Iâve tried to follow your advice, starting with a basic solution for the splash screen and have managed a basic screen and some static text at the bottom. When the player presses A the text ends and game starts.
A) How could I do this better?
B) In the dog game example you guys use scrolling text in an extension called story but I canât find that extension?
C) I falied misserably with the melody for music - I added it to the on start but it plays first with a black screen then stops and runs the next bit of code which is the bg imageâŚHow can I do Music for Splash screen and low music for game play?
I have managed to add a bing sound when the player collects trash and a mwamwamwaaa sound when the player hits (cuts down) a tree. Im not convinced with the tree sound as itâs the same as the death sound.
Next Im going to:
remove score by -1 when player hits tree
Lives reset back to 5 after each new level - Think I want the lives to stay and not reset�? Will have to see how I can carry the amount of lives left over from each level
Redraw the sprites for character - I want it to look like our schoolâs uniform as the Eco Beasts are a school club
-Redraw the tile maps to make the levels look like a beach, a city (Maybe with Thai temples as we are in Thailand!) a oark, etc like suggested by @ymxdj0
It is a fantastic game. You might also want to check more of @richard extensions for animating the player while it is moving. When you switch to javascript and click on Extensions, you can search for the following Github url:
@UnsignedArduino Thanks for the help, that was easy! However, Im not sure if itâs a good ideaâŚthe same melody can get boring/annoying very quickly!
Iâve easily made it so every time you hit a tree you lose a pointâŚI have not managed to make it so when you lose lives they stay lost at change of level.
I know/think this is because in the StartLevel function there is a set lives to 5 codeâŚhow can I do it so if you are eft with 3 lives at the end of level 1 you start level 2 with 3 lives?
Also, I have been experimenting with drawing new tiles for new levels but I changed the lava floor to water for a possible beach cleanup level and that messed things up.
I have a on sprite kind of player overlaps Lava tile at location - game over you lose. This means that all levels have to have lava floorsâŚHow can I do it so each level has a different floorâŚor is this too complicated and I should look for an easier solution?
Thanks for everyones help! I am having a lot of fun and learning a lot making this game!
Just move the âset life toâ code to the âon startâ block. If you need to move just one block, hold the âCtrlâ key (or Command key) and drag the block to its desired location.
For the second tilemap, I created a new tile and added an extra âon overlapâ event.
Thanks for everyoneâs help so farâŚthink Iâve made some progress and learnt a few new thingsâŚ
I still need to work on the background images and tile maps - drawing pixel art is an art!
Problems I have found - Please point out any others too:
Splash Screen - I have replicated the code shared by @GameGod but if player presses at at any point while the intro screen is on and music is playing it causes an error. Currently, I have a pause of 1 second that allows the melody to end and then it loads of the text instructions. How can I fix this?
Also - The bg image of the intro screen remains in the level background when the level is called.
I also tried to make the STA Ecobeasts animate by duplicating the code and changing the colour with a pause in between - seemed like there must be a more efficient way to do that but it didnât work anyway!
A) Im going to leave it for now, please take a look and let me know what else I can do to improveâŚonce the intro screen is going I want to concentrate on making more levelsâŚand better tile maps like a city, snow setting etcâŚ
B) Somebody mentioned about animating the character walking - I actually want to make my own character wearing our school uniform but so far my stick girl and boy are not good enough!
Plastic bottles score 2 points and the end level portal is now a recycle bin. Please let me know how I can make this better
I created a few extra functions, just to distinguish what you are doing in the âon startâ block. I also added an extra variable âdislayingIntroductionâ (true), so that the A button presses are ignored until you call âstartLevelâ.
Thanks, this is fantastic! Itâs great to see how to make my code more efficient!
Does anyone know if there are any videos - next I want to tackle character animations using @richard riknoll/character-animations - Any video tutorials to see how it works? In the cat platformer tutorial they animate movement in the cat by drawing different positionsâŚis that a could way to try this?