02Geek HTML5 and JavaScript, TypeScript, React, Flash, ActionScript online School

Clean and Update

Its time to clean up and update our assets before we wrap up our first hour of building up the FillIt game.

Video Transcript

00:00Last thing that's left for us to sort out is we want to also clear that trail to clear the trail is quite easy
00:05You're already cleared. Let me could delete all these extra traces for here. We don't need them anymore
00:11And this is a really fantastic. We have showing you how you work with all these
00:16All these traces. All right, so we had our V points here
00:20We're resetting our V points and we could hear as well go to our trail
00:24Graphics and say to it clear get rid of all your all your stuff
00:29Now if we run our application just one more time, we'll see that now we could create a shape. Oh
00:36Well, our problem right now is that it happened each time
00:40Well, let's undo that clear for a second and see if everything is still okay
00:45Yeah, so things are still good
00:48So we're gonna have to do is make sure that we only clear we only clear whenever we're done inside of our if statement
00:55So I'm gonna grab this
00:57Only whenever we're inside that we're gonna do a clear. So right here. I'm gonna add here a little clear
01:04Now let's check this out one more time
01:13beautiful
01:14fantastic
01:15Really really fantastic. So let's see
01:18What now we're having an issue in the second time around
01:21But we're gonna sort that out as well
01:24So as soon as we click we clicked on the clear as soon as we call it clear function
01:28It seems like our cleared then just stops completely working. We don't see the lines anymore
01:32Which is really really sad now
01:34the reason we don't see the lines anymore is not because there aren't any lines the reason why we can't see the lines anymore are because
01:41As soon as we click on the clear line, we are also deleting. What are we deleting?
01:46We're deleting all the information that we stored. What is this? What is that information that we stored?
01:51It's all this information that we started with our line style and our begin fill which happens right here line style
01:59So first of all, I want to copy this and go right back
02:02We're at right after we clear and I want to make sure that I'm adding that trail right back into it
02:07That way the next time around when it moves it will still have that feature now. We're gonna have one more issue
02:12Let's see that issue before we say that we're gonna have that one issue
02:16Now whenever I'm gonna run my app. Here we go
02:19We do a first line and that looks fine and our second one and it looks fine
02:23And we get even a third one and that will look fine as well. So there we go
02:28So we solve that clearing issue that color is back
02:30Now the only problem we have now is that even though we're inside of the safe zone now
02:34We're still treated as if it's not safe. And the only reason is
02:37Is because is safe is still using that old bitmap and it's easy enough to update
02:43No, what I want to do we could type each time the BMD here
02:47But what I want to do is I want to create a private function
02:52Well, actually what we could do is actually first of all, we could go into our BMD
02:56We don't have to create a new one because it was created already BMD
02:59We're gonna draw on top of it and when we draw on top of it
03:01It's gonna get rid of what was there before so actually we don't even need that first line
03:06All we need is that draw a BG and as soon as we draw the BG now whenever
03:11The background background is created. It's going to be there and it's gonna be part of the safe zone
03:17So now I'm gonna be able to walk inside of the safe zone without it being
03:21Triggered as if it's not a safe zone
03:23Now I still have a lot of issues because I have to type type a hundred times to actually continue growing my element
03:28Until I could get out into that safe zone, right and we were still miles away from actually completing the game
03:34But we definitely created a few really really fantastic steps at this stage
03:38And in this stage our game is starting to actually look like a game

Ready to Level Up Your Skills?

Join thousands of learners on 02GEEK and start your journey to becoming a coding expert today!

Enroll Now for Free!