粉丝6获赞20

hello, fellow scratches this is a super short but hopefully helpful tutorial and how to create those nice sprite trail effects in scratch they were recently featured in my boy's video and i got a lot of requests asking how did i do it so without further ado, i'll show you i'll start by creating a forever loop so that scratch cat follows my mouse pointer just like this and now we have something to add a trail to so there are two different approaches to creating trails using clones and stamping each with its own benefits and drawbacks first we'll look at the cloneing technique drop a create clone of myself into the forever loop and whoo we're off right away you can see that we are leaving a trail of cats behind our mouse and the clones are building up fast in fact within no time at all we hit the three hundred clone limit and bam no more clones can be made so the trail stops forming here but not to worry i wasn't envisiging having a trail anywhere near this long anyhow so how do we make it shorter bring in a when i start as clone and a repeat ten loop after about ten repeats we can delete this clone the result of this is that each clone will hang around for about ten ticks of our game and then be deleted that's cool but the effect we are after is for the trail to fade away gradually rather than just stopping all at once, so from the looks category drop in a change effect by block and we want the ghost effect for now set the change amount to also be ten and then run the project and there we go we have achieved a simple sprite trail that's really smart if i just pause the video for a moment i would like to point something out and that is that the trail left behind by a ghost clone is visible through the clone in front of it and this may not bother you, but just remember this for now as i will revisit it later on okay so we have a trail that is ten clones long what if we want longer trails no problem to make it easy create a new custom block naming it fade over and we need an input of frames and why not finish with a label frames and for once we don't want to run without screen refresh that's because this script wants to perform an animation over a number of frames not run in a single quick frame so we'll drop this in as the first block when i start as clone and the following scripts they can move into the new define block nice the idea then is that we can enter how many frames we want our trail to last four let's try twenty five frames so our repeat block can now use the frames input that will be twenty five right now but what about this change ghost effect? how much do we need to change this by to make the fade last for twenty five frames the solution is to consider that a ghost of one hundred is fully ghosted so if we divide that one hundred into frames that is twenty five pieces then that will add backup to one hundred after twenty five repeats perfect run the project yeah that splendid very cool indeed now we can choose exactly how long each trail will be so we did it so why isn't this tutorial over well, because using clones to create trails is not always possible you see we only have three hundred clones to work without any one time and often we want more than just one sprite to have a trail so i'm going to teach you option two and this one uses the pen extension and stamping so let's rewind and go back to our simple forever loop without any cloning insight now click on the extensions button and choose the pen extension brill we can drop an arrays all as the first block in our script just to ensure we begin with a blank pen canvas each time the project runs and try placing a stamp block right after moving the sprite in the forever loop and here we go again we have an endless stamping mouse trail that was easy and this time no clones being created and thus no limit on how long i can go on drawing this trail where we do have a problem is getting this long trail to fade out since once we stamp a sprite it's no longer changeable it's just part of the background well, then we'll need another trick and let me show you something start with an erase all and click that and i'll move scratch cat into the open next up make a new sprite and we'll name it fader i'll make it a bitmap costume and then i can fill it pure white yeah that fully obscure scratch cat for now who is behind this fader sprite some scripts when flag clicked go to zero zero this ensures it fully covers the stage and then go to the back and hide that will bring scratchy interview once more and we want to now click into the scratchcat sprite one and duplicate the stamp block this is what i wanted to show you click stamp and i can now move scratch cat over to the right leaving behind the stamped cat as expected so what happens if we then stamp the white fader sprite right afterwards well, no prizes i'm afraid if you guessed that it would stamp the white costume right over the old stamped cat costume they are now completely erased so that wasn't so useful okay then let me set that backup again stamping the cat and come back to the fader sprite once more this time though we set the ghost effect to fifty before we stamp the background so this time when we click the scripts rather than making the whole stage white we only fade it towards white by half fifty percent white that is cool then once more we can stamp the cat where it is and we get a fresh bright cat back in the fader's bright do the stamp again and not only does the last stamped cat fade away, but the older faded cat fades out even further that's so cool this process we can just simply repeat over and over each click of the fadescript makes the previous stamped graphics fade further and further away until they finally vanish from view i think you get the idea let's put this into practice stick the set goes to effect after the other scripts and bring in a forever loop for our stamp block this will now continually fade away anything that we try to stamp in our case that would be our scratch cat stamped in its own for every loop over here if we run the project then well can you see the trail yes, it's there very subtle, but it is there to make it more prominent all we need to do is change this ghost effect to a larger value approaching one hundred let's try ninety percent wow guys look at that now this is quite a different effect to the clone based trails firstly if i pause it for a second see how each cat is not transparent you can't see the cat behind showing through that makes the trail a lot cleaner and less confused than the clone based one plus we are no longer creating tons of clones and that is a good thing too, but the other difference is that the trail does tend to have this screen burn effect like it fades away, but the last residue hangs around for a lot longer than you might otherwise expect well, that is the way of it and how this method tends to work do try changing the ghost effect to different values to alter the effect it is actually quite fun and you can try each of these methods using clones or stamping and find the one you prefer many scratch projects use either of these, but if you saw my boyd's video i was using the stamping method for my boyd's the reason was that i had way too many clones are ready to afford using more just for the trails so we come to the end of this short tutorial i hope this was helpful to some of you, and that you can just slot that into your projects and have some it works great in so many different projects in games feel free to drop me a comment under the video if you had some success with this love to hear what you've been up to if you enjoy watching my videos please smash that like button and do subscribe to the channel so is not to miss the next exciting tutorial, but that's it for now have a great week ahead and scratch on guys。

hello, fellow scratches i'm griff batch and i love all kinds of scratch projects especially platformers but until now i've not covered the traditional bread and butter of scratch the classic scratch platformer there may be no scrolling or complex list here, but we have great expectations because we are laying the solid foundations to build up to something more like this wow doesn't that look great why not drop me a message in the comments below to share what you're most excited to learn about there's a lot to see from the solid platforming to wall sliding scratch cat's feet matching the slope he is standing on did you see that moving platforms and lava wall jumping and level navigation oh wow, this is all classic scratch coding there is no complex lists or grids to worry about just scratch at its best using simple level costumes drawn within the scratch costume editor and thus it's going to be a breeze for you to take what we create together and in no time at all make your very own style of game with it oh yeah i am excited but we have to start somewhere and to ensure we get things right we'll be starting simple and our concern will be with player movement and collision detection and for those who've done this all before no you may not have done it quite like this so stay with us as with my other tutorials if you want to begin this project by remixing my starter project then there is a link under the video this project contains all the costumes needed to get scratchcat animating in later episodes if you're not interested in following this tutorial exactly then don't worry about using these, but even though we are not using these costumes today, we soon will and it might be easier if you get them in your project right from the start, i'm just going to remix the project and we're ready to go so check out these costumes loads of cats man yeah they took me some time to draw and no, i didn't do them in scratch i painstakingly drew them out in a dobilistrator, but as i said today we'll make a new costume for the player why we're doing this well because a simple platforming script works best with simple costumes so using mostly rectangles i can quickly draw a completely original square protagonist just please please ensure you have him completely scented you know by dragging the big square towards the middle of the drawing canvas until he see it snap into place oh yeah god, i love him all i can say is you see this guy and you know exactly what game you're about to play lol i'm going to christen him guy there job done you know we should rename this sprite as player so we know what it's for now for the level some people prefer to use backdrops some people prefer to use sprites for some very good reasons in these tutorials, i'm going to teach both but today it's backdrops so click with me into the stage backdrop ensure you select the rectangle tool so that we can draw a perfectly straight line and make a nice floor for our first screen next, we can make a few new rectangles to act as stairs and finally i'll add a little floating platform to test our skill that'll do nicely click back into the player sprite and we can begin to code begin as so often we do with a when green flag clicked block and then set the player's position x to minus one hundred fifty and y to fifty how'd we get the player to fall to the ground simple a forever loop and change why by say minus one negative numbers move us downwards run that and yeah we can at least see he does drop downwards but very uninspiringly the problem here is that objects do not fall to the ground at a constant speed nope the longer they fall the faster they travel right to keep track of our player's speed we'll need to make a new variable naming it speed y for this sprite only because it's this player's speed and no one else's we'll set player y to zero when the project starts and then change by minus one negative one each loot round and finally then change why by speedwi so now every time the players move downwards they move a little faster than they did the time before let's give that a test splendid that's far more convincing don't you think our next goal will be to actually stop when we hit the ground so after we've moved down with the change y by speedwi add an if and for the time being we'll check for touching color use the color picker to select the color of your level now for all of you worrying about using the color sensing blocks don't threat this is just for the time being as it makes things easier to explain right drop in a stop or block within that if and we can confirm that we are detecting the collisions when the project and now everything comes to a halt as soon as the player is touching the level it's worth noting here what touching actually means unlike in the real world when you'd say you were touching something if you were pressed up against it in scratch the objects need to be overlapping to be counted as touching and this this is overlapping check goal number three then is to get our players back out of the ground again now that we have collided well if we weren't colliding last frame we could just move back to where we were before right to do that we changed y again but this time by negative speed y that is zero minus speed y run that again as soon as we collided we quickly have been taken back to just before for the collision occurred that's actually pretty good but notice the small gap under our player that happened to be a varther lucky fall things can look a lot worse let me adjust our starting y position to fifty five and then run the project again oh, no that's no good at all we've moved way too far the strategy of just moving back out of the floor by the same amount we moved in doesn't work instead we need to carefully move our player back up only a single step at a time until we finally reach the point where we are no longer colliding then we can be sure that we are not floating off the ground after the collision and the world will be set to rights we'll do this by repeating until we're not touching color and in this repeat loop we'll change why by one just one that is we move them up one pixel at a time we don't need the stop or block any longer if we run that we can now see after a collision we are raised back up to the surface but then suddenly we plunge back down into the ground again oh, why is that okay simple after an impact with the ground we need to reset our speed y to zero since the impact should have taken all the speed out of our fall great gone is the glitch, but i'm not dead keen on the way our player is seen to glide up out of the ground luckily this can be easy to fix using our friend the custom block so make a new block naming it fix overlap and here's the important thing we click the run without screen refresh this means everything we place inside this block will no longer animate, but we'll finish running before the screen refreshes this is perfect for getting the player out of the ground without us having to see it happen move the entire repeat until block under the new define fix overlap block replacing it with the fix overlap block itself let's see that in action oh, yes smooth the player now looks to be falling and landing flush with the ground no visible penetration and no floating or unwanted bouncing around perfect okay now before we move on what if we wanted to change the speed at which the player falls to the ground well that would be changing the force of gravity right that's our minus one value over here what we'll do is create a constant variable specifically for this make a new variable naming it gravity for all sprites i make it up a case to indicate that it is for all sprites and we'll set it to negative one right at the start then simply replace the chain speed y by minus one with the new gravity variable that makes it easy to remember how to change the photogravity at any time later on feel free to play with the values here and have some fun talking of gravity how better to show it off than to add in the ability to jump and this is surprisingly easy right at the top of our forever loop add in an if checking whether the up arrow key is pressed then we set speedwide to a positive number say twelve and just run the project tap the up key and up we go our speed keeps us traveling up for a moment and then gravity naturally returns us back to the ground that is excellent of course there's nothing to stop us holding down the up key and flying away so it's more of a rocket jump at present but not to worry we will fix that later the next up it's walking let's add in the left and right movement if left arrow key pressed then ah, we need a new variable for our x speed let's name it speed x again for this right only now when the left key is pressed we can change yes don't set this time not set change speed x by negative one point five we'll do the same for the right changing speed x by positive one point five that takes care of our players acceleration, but doesn't actually move them that we will do down here just above the change y by we add a change x by speed x run the project and we are off i can now press an arrow key and the player begins moving in that direction however, i have to stress they don't slow down but they keep on moving very fast in that direction until that is i press the opposite direction eric here again home man this is hard to control what we need is some resistance that is friction with the floor to slow us down and stop us moving not a problem before we change speed y set speed x to speed x multiplied by and now a value between zero and one i'm going to pick zero point eight the closer this number is to one the more slippy the floor will feel play testing again and that's quite a transformation this is feeling much more like a platformer already and so the next step nope and intended would obviously be to stop as gliding with this right hand step or wall by detecting the collision and then backing our player sideways carefully out of it just like we did for gravity however, i'm going to stop us right there and take a short breather why because i wanted to try something a little bit different about coding is that there's always space to innovate to try doing things a little differently to see if you can improve things we yet have many problems ahead of us that we will need to address some easy to work around and others more problematic for example like the player getting caught on irregular pixels of steep inclines the very pixels that make up arbit mac levels man that is a real doozy what i'm going to propose is that rather than moving the player in large steps until they collide and then using small steps to get them back out of the collision, we instead use small steps at all times while moving the player this allows us to detect collisions as soon as they occur and also allows us to handle the movement and the collisions in far more detail going forward shall we give that a go we'll begin by replacing just the chain y and collision scripts here make a new custom block named move in steps with a numeric input of steps make it run without screen refresh as usual drop in this new block where we took the original scripts from we'll leave the steps input empty for a moment so we want to move by speedwi as before, but split up over a number of smaller steps will start by repeating for the given number of steps it'll be useful to remember the last position we were in before the move make a new available naming it last value for this bright only set last value to the current y position of the player and now we change why by, but how much well we need to divide the total distance we want to travel that is speed why by the number of steps we are going to take that is steps we can then put back the collision check we can remove the fix overlap since moving by small increments can no longer leave us deeply overlapping the ground on collision all we need to do is restore the player to their last position before the collision, so set y position to the last value we recorded now bring back the old fix overlap script did we forget anything ah, yes, we need to borrow that set speed y to zero to ensure our player is slowed down after the collision super no looking back now throw away the old fix overlap scripts finally looking back to where we made use of the move in steps block you just need to decide on how many steps to split this movement up into to ensure it's accurate enough well, we could plumb for a number say one hundred perhaps a bit overkill, but let's just give it a test and see if it's working that seems okay let me try moving around and even dare i bump my head yeah now that didn't work before so was one hundred a good number of steps to choose well, not really no because performing a hundred checks every frame is far more than is required when we might generally only be moving a few steps at a time maximum luckily we know how far we are moving it's told to us by the value of speedway only we just have to be careful because it's often negative so how about we put the maths operator abs that's absolute in here around the speed y then it will switch it to always be a positive number and the perfect number of steps to take to move by one pixel at each time run the project again and it feels identical, but we'll be performing far far less collision checks which is very good news this then is the perfect time to consider the horizontal movement and resolving of their collisions too the scripts required are a simple transformation of the scripts that move us by the y direction i'll temporarily move them over to the right, so we can compare them as we code set last value to the x position this time and then change x by speed x divided by steps and then check for the collision again with the if touching color if we did collide then set x back to the last value and finally set speed x to zero to stop us moving further in that direction great, so we can return the y moving scripts, but put them underneath the x moving scripts careful to keep them within the repeat loop finally just scroll up and we could remove the old changex by speed x here as this is now covered by our changes to the move in steps block, oh hold on one more thing to consider the moving steps block is only working out the number of steps to move based on speed y well, now, we have a speed x to consider too this does complicate matters, but to make life easy we can just add the two speeds together just make sure to add the absolute value of speed x to the abs of speed y like so, and it's testing time again are literally dash over to the first step and celebration we have contact there's no passing through this one now everything is feeling really solid which is brilliant news so where does that leave us one last thing i'd like to just address before the next episode is the jumping mechanics at present i can still fly around by holding up let's limit that to a simple jump this i like to make use of a new available named falling for this bright only this wants to increase all the time we are in the air we can just change falling by one at the top of the define move in steps script then to reset it to zero when we touch the ground set falling to zero when we set speed white to zero after a vertical collision if we run the project it's easy to see this at work falling is zero while we are sitting on the ground and then quickly starts counting up when we leave the ground this makes it easy to now limit our jumping to points of ground contact scroll to the if up arrow pressed and we can surround the set speed y with an if checking for a falling value less than say three so why three well this trick lets the player still jump two frames after they ran off the end of a platform it's often known as a coyote jump and helps to keep their game feeling less frustrating okay how does this feel hmm pretty good i'm feeling much more grounded hey, up did you see that oh no we still have one bug i was able to stick to the ceiling holding the jump key luckily i've seen that many times before and i know exactly what it is find the define move in step script and scroll down to the set falling to zero okay so this collision triggers both when we hit the ground and also when hitting the ceiling we don't want to say we've stopped falling just because we've touched the ceiling so place an if around the set falling to zero make sure to move it above the set speed y to zero and then check whether the speed y is less than zero that is we are traveling downwards when we collided if this is the case then this was a floor collision and we are okay to set falling to zero run the project again that's it we are solid and everything is feeling just right and no sticking here we are all about done for episode one what i'd just like to do before we finish is make sure you know how to customize the feel of the movement perhaps to make it feel a little less floaty would be nice come right up to the top of the script we started everything with the gravity variable you know about this one just change it to a larger negative value say negative one point five to cause the player to be pulled faster back to the ground this looks better, but of course has the extra effect that we can now not jump as high as we could before well let's add a new valuable to adjust how high we can jump or name it jump force for all sprites set it initially to twelve and i'll drop it in to the set speed y here where it was previously already set to twelve so no change there but what would happen if we changed it to twenty give it a run now i could spring really high into the air that's cool but i'm pretty sure twelve is good for me right now that leaves us with how fast the player walks and slows back down again make a new available acceleration for all sprites and set it to one point five again up at the top of the project we can replace the right arrow change speed x with acceleration right off but move left requires a negative change so bring in a subtract block, and will change it by zero subtract acceleration like so that leaves us with this zero point eight here it slows us down so make a new variable named resistance for all sprites and put it right here scroll to the top and set resistance to the same values sierra point good, good, good we can play around with these new variables to find the values that make our platformer behave and feel just the way we want and this may change your of a time as we continue to build up this exciting platforming engine there's something really satisfying about a functioning platform engine that builds really solid and it's important that we have this firm foundation to build up because we have great aspirations for where we are going next episode we will open up our level map to include multiple screens and explore the benefits of sprite versus, colour, collisions and perhaps we'll look at navigating up sloping plans, but that is it for this episode if you enjoyed watching, please smash the like button don't forget to subscribe to ensure you don't miss the next episode the moment it comes out if you want to support this channel further then don't forget you can join the channel to become a channel member there's all sorts of awesome perks including early access to videos priority comments with custom emoji and even access to the scratch projects themselves this channel wouldn't be here without your support so thank you so much and until next time have a great week ahead and scratch on guys。

玩游戏图什么?当然是快乐,偏偏有个游戏让人自闭,令人头秃,这个丧心病狂的游戏就是他绝地求生搭配。雪王,你问我这搭配有问题吗?没有问题,不就等同于香蕉加枣的功力?一个字,臭! 我说的是玩家的手,也不知道创作者是不是生活的太快乐了,专门给自己找刺激。当然,我们屡战屡败,也不要垂头丧气,毕竟人生就是泥潭里跌爬滚打吗?大不了再来一遍!深呼吸, 把控细节,我们就会很厉害。来,顶起拐杖,聆听着这令人放松的音乐,盯着雪王的眼睛,让我们慢慢移动, ok, 一秒回到原点。不过听说评论很多人想玩速通,我倒是想替雪王说一句,我在这里等着你。

skys 编程玩家们大家好,今天向大家推荐一个高难的 skys 原版的家庭欧文又被称为绝地求生,原版游戏安卓包有八百兆左右。这是一款非常奇特的高难度物理引擎游戏, 可能是史上最虐心的游戏,极其容易使人崩溃,他逼疯了很多玩家。 如果你没有一定的耐心和抗压能力,最好别碰这个东西,否则这可能是一段非常痛苦的过程,让你体会各种全新的挫折。 我们使用 sques 实现了家庭,作为很多物理功能,玩家操控的是一个被装在罐子里的猫, 唯一可以利用的就是一笔锤子,通过物理引擎的作用,一锤子作为支撑点,让自己断情进。不过其操作远没有想象中那么简单,这是一场持久战。 我是编程小童李老师,点赞回复可以获得此游戏的几块钱圆码和设计素材,您也可以邀请好友体验这款游戏, 关注我们可以获得更多国内外顶尖玩家作者的作品。一、期待孩子们带着欣赏和学习心态看, 带游戏作品,开拓国际视野。二、学习美工视觉效果的设计。三、学习游戏作品设计的流程。 四、深入剖析作品设计的思路。五、请大家支持原创作品原码和素材仅供老师和学生学习使用,下载和转载请注明出处。


i'll be right, be right, be right how long can i leave 温暖 cause i'm back and forth shading i shine in much that i've said won't。

他跟我说他是初中生。我求求你们了,各位,咱初中生能不能别去买想入门的。但是你们要理解这个入门是什么含义。 我这个入门呐,指的是你这些数学微积分啊,新型代数,拉格朗日这些基础都在的情况下,你在入门量子力学对吧?现在上面说的这个书,它叫做大众科普,它里面全部都是文字,不涉及任何数学。他讲的都是什么呢?都是这些,比如说呃,量子力学的历史, 科学家的八卦这一类的。从零开始读懂量子力学,那你最终也只能停留在零的那个那个地步。