Next Steps
Where have we stopped and where are we heading. In this video we will dig deep into the issues that we had and mainly focus on how can we sort our next step in building the game fill it. This is going to be painful but very fun! Did you really think that building games in flash would be easy?
Video Transcript
00:00All right, so welcome back now
00:02We're in the third session with the fillet game while the second session went a little bit of Ray
00:07And we didn't really use it because we kind of got lost in an issue
00:11Where we're gonna try we're gonna start trying to solve today, which is actually a quite complex issue
00:16So last we left our application. Let me just run it one one second last we left our application. We were capable of
00:22creating some sort of barrier
00:25But then if we tried to create another one that was in the flat area
00:29You know, let me just speed things up. So I'm just gonna just for the sake of this is example
00:33I'm just gonna upgrade my frames per second to 100 so it's easier for me to do things quickly
00:39so alright, so quickly created a I created one dot I have to press press press a lot of times to be able to
00:46create a next one and
00:50So far so good
00:51But only problem was as soon as we started creating shapes that weren't that simple such as just a straight line
00:57Then it didn't really work or if we tried to create maybe like a shape that's really complicated
01:03Then completely we got lost now
01:05The main reason behind that is because until now and and let me just open this up in another
01:11New file just so it's easier to see it if we would create a square and let's say we create here a nice little rectangle
01:18And now that's supposedly our space now when we go with our arrow and we create whatever we're creating there
01:24As soon as we close our shape because we're creating a new
01:28Shape that we're tracking the trail of what we're going through and if just to remind looking at our code
01:33We had these points and in the points what we basically did every time when we change the direction
01:38Then we pushed the new point of that specific point that we were so in other words when we went up here when we
01:44Turned we put another dot when we turned we put another dot
01:47So then we created here basically created one two three four dots, right?
01:51Well five dots if we include this and thus whenever we would close that shape who would basically just create that specific shape
01:58So for example again going back into our application if I would just go right here and just close it as two points
02:05Then you'll see that I'm creating a triangle, which is really not what I want
02:08What I really want is I want to be able to have access to that full bound area
02:13Now it's not good enough for me to be able to just create enough
02:16Let me just it's not good enough for me to get to this point
02:19What I really need is I need a way to be able to get
02:22Wherever and and this is where it just gets a little bit more interesting
02:25What I really want to know is a first thing first. I've want to know where am I starting from?
02:30It's really important for me to know at what point am I at is between what point and what point so even you know
02:36Make making even more visual. This is point a
02:41And we didn't make it change the color
02:44And oh, that's way too small
02:47All right, so we have your point a and then we had point B
02:55Which is right here and
02:59We have point C right here, and we have point D right here
03:03So we that that's easy enough and as long as we have a simple shape
03:07That's easy enough to understand that whenever we're creating a new shape
03:10Whenever we're starting from where we're going the two questions that we would ask ourselves are where is my first point between?
03:17between what and what so is it between C and D is
03:20Our first point and where is our end point between what points and the reason why we need to know that is because we basically
03:25Want to be able to take all this region all this area all this area that we didn't really mark
03:31And basically take from this this point to grab everything all the way until we reach the other point
03:36And this is this is true as well if we would create a shape that was more sophisticated
03:41It's just let's say we created a shape that way which is more simple, but more complex at the same time
03:47We would really need is we would need all the information
03:49That's here basically needing this point and this point and as our shape becomes more and more complex now imagine that later on
03:58We created a few shapes and everything was working out well, and then we created here
04:04Closed rectangle and we close this up. What would probably should be straight and
04:10Then we go and then we I'll be straight
04:16Okay, this is a straight as we're gonna be yeah forget about it. It won't be straight. Oh
04:20Kinda all right all right, so now imagine okay, so we have this shape
04:24This is already from the filled area so just to mark that so this is already part of the filled area and now later on
04:30I'm coming to with my with my
04:33Active area and let's say I'm creating this shape now
04:36How would I solve a shape like this which is way more complicated this shape needs to somehow fill
04:40Needs to fill up not a line here, but it has to find all this extra information that's here, right?
04:46The way we do it is basically we would have to find the line right here
04:50And then whenever we're creating our shape and we're closing our shape we would have to find the line right here
04:55So we'd have to know that it's between this new two dots and between these two dots and basically take everything between this dot
05:02And this dot and basically combine them together into that shape to be able to close it completely
05:08Alright, so that's a theoretical thing of what we have to do when we have to revisit our code and delete a lot of stuff
05:13And figure out how do we actually do this currently the way we're working if we look at our code one more time
05:19Currently the way we're working is that we're using this background information, which is fine
05:23We're creating the frame after we're creating the frame
05:26We're only leaning on the points that we're creating and thus when we later on where we're creating this add safe to BG
05:33What we're actually doing is we're just running through those dots to create the graphic
05:37But alas this is not good enough
05:39And we're gonna have to rechange and rewire everything here to include our option of actually knowing well after
05:44Basically, we're gonna have to always know all the dots and we're gonna have to be able to update our chart of the dots
05:50To be able to reflect the changes that are happening. So if in frame one, this was ABCD
05:56when we reach to this frame where the when the blue has already been created then this would probably be D and
06:03This would be E F G H so we have to create more dots and as the as a shape expands we have to update these
06:11these corners now easier said than done because it's a very tricky and a
06:17We've learned everything really that we need to be able to do it
06:19But it's really really hard and this is where you come up with your creativity
06:22And I'm sure every person that would do this on their own would come up with a little bit of a different solution
