All language subtitles for (auto)(15) 39 - YouTube

af Afrikaans
ak Akan
sq Albanian
am Amharic
ar Arabic
hy Armenian
az Azerbaijani
eu Basque
be Belarusian
bem Bemba
bn Bengali
bh Bihari
bs Bosnian
br Breton
bg Bulgarian
km Cambodian
ca Catalan
ceb Cebuano
chr Cherokee
ny Chichewa
zh-CN Chinese (Simplified) Download
zh-TW Chinese (Traditional)
co Corsican
hr Croatian
cs Czech
da Danish
nl Dutch
en English
eo Esperanto
et Estonian
ee Ewe
fo Faroese
tl Filipino
fi Finnish
fr French
fy Frisian
gaa Ga
gl Galician
ka Georgian
de German
el Greek
gn Guarani
gu Gujarati
ht Haitian Creole
ha Hausa
haw Hawaiian
iw Hebrew
hi Hindi
hmn Hmong
hu Hungarian
is Icelandic
ig Igbo
id Indonesian
ia Interlingua
ga Irish
it Italian
ja Japanese
jw Javanese
kn Kannada
kk Kazakh
rw Kinyarwanda
rn Kirundi
kg Kongo
ko Korean
kri Krio (Sierra Leone)
ku Kurdish
ckb Kurdish (Soranî)
ky Kyrgyz
lo Laothian
la Latin
lv Latvian
ln Lingala
lt Lithuanian
loz Lozi
lg Luganda
ach Luo
lb Luxembourgish
mk Macedonian
mg Malagasy
ms Malay
ml Malayalam
mt Maltese
mi Maori
mr Marathi
mfe Mauritian Creole
mo Moldavian
mn Mongolian
my Myanmar (Burmese)
sr-ME Montenegrin
ne Nepali
pcm Nigerian Pidgin
nso Northern Sotho
no Norwegian
nn Norwegian (Nynorsk)
oc Occitan
or Oriya
om Oromo
ps Pashto
fa Persian
pl Polish
pt-BR Portuguese (Brazil)
pt Portuguese (Portugal)
pa Punjabi
qu Quechua
ro Romanian
rm Romansh
nyn Runyakitara
ru Russian
sm Samoan
gd Scots Gaelic
sr Serbian
sh Serbo-Croatian
st Sesotho
tn Setswana
crs Seychellois Creole
sn Shona
sd Sindhi
si Sinhalese
sk Slovak
sl Slovenian
so Somali
es Spanish
es-419 Spanish (Latin American)
su Sundanese
sw Swahili
sv Swedish
tg Tajik
ta Tamil
tt Tatar
te Telugu
th Thai
ti Tigrinya
to Tonga
lua Tshiluba
tum Tumbuka
tr Turkish
tk Turkmen
tw Twi
ug Uighur
uk Ukrainian
ur Urdu
uz Uzbek
vi Vietnamese
cy Welsh
wo Wolof
xh Xhosa
yi Yiddish
yo Yoruba
zu Zulu
Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated: 1 00:00:02,149 --> 00:00:05,220 okay hello everyone and welcome to 2 00:00:05,220 --> 00:00:09,210 handmade hero we are on day 39 here this 3 00:00:09,210 --> 00:00:11,519 is of course a full game and engine 4 00:00:11,519 --> 00:00:15,839 coded live on Twitch in C and C++ using 5 00:00:15,839 --> 00:00:18,090 no library's no engines we are basically 6 00:00:18,090 --> 00:00:20,420 doing absolutely everything from scratch 7 00:00:20,420 --> 00:00:22,830 largely sort of as a as both an 8 00:00:22,830 --> 00:00:24,600 educational process and and just for fun 9 00:00:24,600 --> 00:00:27,810 I think it's really good for you know on 10 00:00:27,810 --> 00:00:29,789 both on both ends really for the type 11 00:00:29,789 --> 00:00:31,019 type of person who actually enjoys 12 00:00:31,019 --> 00:00:32,399 programming then being able to program 13 00:00:32,399 --> 00:00:34,200 everything yourself is kind of a fun 14 00:00:34,200 --> 00:00:35,579 thing to do especially nowadays when you 15 00:00:35,579 --> 00:00:37,350 don't get to do that all that often and 16 00:00:37,350 --> 00:00:38,700 I've certainly been having fun doing it 17 00:00:38,700 --> 00:00:39,809 I think a lot of the people out there 18 00:00:39,809 --> 00:00:41,850 have been too and also it's a great 19 00:00:41,850 --> 00:00:43,230 thing for educational purposes because a 20 00:00:43,230 --> 00:00:45,329 lot of people just don't have a chance a 21 00:00:45,329 --> 00:00:47,789 lot of times depending on sort of what 22 00:00:47,789 --> 00:00:49,140 their program range was to go through 23 00:00:49,140 --> 00:00:50,190 and do all kinds of interesting 24 00:00:50,190 --> 00:00:51,989 low-level stuff and build an entire game 25 00:00:51,989 --> 00:00:53,370 engine from the ground up and that sort 26 00:00:53,370 --> 00:00:54,750 of thing and so they're just a lot of 27 00:00:54,750 --> 00:00:56,460 cool stuff you could learn in there I 28 00:00:56,460 --> 00:00:59,489 think anyway I always feel like most all 29 00:00:59,489 --> 00:01:00,780 the most interesting stuff that I've 30 00:01:00,780 --> 00:01:03,030 ever learned in programming came from 31 00:01:03,030 --> 00:01:05,129 having to tackle you know hard low-level 32 00:01:05,129 --> 00:01:07,650 problems really honestly even the good 33 00:01:07,650 --> 00:01:09,840 high-level programming stuff that I know 34 00:01:09,840 --> 00:01:13,619 is largely from having to do sort of you 35 00:01:13,619 --> 00:01:14,820 know having to think about hard 36 00:01:14,820 --> 00:01:16,110 constraints and that sort of stuff so 37 00:01:16,110 --> 00:01:19,200 anyway right now we are at the point 38 00:01:19,200 --> 00:01:21,960 where we sort of gotten we're sort of 39 00:01:21,960 --> 00:01:23,640 wrapping up the stuff that we can 40 00:01:23,640 --> 00:01:25,950 reasonably do before we learn some math 41 00:01:25,950 --> 00:01:28,170 basically is what what I guess how I 42 00:01:28,170 --> 00:01:30,630 would say it we've wrapped up sort of 43 00:01:30,630 --> 00:01:33,390 the basic stuff of putting sprites on 44 00:01:33,390 --> 00:01:34,680 the screen you know loading bitmaps 45 00:01:34,680 --> 00:01:36,960 doing some basic alpha blending 46 00:01:36,960 --> 00:01:39,630 techniques building a tile map and 47 00:01:39,630 --> 00:01:41,040 moving around through the tile map that 48 00:01:41,040 --> 00:01:41,729 sort of stuff 49 00:01:41,729 --> 00:01:43,500 but in order to start moving forward 50 00:01:43,500 --> 00:01:46,229 since in you know on the on the engine 51 00:01:46,229 --> 00:01:48,240 further what we kind of need to do is 52 00:01:48,240 --> 00:01:49,470 we're probably going to need to start 53 00:01:49,470 --> 00:01:51,600 doing some math very soon so I think 54 00:01:51,600 --> 00:01:53,189 today what we're probably going to do is 55 00:01:53,189 --> 00:01:54,180 we're going to go through and we're just 56 00:01:54,180 --> 00:01:56,189 going to kind of like do a pass over the 57 00:01:56,189 --> 00:01:57,659 stuff that we've got so far and just 58 00:01:57,659 --> 00:02:00,090 kind of like cleaning things up and sort 59 00:02:00,090 --> 00:02:02,250 of get things into place where we're a 60 00:02:02,250 --> 00:02:03,840 little be happy with them so that we can 61 00:02:03,840 --> 00:02:07,049 start clearing the way for doing really 62 00:02:07,049 --> 00:02:08,789 maybe starting to have a serious 63 00:02:08,789 --> 00:02:10,800 discussion about gain math and what sort 64 00:02:10,800 --> 00:02:12,690 of math we need to know and what all the 65 00:02:12,690 --> 00:02:13,290 different types of 66 00:02:13,290 --> 00:02:15,780 that tend to come up in games and so 67 00:02:15,780 --> 00:02:17,040 then start to go through some of the one 68 00:02:17,040 --> 00:02:18,959 the most basic ones that we will need in 69 00:02:18,959 --> 00:02:20,430 order to move forwards which are basic 70 00:02:20,430 --> 00:02:22,349 2d vector math and stuff like that which 71 00:02:22,349 --> 00:02:23,879 we're gonna need for just about 72 00:02:23,879 --> 00:02:26,189 everything that we're going to do so if 73 00:02:26,189 --> 00:02:28,109 you went and made here at organ preorder 74 00:02:28,109 --> 00:02:29,849 the game using the little P order button 75 00:02:29,849 --> 00:02:32,099 you should have gotten an email with a 76 00:02:32,099 --> 00:02:33,420 link that allows you to download the 77 00:02:33,420 --> 00:02:35,099 source code and the test assets that we 78 00:02:35,099 --> 00:02:37,170 use as well there's two zips up there 79 00:02:37,170 --> 00:02:38,549 make sure you grab both of those and 80 00:02:38,549 --> 00:02:40,680 inside the source code zip there's a 81 00:02:40,680 --> 00:02:42,299 bunch of different zips resource codes 82 00:02:42,299 --> 00:02:44,189 from every different day we're on day 39 83 00:02:44,189 --> 00:02:45,629 right now so if you want to follow along 84 00:02:45,629 --> 00:02:48,659 at home unzip day 38 source code day 38 85 00:02:48,659 --> 00:02:49,889 source codes what we are starting with 86 00:02:49,889 --> 00:02:52,409 now and if you unzip that you will be at 87 00:02:52,409 --> 00:02:54,689 the exact location that I am starting 88 00:02:54,689 --> 00:02:56,639 with today so you could follow along 89 00:02:56,639 --> 00:02:59,099 exactly the way that we're with with 90 00:02:59,099 --> 00:03:01,650 exactly what we're doing so if you guys 91 00:03:01,650 --> 00:03:03,450 remember we've gotten to the point at 92 00:03:03,450 --> 00:03:04,560 the end of last stream where we were 93 00:03:04,560 --> 00:03:06,750 able to blip basically things on top of 94 00:03:06,750 --> 00:03:08,669 other things which allows us essentially 95 00:03:08,669 --> 00:03:10,319 to compose whatever we want in terms of 96 00:03:10,319 --> 00:03:11,609 graphics now we can you know layer 97 00:03:11,609 --> 00:03:12,840 sprites on top of each other all day 98 00:03:12,840 --> 00:03:15,180 long but we had only just finished that 99 00:03:15,180 --> 00:03:16,919 so we didn't just we didn't really do 100 00:03:16,919 --> 00:03:17,879 anything with it 101 00:03:17,879 --> 00:03:19,409 so I was thinking maybe today what we 102 00:03:19,409 --> 00:03:21,750 could do is just load in our our little 103 00:03:21,750 --> 00:03:24,930 hero sprite and he's in three pieces as 104 00:03:24,930 --> 00:03:26,430 I think I showed when I was going 105 00:03:26,430 --> 00:03:27,540 through the different sprites that were 106 00:03:27,540 --> 00:03:29,069 in there he's in three different pieces 107 00:03:29,069 --> 00:03:30,629 so maybe we'll go in and load his three 108 00:03:30,629 --> 00:03:32,129 different pieces and we also have four 109 00:03:32,129 --> 00:03:33,510 facing directions for him so maybe we'll 110 00:03:33,510 --> 00:03:35,909 load in all of those and we'll sort of 111 00:03:35,909 --> 00:03:38,280 make a thing where he can as we move he 112 00:03:38,280 --> 00:03:40,260 faces the direction you know that we're 113 00:03:40,260 --> 00:03:41,129 moving or something like that just 114 00:03:41,129 --> 00:03:43,049 something basic to sort of clean up the 115 00:03:43,049 --> 00:03:44,579 bitmap loading and the bitmap display 116 00:03:44,579 --> 00:03:45,959 code into something that we're 117 00:03:45,959 --> 00:03:47,669 relatively comfortable with for the 118 00:03:47,669 --> 00:03:49,859 moment before we kind of move on to 119 00:03:49,859 --> 00:03:51,510 trying to do a little bit more serious 120 00:03:51,510 --> 00:03:53,400 stuff again and where we'd have to start 121 00:03:53,400 --> 00:03:55,500 talking about math for reals for reals 122 00:03:55,500 --> 00:03:58,709 with a Z so okay assuming that we're in 123 00:03:58,709 --> 00:03:59,669 that situation 124 00:03:59,669 --> 00:04:02,040 right now we are loading all of our 125 00:04:02,040 --> 00:04:03,930 bitmaps we haven't talked really very 126 00:04:03,930 --> 00:04:06,569 much about asset management in terms of 127 00:04:06,569 --> 00:04:08,069 how we're managing loading stuff in the 128 00:04:08,069 --> 00:04:09,780 code and that's actually deliberate it's 129 00:04:09,780 --> 00:04:11,400 not something that I think is really 130 00:04:11,400 --> 00:04:12,870 worth discussing at the moment I think 131 00:04:12,870 --> 00:04:14,759 that's going to be something that comes 132 00:04:14,759 --> 00:04:16,680 into play once we have a bit of the 133 00:04:16,680 --> 00:04:19,229 renderer sort of the real renderer once 134 00:04:19,229 --> 00:04:20,639 we kind of have more of a real renderer 135 00:04:20,639 --> 00:04:22,139 written is really the more the 136 00:04:22,139 --> 00:04:23,219 appropriate time start thinking about 137 00:04:23,219 --> 00:04:25,680 that so right now we just have the sort 138 00:04:25,680 --> 00:04:27,120 of the most basic thing you 139 00:04:27,120 --> 00:04:28,830 doing a game which is loading all the 140 00:04:28,830 --> 00:04:30,960 assets at startup not a particularly 141 00:04:30,960 --> 00:04:32,639 useful thing to do 142 00:04:32,639 --> 00:04:34,080 if you're active talking about a 143 00:04:34,080 --> 00:04:35,460 shipping game because like I said in 144 00:04:35,460 --> 00:04:36,360 this game we're going to be streaming 145 00:04:36,360 --> 00:04:37,830 our assets in so loading everything at 146 00:04:37,830 --> 00:04:39,690 startup isn't really an option for us 147 00:04:39,690 --> 00:04:41,100 but well we're just developing things 148 00:04:41,100 --> 00:04:49,650 that's certainly fine so I'm gonna have 149 00:04:49,650 --> 00:04:51,419 to load these different hero things for 150 00:04:51,419 --> 00:04:52,830 four different directions so I'm just 151 00:04:52,830 --> 00:04:53,970 gonna go ahead and make life a little 152 00:04:53,970 --> 00:04:56,490 easier on myself for now and just say 153 00:04:56,490 --> 00:05:00,090 that we have sort of a hero bitmaps 154 00:05:00,090 --> 00:05:02,370 structure and that we'll have basically 155 00:05:02,370 --> 00:05:06,630 the different pieces the head the cape 156 00:05:06,630 --> 00:05:09,810 and the torso each for you know the 157 00:05:09,810 --> 00:05:11,250 different facing directions of the hero 158 00:05:11,250 --> 00:05:12,810 so that I can basis there we have hero 159 00:05:12,810 --> 00:05:15,900 bitmaps and the hero bitmaps that we 160 00:05:15,900 --> 00:05:18,510 have are for the four facing direction 161 00:05:18,510 --> 00:05:22,560 so we'll just say hero bitmaps and I 162 00:05:22,560 --> 00:05:25,440 guess I'll do I don't know we could do 163 00:05:25,440 --> 00:05:28,050 something like just a brackets for I 164 00:05:28,050 --> 00:05:30,120 guess because we will essentially have 165 00:05:30,120 --> 00:05:31,470 to map into that somehow we'll think 166 00:05:31,470 --> 00:05:33,690 about that in a second but anyway if I 167 00:05:33,690 --> 00:05:34,979 want to load those in I've already got 168 00:05:34,979 --> 00:05:38,220 code that loads each of the each of the 169 00:05:38,220 --> 00:05:41,130 test pieces in here into the hero hey I 170 00:05:41,130 --> 00:05:42,180 don't know what what happened to our 171 00:05:42,180 --> 00:05:44,039 hero torso code I must have actually hit 172 00:05:44,039 --> 00:05:46,530 ctrl K that's a mistake so basically we 173 00:05:46,530 --> 00:05:47,880 already have code that does that which 174 00:05:47,880 --> 00:05:50,070 is this code right here but I need to 175 00:05:50,070 --> 00:05:52,139 load one of those for each of the facing 176 00:05:52,139 --> 00:05:54,389 directions like test your front you know 177 00:05:54,389 --> 00:05:57,720 the sort of the front back side and all 178 00:05:57,720 --> 00:05:59,400 that sort of stuff so I'm gonna go ahead 179 00:05:59,400 --> 00:06:00,960 and do the stupidest possible thing here 180 00:06:00,960 --> 00:06:03,270 just do hero bitmaps and I'm going to 181 00:06:03,270 --> 00:06:06,990 substitute in basically one of these 182 00:06:06,990 --> 00:06:09,000 like that for each of these ones that we 183 00:06:09,000 --> 00:06:11,910 load like so and then I'm just going to 184 00:06:11,910 --> 00:06:13,110 go ahead and call that four times 185 00:06:13,110 --> 00:06:16,139 nothing particularly exciting here and 186 00:06:16,139 --> 00:06:17,580 like I said well think I'll well think 187 00:06:17,580 --> 00:06:18,960 harder about how we want to do this 188 00:06:18,960 --> 00:06:21,960 stuff once we actually think about asset 189 00:06:21,960 --> 00:06:23,250 loading and how we want to identify a 190 00:06:23,250 --> 00:06:24,840 bit mass because in general you know you 191 00:06:24,840 --> 00:06:26,310 don't want to have to have huge tables 192 00:06:26,310 --> 00:06:28,860 of strings in your code at least I don't 193 00:06:28,860 --> 00:06:31,169 and so that's not something that I would 194 00:06:31,169 --> 00:06:32,910 encourage you to do when you're actually 195 00:06:32,910 --> 00:06:35,310 doing the real code but for now it's 196 00:06:35,310 --> 00:06:36,419 exactly the right thing to do because 197 00:06:36,419 --> 00:06:37,590 you do not want to be thinking about 198 00:06:37,590 --> 00:06:39,510 that while you're trying to work on 199 00:06:39,510 --> 00:06:40,650 other pieces of the code 200 00:06:40,650 --> 00:06:43,020 so here is the the set of files that we 201 00:06:43,020 --> 00:06:45,630 have we have front back left and right 202 00:06:45,630 --> 00:06:47,520 I'm not sure what the best way to map 203 00:06:47,520 --> 00:06:52,919 those to 0 1 2 & 3 are at the moment so 204 00:06:52,919 --> 00:06:55,740 I guess maybe what I will say is let's 205 00:06:55,740 --> 00:06:59,310 go ahead and just do we'll just do maybe 206 00:06:59,310 --> 00:07:02,850 start with with moving right in in that 207 00:07:02,850 --> 00:07:05,580 0 slot and then you know I'll go I'll 208 00:07:05,580 --> 00:07:06,990 basically do it almost like it was a 209 00:07:06,990 --> 00:07:09,120 circle so then there's the there's up 210 00:07:09,120 --> 00:07:14,699 it's after that like so and then this 211 00:07:14,699 --> 00:07:20,070 would be left right and I guess it's not 212 00:07:20,070 --> 00:07:22,050 it's not up it's actually that's that's 213 00:07:22,050 --> 00:07:25,680 looking at his back right like so and 214 00:07:25,680 --> 00:07:28,410 then and then front is down here you've 215 00:07:28,410 --> 00:07:30,270 already got and so that'll load all 216 00:07:30,270 --> 00:07:31,889 those bitmaps into memory for us and 217 00:07:31,889 --> 00:07:34,199 it'll just go ahead and be using those 218 00:07:34,199 --> 00:07:39,210 for the entire run of the game at the 219 00:07:39,210 --> 00:07:41,910 moment if I go ahead and compile then we 220 00:07:41,910 --> 00:07:43,350 will not be able to find that when we do 221 00:07:43,350 --> 00:07:45,030 the hero head but we should be able to 222 00:07:45,030 --> 00:07:47,760 do here a bitmap 0 dot had and now we 223 00:07:47,760 --> 00:07:49,320 should basically be back to exactly 224 00:07:49,320 --> 00:07:51,720 where we were before only now he's you 225 00:07:51,720 --> 00:07:53,090 know the other facing direction right 226 00:07:53,090 --> 00:07:56,490 but I'm gonna need actually to draw well 227 00:07:56,490 --> 00:07:57,990 you know what I don't know why I keep 228 00:07:57,990 --> 00:07:59,460 forgetting the fact that I can always 229 00:07:59,460 --> 00:08:01,500 leave the code running we don't actually 230 00:08:01,500 --> 00:08:04,320 have to don't have to I guess it said 231 00:08:04,320 --> 00:08:05,789 just from a lot of stuff that I worked 232 00:08:05,789 --> 00:08:07,229 on day to day doesn't have this feature 233 00:08:07,229 --> 00:08:09,090 necessarily so you kind of get in the 234 00:08:09,090 --> 00:08:09,419 habit 235 00:08:09,419 --> 00:08:12,630 unfortunately oops that's not right so 236 00:08:12,630 --> 00:08:15,240 if I have the head I have the torso and 237 00:08:15,240 --> 00:08:17,190 I have the cape I guess the cape comes 238 00:08:17,190 --> 00:08:19,020 over the torso basically want to do is I 239 00:08:19,020 --> 00:08:20,340 want to draw these in reverse order 240 00:08:20,340 --> 00:08:21,479 because remember this is a lot like 241 00:08:21,479 --> 00:08:23,010 Photoshop things get layered on top of 242 00:08:23,010 --> 00:08:25,289 each other so what I actually want is I 243 00:08:25,289 --> 00:08:26,910 want the torso first if that's the thing 244 00:08:26,910 --> 00:08:29,729 that's the lowest down in terms of what 245 00:08:29,729 --> 00:08:31,229 gets shown then the Cape gets laid on 246 00:08:31,229 --> 00:08:32,729 top of that then the head on top of that 247 00:08:32,729 --> 00:08:34,979 and in theory that should reconstruct my 248 00:08:34,979 --> 00:08:38,610 hero if if I'm not very much mistaken 249 00:08:38,610 --> 00:08:40,229 and yes there he is 250 00:08:40,229 --> 00:08:42,060 there's the little hero fellow and he is 251 00:08:42,060 --> 00:08:44,400 facing in the in the direction to the 252 00:08:44,400 --> 00:08:45,810 right which is what I expected 253 00:08:45,810 --> 00:08:49,709 now I probably could also say here you 254 00:08:49,709 --> 00:08:52,350 know if I had a facing direction for the 255 00:08:52,350 --> 00:08:53,940 little fellow right 256 00:08:53,940 --> 00:08:56,280 have facing direction equals zero let's 257 00:08:56,280 --> 00:08:58,440 say and I went in here and said you know 258 00:08:58,440 --> 00:09:00,180 facing Direction like this or something 259 00:09:00,180 --> 00:09:02,880 then I would be able to also sort of 260 00:09:02,880 --> 00:09:06,870 flip him around I suppose as I as I go 261 00:09:06,870 --> 00:09:09,180 right if I flip it to one there he goes 262 00:09:09,180 --> 00:09:13,560 - nice pacing that way three nice facing 263 00:09:13,560 --> 00:09:16,050 towards us and so if I wanted him to 264 00:09:16,050 --> 00:09:17,670 basically face the direction that he's 265 00:09:17,670 --> 00:09:20,820 actually moving in 3000 okay don't think 266 00:09:20,820 --> 00:09:22,940 3000 is very good things like been there 267 00:09:22,940 --> 00:09:25,440 if I wanted to face for actually thing I 268 00:09:25,440 --> 00:09:27,420 just need some way of specifying what it 269 00:09:27,420 --> 00:09:29,420 was whatever that last direction was 270 00:09:29,420 --> 00:09:31,410 that's the direction in which he moved 271 00:09:31,410 --> 00:09:33,450 right so if I go in here and I just say 272 00:09:33,450 --> 00:09:35,700 all right that facing direction you know 273 00:09:35,700 --> 00:09:37,920 hero facing Direction is now a parameter 274 00:09:37,920 --> 00:09:39,480 and then out here I can go ahead and 275 00:09:39,480 --> 00:09:43,850 grab out the hero bitmaps thing that 276 00:09:43,850 --> 00:09:46,830 that is appropriate based on that facing 277 00:09:46,830 --> 00:09:48,440 Direction right I can go ahead and do 278 00:09:48,440 --> 00:09:55,250 you know game state hero bitmaps for 279 00:09:55,250 --> 00:09:59,250 game state hero facing direction that 280 00:09:59,250 --> 00:10:01,410 would give me back that bitmap that I 281 00:10:01,410 --> 00:10:03,390 actually want the whichever one you know 282 00:10:03,390 --> 00:10:04,980 it's actually supposed to be and so then 283 00:10:04,980 --> 00:10:06,390 if I go in here and just go ahead and 284 00:10:06,390 --> 00:10:08,460 change these all to sort of operate off 285 00:10:08,460 --> 00:10:10,770 of that then I've sort of made it so 286 00:10:10,770 --> 00:10:13,410 that we can easily store in the game 287 00:10:13,410 --> 00:10:15,360 strip state structure what it actually 288 00:10:15,360 --> 00:10:19,050 is we want the hero facing direction to 289 00:10:19,050 --> 00:10:23,730 be so if I go ahead and go over to the 290 00:10:23,730 --> 00:10:25,200 code where we actually move the guy 291 00:10:25,200 --> 00:10:28,230 around right with move up move down move 292 00:10:28,230 --> 00:10:29,970 left and move right it'd be pretty 293 00:10:29,970 --> 00:10:32,280 trivial for me to sort of go and just 294 00:10:32,280 --> 00:10:34,290 set it to whichever key down you press 295 00:10:34,290 --> 00:10:35,970 laughs which is a totally reasonable 296 00:10:35,970 --> 00:10:37,920 thing to do for now since we don't 297 00:10:37,920 --> 00:10:39,510 really again we haven't done that vector 298 00:10:39,510 --> 00:10:41,730 mask so we can't really do much we 299 00:10:41,730 --> 00:10:43,230 haven't really written any real hero 300 00:10:43,230 --> 00:10:45,930 movement code yet and so it's it's you 301 00:10:45,930 --> 00:10:47,130 know it's not really gonna be something 302 00:10:47,130 --> 00:10:49,350 that we can do anything fancy with yet 303 00:10:49,350 --> 00:10:51,060 but for now we can certainly set the 304 00:10:51,060 --> 00:10:53,490 hero facing direction to whichever thing 305 00:10:53,490 --> 00:10:56,460 you actually push down last so if the 306 00:10:56,460 --> 00:11:00,180 hero you know was was was moving upward 307 00:11:00,180 --> 00:11:01,710 we can set it to that moving up 308 00:11:01,710 --> 00:11:02,940 direction if the hero was moving 309 00:11:02,940 --> 00:11:04,370 downward we can side to that moving down 310 00:11:04,370 --> 00:11:07,080 you know the left 311 00:11:07,080 --> 00:11:09,540 and the right like so and then if I go 312 00:11:09,540 --> 00:11:11,310 ahead and compile that or what's these 313 00:11:11,310 --> 00:11:12,840 are supposed to be address of the bitmap 314 00:11:12,840 --> 00:11:15,450 there now I should have a way to 315 00:11:15,450 --> 00:11:18,360 basically have my my dude change 316 00:11:18,360 --> 00:11:19,260 direction 317 00:11:19,260 --> 00:11:23,190 oops and I've got I miss I miss typed at 318 00:11:23,190 --> 00:11:25,740 once there so I've ever did my my two 319 00:11:25,740 --> 00:11:27,090 directions what did I do 320 00:11:27,090 --> 00:11:30,720 let's see here so if we're moving left 321 00:11:30,720 --> 00:11:32,850 yes left is supposed to be to right is 322 00:11:32,850 --> 00:11:34,350 supposed to be zero that's that's what I 323 00:11:34,350 --> 00:11:35,730 said when I made it but I didn't 324 00:11:35,730 --> 00:11:37,740 actually do it and so now the hero 325 00:11:37,740 --> 00:11:39,570 actually does change for whatever 326 00:11:39,570 --> 00:11:42,030 direction he moves in and I'd like to go 327 00:11:42,030 --> 00:11:43,860 ahead and Center him on his rectangle as 328 00:11:43,860 --> 00:11:45,660 well you'll notice that basically the 329 00:11:45,660 --> 00:11:49,310 bitmap right now we we do have something 330 00:11:49,310 --> 00:11:52,440 in fact this is probably something worth 331 00:11:52,440 --> 00:11:53,940 talking about because we haven't really 332 00:11:53,940 --> 00:11:55,980 addressed it and in the art assets yet 333 00:11:55,980 --> 00:11:57,930 we're not actually at the level of 334 00:11:57,930 --> 00:11:59,370 loading art assets where this sort of 335 00:11:59,370 --> 00:12:00,660 stuff comes into play but we'll need to 336 00:12:00,660 --> 00:12:03,210 do something as sort of a temporary a 337 00:12:03,210 --> 00:12:06,240 temporary fix to it if you consider the 338 00:12:06,240 --> 00:12:08,520 fact if you consider what these bitmaps 339 00:12:08,520 --> 00:12:11,850 actually are right if we actually go and 340 00:12:11,850 --> 00:12:14,760 you can see we're drawing the player's 341 00:12:14,760 --> 00:12:16,980 bitmaps right all those three bitmaps 342 00:12:16,980 --> 00:12:19,500 we're drawing them with this upper left 343 00:12:19,500 --> 00:12:21,510 corner here this this is the point the 344 00:12:21,510 --> 00:12:24,330 position that we're passing when we say 345 00:12:24,330 --> 00:12:26,580 we want to draw those bitmaps there's a 346 00:12:26,580 --> 00:12:28,560 bunch of information kind of there's a 347 00:12:28,560 --> 00:12:30,120 bunch of sort of assumed information 348 00:12:30,120 --> 00:12:31,980 that's all getting baked in there and 349 00:12:31,980 --> 00:12:33,690 it's why for example the hero is kind of 350 00:12:33,690 --> 00:12:35,850 nowhere near where our rectangle thinks 351 00:12:35,850 --> 00:12:36,990 he should be this was our little test 352 00:12:36,990 --> 00:12:38,610 rectangle that said where we thought the 353 00:12:38,610 --> 00:12:40,800 hero should be and so it's not at all 354 00:12:40,800 --> 00:12:43,770 correct right we'd expect the hero to 355 00:12:43,770 --> 00:12:45,510 kind of be standing up you know with his 356 00:12:45,510 --> 00:12:47,010 feet roughly where at the bottom of the 357 00:12:47,010 --> 00:12:49,530 rectangle where was for example but 358 00:12:49,530 --> 00:12:51,480 that's not at all what's happening and 359 00:12:51,480 --> 00:12:54,920 so considering that situation right 360 00:12:54,920 --> 00:12:56,700 what's going on there 361 00:12:56,700 --> 00:12:59,460 well if you look at what we've got in 362 00:12:59,460 --> 00:13:02,670 terms of assets if you go into the test 363 00:13:02,670 --> 00:13:04,050 directory and look at what these assets 364 00:13:04,050 --> 00:13:06,420 are let's say we open one of them up 365 00:13:06,420 --> 00:13:08,730 well watch they'll open up all three for 366 00:13:08,730 --> 00:13:10,650 a given facing Direction we'll open up 367 00:13:10,650 --> 00:13:13,080 the front facing ones for now inside 368 00:13:13,080 --> 00:13:16,170 GIMP and what you can actually see if 369 00:13:16,170 --> 00:13:17,730 you take a look at these guys in fact 370 00:13:17,730 --> 00:13:19,350 you know what I can do to that was 371 00:13:19,350 --> 00:13:20,290 probably the wrong way to 372 00:13:20,290 --> 00:13:23,290 a course that opens three different 373 00:13:23,290 --> 00:13:25,240 copies of GIMP there for me thank you so 374 00:13:25,240 --> 00:13:26,350 much GIMP 375 00:13:26,350 --> 00:13:28,120 what I'll actually do is I'll go ahead 376 00:13:28,120 --> 00:13:30,279 and we have the front torso loaded I'm 377 00:13:30,279 --> 00:13:32,620 gonna load the head and the cape and so 378 00:13:32,620 --> 00:13:34,029 now they're all in there as a layer 379 00:13:34,029 --> 00:13:35,620 right they're all in as theirs as layers 380 00:13:35,620 --> 00:13:37,540 and what you can see is basically the 381 00:13:37,540 --> 00:13:39,730 the way the art comes in because these 382 00:13:39,730 --> 00:13:41,440 are raw our assets that we're loading we 383 00:13:41,440 --> 00:13:42,819 haven't process number than anything to 384 00:13:42,819 --> 00:13:44,920 them basically they're just a giant 385 00:13:44,920 --> 00:13:46,810 empty space around the guy which is 386 00:13:46,810 --> 00:13:48,550 totally fine like we want that that's 387 00:13:48,550 --> 00:13:49,839 what you want your artist to give you 388 00:13:49,839 --> 00:13:52,060 but then you need to do work to kind of 389 00:13:52,060 --> 00:13:53,860 process those down into final art assets 390 00:13:53,860 --> 00:13:54,970 that you would use and you would store 391 00:13:54,970 --> 00:13:56,319 all that up to space obviously and so on 392 00:13:56,319 --> 00:13:58,690 so forth but the other important part of 393 00:13:58,690 --> 00:14:00,880 this is that there's essentially an 394 00:14:00,880 --> 00:14:03,089 implicit hot spot defined here 395 00:14:03,089 --> 00:14:04,870 oftentimes what it's called it's 396 00:14:04,870 --> 00:14:06,759 oftentimes called a hot spot on that's 397 00:14:06,759 --> 00:14:08,829 like the old-school term for it it's 398 00:14:08,829 --> 00:14:10,810 it's sort of what the used to call like 399 00:14:10,810 --> 00:14:12,430 cursor locations and stuff that you'd 400 00:14:12,430 --> 00:14:14,110 use for offsets it's I don't actually 401 00:14:14,110 --> 00:14:16,690 know why the term is what it is 402 00:14:16,690 --> 00:14:18,490 but there's an implicit sort of 403 00:14:18,490 --> 00:14:21,430 alignment point you could think of which 404 00:14:21,430 --> 00:14:23,680 is basically right down here where the 405 00:14:23,680 --> 00:14:26,139 dude is standing is where we kind of 406 00:14:26,139 --> 00:14:27,970 want to position him in the world right 407 00:14:27,970 --> 00:14:31,899 we want to have this point aligned with 408 00:14:31,899 --> 00:14:34,060 where we think the player's position is 409 00:14:34,060 --> 00:14:35,740 like something like that right basically 410 00:14:35,740 --> 00:14:38,050 right where he would be sort of standing 411 00:14:38,050 --> 00:14:39,569 where he would be touching the ground 412 00:14:39,569 --> 00:14:42,760 right and we don't actually have that 413 00:14:42,760 --> 00:14:44,769 information yet and so what we're gonna 414 00:14:44,769 --> 00:14:46,720 have to do in our eventual real art 415 00:14:46,720 --> 00:14:48,610 files is we will have to have those 416 00:14:48,610 --> 00:14:51,339 registration marks basically in there or 417 00:14:51,339 --> 00:14:52,690 we'll have to set them manually one of 418 00:14:52,690 --> 00:14:54,130 the other doesn't matter but you have to 419 00:14:54,130 --> 00:14:56,800 do something along those lines and so if 420 00:14:56,800 --> 00:14:59,050 I look in there I can actually see down 421 00:14:59,050 --> 00:15:01,779 in the bottom here right here GIMP will 422 00:15:01,779 --> 00:15:03,670 tell me what those pixel coordinates are 423 00:15:03,670 --> 00:15:08,410 like 72 180 270 2 , 182 right you can 424 00:15:08,410 --> 00:15:10,540 see as I move those are the X&Y 425 00:15:10,540 --> 00:15:12,610 positions so we can go ahead and put 426 00:15:12,610 --> 00:15:16,380 that in there we can say that it's 72 427 00:15:16,380 --> 00:15:20,139 roughly 72 182 for that particular 428 00:15:20,139 --> 00:15:22,329 facing direction right and that's that's 429 00:15:22,329 --> 00:15:26,019 the one where he's facing the front so 430 00:15:26,019 --> 00:15:27,600 in the one where he's facing the front 431 00:15:27,600 --> 00:15:29,800 and in fact I guess we could sort of do 432 00:15:29,800 --> 00:15:33,580 it here so that's it's 72 433 00:15:33,580 --> 00:15:37,209 and 182 for the X and the y we could go 434 00:15:37,209 --> 00:15:38,500 ahead and make this a little more 435 00:15:38,500 --> 00:15:40,930 concise here and basically say well okay 436 00:15:40,930 --> 00:15:42,310 there's these hero bitmaps and we're 437 00:15:42,310 --> 00:15:44,680 going to introduce another thing which 438 00:15:44,680 --> 00:15:48,779 is basically the align X and align Y 439 00:15:48,779 --> 00:15:52,390 right for this bitmap set so that we 440 00:15:52,390 --> 00:15:54,250 kind of know how to position them 441 00:15:54,250 --> 00:15:56,709 relative to the points that we actually 442 00:15:56,709 --> 00:16:04,079 care about in the world that makes sense 443 00:16:04,079 --> 00:16:10,209 okay so what we want to do is we want to 444 00:16:10,209 --> 00:16:11,800 basically have those registrations that 445 00:16:11,800 --> 00:16:14,829 will just hard code for now into this 446 00:16:14,829 --> 00:16:16,630 part of ourselves and then when we get 447 00:16:16,630 --> 00:16:17,769 to the point where we actually are 448 00:16:17,769 --> 00:16:19,810 talking about putting large numbers of 449 00:16:19,810 --> 00:16:22,690 assets into the game what we'll need to 450 00:16:22,690 --> 00:16:24,250 do is we'll need to have a way of 451 00:16:24,250 --> 00:16:25,870 actually loading that data from 452 00:16:25,870 --> 00:16:27,550 somewhere like that data will have to be 453 00:16:27,550 --> 00:16:29,800 produced in a more efficient fashion we 454 00:16:29,800 --> 00:16:31,660 probably don't want to sit here and hand 455 00:16:31,660 --> 00:16:33,040 code it ourselves what we'd rather have 456 00:16:33,040 --> 00:16:34,810 is some way of just marking it in 457 00:16:34,810 --> 00:16:36,010 Photoshop or whatever it is and then 458 00:16:36,010 --> 00:16:37,420 when those alright access get exported 459 00:16:37,420 --> 00:16:39,040 we'll make sure they get exported to 460 00:16:39,040 --> 00:16:40,839 something that we can read when we 461 00:16:40,839 --> 00:16:44,200 process our art assets so I'm going to 462 00:16:44,200 --> 00:16:46,810 go ahead here and just do something like 463 00:16:46,810 --> 00:16:49,050 this where we can sort of have a nice 464 00:16:49,050 --> 00:16:51,490 yeah something like that 465 00:16:51,490 --> 00:16:54,220 in fact I guess what I could do yeah 466 00:16:54,220 --> 00:16:55,690 this is actually pretty easy you could 467 00:16:55,690 --> 00:16:57,970 actually do this and then I'll just do 468 00:16:57,970 --> 00:17:02,290 bitmap Arrowhead equals debug load like 469 00:17:02,290 --> 00:17:08,589 so and and bitmap arrow Cape so just 470 00:17:08,589 --> 00:17:09,939 clean things up a little bit here so 471 00:17:09,939 --> 00:17:13,150 there's not quite so verbose there we go 472 00:17:13,150 --> 00:17:16,929 and now I'll also do bitmap align x 473 00:17:16,929 --> 00:17:19,390 equals something and bitmap align y 474 00:17:19,390 --> 00:17:21,610 equals something and then I'll move on 475 00:17:21,610 --> 00:17:24,250 to the next fit map right so this will 476 00:17:24,250 --> 00:17:26,709 just load our hero bitmaps as they work 477 00:17:26,709 --> 00:17:28,840 so I'm just gonna go ahead and make that 478 00:17:28,840 --> 00:17:32,020 change everywhere I think I can probably 479 00:17:32,020 --> 00:17:35,380 I don't know you know it's always dicey 480 00:17:35,380 --> 00:17:37,720 when I do this but we're gonna do it 481 00:17:37,720 --> 00:17:39,880 anyway I think I think it's just it's 482 00:17:39,880 --> 00:17:41,950 the right time to do it people and you 483 00:17:41,950 --> 00:17:43,360 know when it's the right time to do it 484 00:17:43,360 --> 00:17:46,150 you know and when it's the right time 485 00:17:46,150 --> 00:17:46,840 you kind 486 00:17:46,840 --> 00:17:48,520 just got to go with it you kind of got a 487 00:17:48,520 --> 00:17:52,029 go with the flow sometimes so there we 488 00:17:52,029 --> 00:17:54,010 go with that and then we'll put that 489 00:17:54,010 --> 00:17:56,470 here so let's go ahead and get that 490 00:17:56,470 --> 00:17:58,779 going on there we go to clean that up 491 00:17:58,779 --> 00:18:02,559 and now we've got something a little 492 00:18:02,559 --> 00:18:07,270 more respectable in terms of code we can 493 00:18:07,270 --> 00:18:09,429 use okay so I'm gonna go ahead and just 494 00:18:09,429 --> 00:18:12,190 manually for now do those offsets but 495 00:18:12,190 --> 00:18:13,720 again that's just something you know 496 00:18:13,720 --> 00:18:15,419 something definitely to pay attention to 497 00:18:15,419 --> 00:18:18,100 you know if you didn't have me sitting 498 00:18:18,100 --> 00:18:19,390 here telling you the sorts of things 499 00:18:19,390 --> 00:18:21,039 that we'll probably do because I've done 500 00:18:21,039 --> 00:18:23,710 on stuff like this before this would 501 00:18:23,710 --> 00:18:25,330 basically a place where you'd want to 502 00:18:25,330 --> 00:18:28,120 think in your head you know I don't want 503 00:18:28,120 --> 00:18:30,370 to be sitting here manually open up 504 00:18:30,370 --> 00:18:31,990 these bitmaps every time the artist 505 00:18:31,990 --> 00:18:34,029 changes something looking to see where 506 00:18:34,029 --> 00:18:36,190 that alignment point is like you can see 507 00:18:36,190 --> 00:18:38,409 that that's going to be something that's 508 00:18:38,409 --> 00:18:40,480 going to take time and you might art you 509 00:18:40,480 --> 00:18:41,559 know you kind of want to think to 510 00:18:41,559 --> 00:18:44,350 yourself what could what might we be 511 00:18:44,350 --> 00:18:47,380 able to do that could sort of speed that 512 00:18:47,380 --> 00:18:49,600 process up right like how could we how 513 00:18:49,600 --> 00:18:51,190 could we make a better way of setting 514 00:18:51,190 --> 00:18:53,590 these alignment points right and there's 515 00:18:53,590 --> 00:18:54,789 a lot of different ways you could do it 516 00:18:54,789 --> 00:18:56,020 but it's just something to be aware I'll 517 00:18:56,020 --> 00:18:57,370 be kind of like it raises that little 518 00:18:57,370 --> 00:18:59,740 red flag where you kind of got to think 519 00:18:59,740 --> 00:19:03,010 to yourself what you know what's the 520 00:19:03,010 --> 00:19:05,169 what's the end scheme here so it looks 521 00:19:05,169 --> 00:19:08,620 like a like these are roughly the same I 522 00:19:08,620 --> 00:19:11,440 don't know Yong Seon may have already 523 00:19:11,440 --> 00:19:14,220 just kind of lined everything up for us 524 00:19:14,220 --> 00:19:16,659 which is kind of nice so it looks like 525 00:19:16,659 --> 00:19:19,840 they may all be roughly the same so we 526 00:19:19,840 --> 00:19:22,330 won't have to really do yeah I think she 527 00:19:22,330 --> 00:19:24,220 might have although that one's a little 528 00:19:24,220 --> 00:19:26,260 different than than the other ones 529 00:19:26,260 --> 00:19:29,230 probably but we could probably use them 530 00:19:29,230 --> 00:19:33,580 all at the moment as as being 70 to 182 531 00:19:33,580 --> 00:19:35,110 that's what that's what actually they 532 00:19:35,110 --> 00:19:36,909 almost all look like is roughly that 533 00:19:36,909 --> 00:19:38,320 value so we'll leave it like that but we 534 00:19:38,320 --> 00:19:41,950 could tweak them later okay so now we've 535 00:19:41,950 --> 00:19:45,610 got these loaded mm-hmm there we go 536 00:19:45,610 --> 00:19:49,210 what why are you oh whoops that's no 537 00:19:49,210 --> 00:19:50,890 good I didn't even realize I still had 538 00:19:50,890 --> 00:19:54,309 the game loading my bad sorry guys okay 539 00:19:54,309 --> 00:19:56,980 so now we've got our little fellow there 540 00:19:56,980 --> 00:19:59,440 and what I want to do is like I said 541 00:19:59,440 --> 00:20:00,770 I've got the information 542 00:20:00,770 --> 00:20:02,030 there now where I could go ahead and 543 00:20:02,030 --> 00:20:04,340 correct for where he should be relative 544 00:20:04,340 --> 00:20:08,630 to that relative to the alignment point 545 00:20:08,630 --> 00:20:10,520 and so what I need to do is I need to 546 00:20:10,520 --> 00:20:12,710 have some way of actually taking that 547 00:20:12,710 --> 00:20:14,930 alignment into account so in here where 548 00:20:14,930 --> 00:20:16,190 I do this draw bitmap 549 00:20:16,190 --> 00:20:17,750 I want to basically be able to change 550 00:20:17,750 --> 00:20:19,940 the player left in the player top based 551 00:20:19,940 --> 00:20:22,850 on that alignment amount and so what I'm 552 00:20:22,850 --> 00:20:25,270 going to do is I'm going to introduce 553 00:20:25,270 --> 00:20:27,650 probably a new function here which is a 554 00:20:27,650 --> 00:20:31,550 draw a bitmap a line function or there 555 00:20:31,550 --> 00:20:32,840 is a different thing I could do which is 556 00:20:32,840 --> 00:20:34,370 I could make these basically be some 557 00:20:34,370 --> 00:20:37,220 kind of registered coordinates it's a 558 00:20:37,220 --> 00:20:40,640 little bit hard to say at the moment I 559 00:20:40,640 --> 00:20:48,610 think possibly in the interest of oh 560 00:20:48,610 --> 00:20:53,800 it's so tough to say sometimes you know 561 00:20:53,800 --> 00:20:56,420 I'm not sure how we want to do this yet 562 00:20:56,420 --> 00:20:59,270 so I think temporarily what I might do 563 00:20:59,270 --> 00:21:02,090 is I might just pass these as optional 564 00:21:02,090 --> 00:21:05,000 parameters into this thing we're gonna 565 00:21:05,000 --> 00:21:06,770 want to do something fancier than this 566 00:21:06,770 --> 00:21:08,870 later but I think we might just want to 567 00:21:08,870 --> 00:21:11,120 have it in there right there for now and 568 00:21:11,120 --> 00:21:14,030 we'll sort of when we have more of a 569 00:21:14,030 --> 00:21:15,620 renderer there's gonna be more clearer 570 00:21:15,620 --> 00:21:17,090 places where those should go in my 571 00:21:17,090 --> 00:21:18,560 opinion so I think for now we'll just 572 00:21:18,560 --> 00:21:20,990 leave it like that and we can go ahead 573 00:21:20,990 --> 00:21:24,500 and say that the the hero bitmaps align 574 00:21:24,500 --> 00:21:28,160 X and the hero bitmaps align Y can go 575 00:21:28,160 --> 00:21:31,090 ahead and get passed in there alright so 576 00:21:31,090 --> 00:21:33,950 we'll go ahead and compile that and what 577 00:21:33,950 --> 00:21:37,000 I want to do now right is I want to 578 00:21:37,000 --> 00:21:39,590 actually use those alignment points to 579 00:21:39,590 --> 00:21:41,480 offset the place where we would be 580 00:21:41,480 --> 00:21:44,660 drawing the guy and I think I actually 581 00:21:44,660 --> 00:21:48,380 have to kinda remember what we actually 582 00:21:48,380 --> 00:21:50,210 did for player we're passing player left 583 00:21:50,210 --> 00:21:52,220 and player top but that's not what we 584 00:21:52,220 --> 00:21:53,270 actually want anymore 585 00:21:53,270 --> 00:21:55,970 we actually just want the players actual 586 00:21:55,970 --> 00:21:59,930 location right so so we actually want to 587 00:21:59,930 --> 00:22:01,520 know where the player actually is we 588 00:22:01,520 --> 00:22:05,090 want a player ground point basically and 589 00:22:05,090 --> 00:22:08,720 and we want that ground point in X&Y and 590 00:22:08,720 --> 00:22:11,120 we what so so we don't really were not 591 00:22:11,120 --> 00:22:14,480 so interested necessarily in these sort 592 00:22:14,480 --> 00:22:14,690 of 593 00:22:14,690 --> 00:22:16,370 adjustments for the players height and 594 00:22:16,370 --> 00:22:18,140 the players width and so on right 595 00:22:18,140 --> 00:22:19,700 that's not actually what we want to see 596 00:22:19,700 --> 00:22:22,460 what we want to see here is we want to 597 00:22:22,460 --> 00:22:24,860 see let's see something more like that 598 00:22:24,860 --> 00:22:26,330 so that's gonna be the player ground 599 00:22:26,330 --> 00:22:27,800 plane X and then player ground point Y 600 00:22:27,800 --> 00:22:31,670 and then I'll go ahead and keep 601 00:22:31,670 --> 00:22:33,800 computing the location for our rectangle 602 00:22:33,800 --> 00:22:34,910 as well you might as well leave that 603 00:22:34,910 --> 00:22:37,040 drawing but then in here so what I want 604 00:22:37,040 --> 00:22:39,110 to do is I want to pass those points 605 00:22:39,110 --> 00:22:41,150 that were aligning to right so I'm gonna 606 00:22:41,150 --> 00:22:43,250 pass those instead of the the left on 607 00:22:43,250 --> 00:22:46,700 top that's a player ground point Y there 608 00:22:46,700 --> 00:22:47,210 we go 609 00:22:47,210 --> 00:22:49,160 so now we're passing the right things in 610 00:22:49,160 --> 00:22:50,720 and now that should make our guy up here 611 00:22:50,720 --> 00:22:52,520 even more off-center because we're now 612 00:22:52,520 --> 00:22:54,320 passing this point right here which 613 00:22:54,320 --> 00:22:55,940 means it's drawing like this so now we 614 00:22:55,940 --> 00:22:57,830 have to do is do that alignment to get 615 00:22:57,830 --> 00:23:00,290 him back up to the right place so if I 616 00:23:00,290 --> 00:23:02,630 go into that drop bitmap call you can 617 00:23:02,630 --> 00:23:05,150 sort of see it's not gonna be 618 00:23:05,150 --> 00:23:07,100 particularly difficult we've got our 619 00:23:07,100 --> 00:23:09,230 real X and our real Y that coming in 620 00:23:09,230 --> 00:23:11,510 here basically all we have to do is 621 00:23:11,510 --> 00:23:14,360 subtract from those the values that we 622 00:23:14,360 --> 00:23:16,580 have for our alignment right all we need 623 00:23:16,580 --> 00:23:19,130 to do is say we want this align X and 624 00:23:19,130 --> 00:23:22,310 this align Y to actually be sort of the 625 00:23:22,310 --> 00:23:25,400 the alignment point versus the point 626 00:23:25,400 --> 00:23:27,320 that we've been passed in so if you 627 00:23:27,320 --> 00:23:29,480 think about what happens I'll go ahead 628 00:23:29,480 --> 00:23:31,160 and draw it out for you here on our on 629 00:23:31,160 --> 00:23:32,660 our handy-dandy whiteboard I don't know 630 00:23:32,660 --> 00:23:35,660 why krita's still is passing a hand for 631 00:23:35,660 --> 00:23:38,600 our cursor nobody really knows we don't 632 00:23:38,600 --> 00:23:41,060 try to understand Crito we just accept 633 00:23:41,060 --> 00:23:42,830 the fact that it does what it does and 634 00:23:42,830 --> 00:23:46,730 so what I'm doing here right is we've 635 00:23:46,730 --> 00:23:48,410 got a blitt routine and the blitt 636 00:23:48,410 --> 00:23:49,460 routine is going to draw a rectangle 637 00:23:49,460 --> 00:23:51,110 from like an upper corner it's gonna 638 00:23:51,110 --> 00:23:53,960 copy these rows in here right but what 639 00:23:53,960 --> 00:23:56,480 we have is we have a registration mark 640 00:23:56,480 --> 00:23:59,390 right in the world but basically where 641 00:23:59,390 --> 00:24:01,100 the player ground point is so this is 642 00:24:01,100 --> 00:24:03,380 the ground point right and then we have 643 00:24:03,380 --> 00:24:05,690 a bitmap that also has a registration 644 00:24:05,690 --> 00:24:08,210 mark in it right that's measured from 645 00:24:08,210 --> 00:24:11,120 that upper corner so what we want to do 646 00:24:11,120 --> 00:24:12,890 if we are saying that these two 647 00:24:12,890 --> 00:24:15,350 registration marks should line up then 648 00:24:15,350 --> 00:24:18,380 we're relative to the ground point where 649 00:24:18,380 --> 00:24:21,620 would we draw right that this bitmap 650 00:24:21,620 --> 00:24:23,990 well the answer is we just invert right 651 00:24:23,990 --> 00:24:25,760 whatever this was if we're saying that 652 00:24:25,760 --> 00:24:28,580 the align X and the line Y is how you 653 00:24:28,580 --> 00:24:30,890 from the upper corner to the alignment 654 00:24:30,890 --> 00:24:32,750 point then getting back to the upper 655 00:24:32,750 --> 00:24:34,730 corner is just gonna be a matter of 656 00:24:34,730 --> 00:24:36,890 subtracting them right and so that's all 657 00:24:36,890 --> 00:24:38,390 I'm going to actually do here because 658 00:24:38,390 --> 00:24:39,770 I'm just going to go ahead and subtract 659 00:24:39,770 --> 00:24:43,010 those aligned X and aligned Y points so 660 00:24:43,010 --> 00:24:44,780 that I can offset my bitmap by the 661 00:24:44,780 --> 00:24:46,340 amount that we possible that would be 662 00:24:46,340 --> 00:24:48,190 necessary to move those alignment points 663 00:24:48,190 --> 00:24:51,980 into into coinciding right and so now 664 00:24:51,980 --> 00:24:55,250 you can see our little hero fellow he 665 00:24:55,250 --> 00:24:57,140 actually is properly aligned with where 666 00:24:57,140 --> 00:24:58,610 we thought he should be and that's all 667 00:24:58,610 --> 00:25:00,680 good he's a little off in though in the 668 00:25:00,680 --> 00:25:02,120 direction that I said maybe he would be 669 00:25:02,120 --> 00:25:04,340 off in which is the side ones I wasn't 670 00:25:04,340 --> 00:25:05,540 sure what we should set those alignments 671 00:25:05,540 --> 00:25:07,160 to you but he's for the most part pretty 672 00:25:07,160 --> 00:25:10,490 much fine and so that's a lot better 673 00:25:10,490 --> 00:25:12,230 than what we had in there before now 674 00:25:12,230 --> 00:25:14,000 what I'd like to do is I'd like to get 675 00:25:14,000 --> 00:25:16,940 back to screen based stuff here you know 676 00:25:16,940 --> 00:25:18,710 we had our tile map and then we started 677 00:25:18,710 --> 00:25:20,450 doing scrolling just as a test thing I'd 678 00:25:20,450 --> 00:25:21,950 like to get back to having things fixed 679 00:25:21,950 --> 00:25:24,920 on the screen where we just walk in and 680 00:25:24,920 --> 00:25:26,600 we walk around the screen instead of the 681 00:25:26,600 --> 00:25:28,520 screen scrolling around us so I'd like 682 00:25:28,520 --> 00:25:30,620 to go back and and and change things 683 00:25:30,620 --> 00:25:33,190 back to going that way for a while until 684 00:25:33,190 --> 00:25:35,870 just because I that's sort of the way 685 00:25:35,870 --> 00:25:37,700 the game will mostly be played and we 686 00:25:37,700 --> 00:25:38,900 don't kind of want this random stuff in 687 00:25:38,900 --> 00:25:40,070 here for now because we're gonna start 688 00:25:40,070 --> 00:25:41,450 working with the players actual movement 689 00:25:41,450 --> 00:25:45,740 code alright so hopefully that was all 690 00:25:45,740 --> 00:25:46,820 very straightforward nothing 691 00:25:46,820 --> 00:25:48,470 particularly unusual going on there 692 00:25:48,470 --> 00:25:50,990 let's see we got about 30 minutes left 693 00:25:50,990 --> 00:25:59,710 which is quite some time okay 694 00:25:59,710 --> 00:26:02,840 so what I want to do now is kind of 695 00:26:02,840 --> 00:26:05,020 figure out some way to keep our camera 696 00:26:05,020 --> 00:26:07,250 centered so that we can have our tile 697 00:26:07,250 --> 00:26:09,350 maps back also I feel like we can 698 00:26:09,350 --> 00:26:12,740 probably at this point stop drawing the 699 00:26:12,740 --> 00:26:15,170 crazy backdrop for now well I mean we 700 00:26:15,170 --> 00:26:16,580 could keep drawing that backdrop I guess 701 00:26:16,580 --> 00:26:18,680 we could do a number of things I'd have 702 00:26:18,680 --> 00:26:20,030 to think about exactly what we should be 703 00:26:20,030 --> 00:26:22,550 doing it's a little bit difficult to say 704 00:26:22,550 --> 00:26:24,830 because again trying to manage stuff at 705 00:26:24,830 --> 00:26:26,000 this stage in the game we're kind of 706 00:26:26,000 --> 00:26:27,740 thinking about all the different places 707 00:26:27,740 --> 00:26:30,860 we could go there's so much there are so 708 00:26:30,860 --> 00:26:32,450 many different places that we can go 709 00:26:32,450 --> 00:26:34,490 obviously exploring because we have 710 00:26:34,490 --> 00:26:36,920 every every part of the system is still 711 00:26:36,920 --> 00:26:39,140 pretty much up in the air but basically 712 00:26:39,140 --> 00:26:41,990 I guess what I'd say is do we want to 713 00:26:41,990 --> 00:26:42,680 leave that 714 00:26:42,680 --> 00:26:44,510 drawing the back up in there you know 715 00:26:44,510 --> 00:26:46,430 maybe we do at the very least what I'd 716 00:26:46,430 --> 00:26:49,100 like to do is just leave the sort of the 717 00:26:49,100 --> 00:26:52,250 world fixed for now yeah so what I'd 718 00:26:52,250 --> 00:26:54,590 like to do is I'd like to change it so 719 00:26:54,590 --> 00:26:56,780 that instead of drawing out from around 720 00:26:56,780 --> 00:26:58,070 the player because you remember this 721 00:26:58,070 --> 00:26:59,990 right here drew our tile maps this was 722 00:26:59,990 --> 00:27:02,570 our little debug thing for drawing what 723 00:27:02,570 --> 00:27:05,180 was filled in the tile map I think what 724 00:27:05,180 --> 00:27:07,010 I'm going to do is I'm going to change 725 00:27:07,010 --> 00:27:10,250 it so that we have both a player P and a 726 00:27:10,250 --> 00:27:13,490 camera P right so now I have a place 727 00:27:13,490 --> 00:27:15,290 where the camera is looking and I have a 728 00:27:15,290 --> 00:27:16,670 place where the players looking and 729 00:27:16,670 --> 00:27:18,470 they're not going to be the same anymore 730 00:27:18,470 --> 00:27:21,050 so now the camera P is basically going 731 00:27:21,050 --> 00:27:29,480 to be you know the place around which we 732 00:27:29,480 --> 00:27:31,250 Center that tile map rendering so all 733 00:27:31,250 --> 00:27:33,920 the same stuff we were doing here we're 734 00:27:33,920 --> 00:27:35,540 gonna do it's just we're not going to do 735 00:27:35,540 --> 00:27:37,880 them from the player Pete right instead 736 00:27:37,880 --> 00:27:40,370 of player P in here we're gonna do it 737 00:27:40,370 --> 00:27:43,190 from this perspective of the camera and 738 00:27:43,190 --> 00:27:44,990 so what we were doing remember if you 739 00:27:44,990 --> 00:27:46,850 remember how we drew this tile map we 740 00:27:46,850 --> 00:27:48,559 are essentially starting with whatever 741 00:27:48,559 --> 00:27:50,720 tau the player was on we were saying 742 00:27:50,720 --> 00:27:52,220 that was going to be centered in the 743 00:27:52,220 --> 00:27:53,720 very middle of the screen and then we 744 00:27:53,720 --> 00:27:55,190 were just gonna walk out words from 745 00:27:55,190 --> 00:27:58,309 there to the ten picked tiles on either 746 00:27:58,309 --> 00:28:02,330 side and I'm sorry ten pixels up and ten 747 00:28:02,330 --> 00:28:05,170 tiles up and down so 20 tiles total and 748 00:28:05,170 --> 00:28:08,150 40 tiles across so negative negative 22 749 00:28:08,150 --> 00:28:09,590 20 which is more than actually was on 750 00:28:09,590 --> 00:28:11,510 the screen we were kind of over drawing 751 00:28:11,510 --> 00:28:13,040 a little bit we were we were going a 752 00:28:13,040 --> 00:28:15,710 little bit further out so what I want to 753 00:28:15,710 --> 00:28:17,360 do is just say okay we're gonna do 754 00:28:17,360 --> 00:28:18,800 exactly the same thing only instead of 755 00:28:18,800 --> 00:28:20,150 walking out from the player station when 756 00:28:20,150 --> 00:28:22,220 I walk out from the cameras position so 757 00:28:22,220 --> 00:28:23,900 everywhere that there was a player P in 758 00:28:23,900 --> 00:28:25,820 here right I'm gonna change it to a 759 00:28:25,820 --> 00:28:28,220 camera P right and so that's that's how 760 00:28:28,220 --> 00:28:30,080 that's gonna work so now when we 761 00:28:30,080 --> 00:28:33,200 initialize that player position at the 762 00:28:33,200 --> 00:28:35,600 outset of the game we're going to 763 00:28:35,600 --> 00:28:37,640 initialize the camera position to be 764 00:28:37,640 --> 00:28:40,250 something logical as well so we 765 00:28:40,250 --> 00:28:42,770 initialize the player position somewhere 766 00:28:42,770 --> 00:28:45,380 in here there it is so we're gonna say 767 00:28:45,380 --> 00:28:47,150 that there's also a stage where we 768 00:28:47,150 --> 00:28:49,130 initialize the camera position and that 769 00:28:49,130 --> 00:28:50,750 camera position should just be let's say 770 00:28:50,750 --> 00:28:53,210 on that very first map that very first 771 00:28:53,210 --> 00:28:55,559 tile map down in the corner 772 00:28:55,559 --> 00:28:58,409 that Taichung I think we said basically 773 00:28:58,409 --> 00:29:01,440 our tile system was going to be roughly 774 00:29:01,440 --> 00:29:04,320 something like seventeen by nine or 775 00:29:04,320 --> 00:29:05,909 something like that I think is what we 776 00:29:05,909 --> 00:29:08,600 were saying so I'll do 17 divided by 2 777 00:29:08,600 --> 00:29:12,389 and 9 divided by 2 for what that was 778 00:29:12,389 --> 00:29:17,120 going to be game state camera P AB style 779 00:29:17,120 --> 00:29:21,960 y equals 9 divided by 2 and you know 780 00:29:21,960 --> 00:29:24,029 what it's interesting well I guess 781 00:29:24,029 --> 00:29:25,710 that's fine so there we go 782 00:29:25,710 --> 00:29:28,830 and we will go ahead and run that now 783 00:29:28,830 --> 00:29:29,850 and see where we get 784 00:29:29,850 --> 00:29:31,980 so essentially oh right and now we 785 00:29:31,980 --> 00:29:33,299 actually have to do the work for doing 786 00:29:33,299 --> 00:29:34,980 player position as well but now our 787 00:29:34,980 --> 00:29:38,039 camera is going to be fixed and remember 788 00:29:38,039 --> 00:29:39,690 we were cheating before we never 789 00:29:39,690 --> 00:29:40,830 actually computed where to draw the 790 00:29:40,830 --> 00:29:42,210 player we just drew him at the middle of 791 00:29:42,210 --> 00:29:43,710 the screen so now we actually have to 792 00:29:43,710 --> 00:29:45,240 compute where he is which means we're 793 00:29:45,240 --> 00:29:46,950 going to have to do a relative 794 00:29:46,950 --> 00:29:50,059 computation to see where is the player 795 00:29:50,059 --> 00:29:52,799 relative to the camera because we know 796 00:29:52,799 --> 00:29:54,869 the camera is at the screen center X and 797 00:29:54,869 --> 00:29:56,460 screen center Y we know that's where the 798 00:29:56,460 --> 00:29:59,159 camera is essentially going to be in 799 00:29:59,159 --> 00:30:00,539 sort of the space when we draw the 800 00:30:00,539 --> 00:30:02,789 screen because that's the definition of 801 00:30:02,789 --> 00:30:03,929 the center of the screen is wherever the 802 00:30:03,929 --> 00:30:06,360 camera is telling us to look so what we 803 00:30:06,360 --> 00:30:07,980 need to do is we need to add something 804 00:30:07,980 --> 00:30:10,409 to that right we need to say where is 805 00:30:10,409 --> 00:30:12,960 the player relative to the camera so 806 00:30:12,960 --> 00:30:14,429 that we know where to draw them relative 807 00:30:14,429 --> 00:30:17,190 to the center of the screen right and so 808 00:30:17,190 --> 00:30:19,230 what we need to do is we need to have 809 00:30:19,230 --> 00:30:21,330 essentially a subtraction operator and 810 00:30:21,330 --> 00:30:22,740 this kind of leads nicely into that mass 811 00:30:22,740 --> 00:30:24,269 that I was talking about so this is 812 00:30:24,269 --> 00:30:26,909 gonna be good because it will sort of it 813 00:30:26,909 --> 00:30:29,999 sort of is a nice segue if you will for 814 00:30:29,999 --> 00:30:31,200 talking about this tomorrow or Monday 815 00:30:31,200 --> 00:30:33,419 whenever we decide to transition over it 816 00:30:33,419 --> 00:30:35,249 to it but we've got these tile map 817 00:30:35,249 --> 00:30:36,570 positions and basically what we want to 818 00:30:36,570 --> 00:30:37,830 be able to do is we want to be able to 819 00:30:37,830 --> 00:30:40,289 subtract right we want to be able to say 820 00:30:40,289 --> 00:30:42,539 what is how do I get from one to another 821 00:30:42,539 --> 00:30:45,570 if I have the player and I have the 822 00:30:45,570 --> 00:30:46,950 camera how would I get from the camera 823 00:30:46,950 --> 00:30:47,999 to the player because that's the 824 00:30:47,999 --> 00:30:51,299 distance that I want to give in in sort 825 00:30:51,299 --> 00:30:52,619 of that's that's what I want to add to 826 00:30:52,619 --> 00:30:53,460 the screen Center to know where the 827 00:30:53,460 --> 00:31:00,659 player is right so so what I'm gonna do 828 00:31:00,659 --> 00:31:04,200 is I'm just gonna say okay let's 829 00:31:04,200 --> 00:31:06,299 actually pretend we have that let's 830 00:31:06,299 --> 00:31:08,129 actually just say that we had something 831 00:31:08,129 --> 00:31:09,310 that could do is subtract 832 00:31:09,310 --> 00:31:11,860 right and it could subtract a table map 833 00:31:11,860 --> 00:31:12,910 position from another tile in that 834 00:31:12,910 --> 00:31:15,670 position and will give us back the real 835 00:31:15,670 --> 00:31:18,820 32 answer right so I'm just throwing in 836 00:31:18,820 --> 00:31:19,990 a name for that at the moment I'm not 837 00:31:19,990 --> 00:31:21,400 suggesting this is actually gonna be the 838 00:31:21,400 --> 00:31:23,680 name eventually but that you know let's 839 00:31:23,680 --> 00:31:25,960 do that subtraction right well that 840 00:31:25,960 --> 00:31:29,260 subtraction is just going to be between 841 00:31:29,260 --> 00:31:35,020 the gain the the player P right and the 842 00:31:35,020 --> 00:31:39,570 camera P oops 843 00:31:39,570 --> 00:31:42,880 like so now of course we might as well 844 00:31:42,880 --> 00:31:44,590 just do we don't really want to have 845 00:31:44,590 --> 00:31:45,730 multiple functions for this so we might 846 00:31:45,730 --> 00:31:47,560 as well just do one that will actually 847 00:31:47,560 --> 00:31:49,690 give us back the whole answer and again 848 00:31:49,690 --> 00:31:51,250 this is kind of setting up the math so 849 00:31:51,250 --> 00:31:52,330 we're gonna have to kind of do this in a 850 00:31:52,330 --> 00:31:54,280 bit of a janky way for now because we 851 00:31:54,280 --> 00:31:56,350 haven't introduced vectors yet so we're 852 00:31:56,350 --> 00:31:57,460 just going to kind of see it and then 853 00:31:57,460 --> 00:31:59,080 when we do our vectors which I guess 854 00:31:59,080 --> 00:32:00,700 will be maybe tomorrow seems since it 855 00:32:00,700 --> 00:32:02,140 seems like this is kind of the most 856 00:32:02,140 --> 00:32:04,300 pressing concern we can kind of see how 857 00:32:04,300 --> 00:32:06,760 it cleans our stuff up nicely so I could 858 00:32:06,760 --> 00:32:07,960 basically say there's a tile map 859 00:32:07,960 --> 00:32:10,690 difference function let's say and that's 860 00:32:10,690 --> 00:32:15,070 gonna basically give us back the 861 00:32:15,070 --> 00:32:18,460 difference in XY and Z when we do that 862 00:32:18,460 --> 00:32:20,800 subtraction so if I do the subtraction I 863 00:32:20,800 --> 00:32:22,720 could do it like this I could say that 864 00:32:22,720 --> 00:32:24,600 we get back a tile map difference right 865 00:32:24,600 --> 00:32:27,430 and that that difference is going to be 866 00:32:27,430 --> 00:32:29,170 the difference between the player and 867 00:32:29,170 --> 00:32:31,480 the camera once I have that difference 868 00:32:31,480 --> 00:32:33,900 it's pretty easy for me to go ahead and 869 00:32:33,900 --> 00:32:37,420 and add it in so I basically now would 870 00:32:37,420 --> 00:32:40,090 have a way of getting to where I think 871 00:32:40,090 --> 00:32:42,400 the player actually is so all I need to 872 00:32:42,400 --> 00:32:43,660 do is make something that could subtract 873 00:32:43,660 --> 00:32:46,540 these two and produce one of those as a 874 00:32:46,540 --> 00:32:48,370 result so if I look at what has to 875 00:32:48,370 --> 00:32:52,390 happen to do that right well part of it 876 00:32:52,390 --> 00:32:55,030 is really really simple right if I've 877 00:32:55,030 --> 00:32:57,400 got two of these let me go ahead and set 878 00:32:57,400 --> 00:32:59,140 this up for a little more success here 879 00:32:59,140 --> 00:33:04,870 if I had tile yeah like so so we've got 880 00:33:04,870 --> 00:33:07,000 a tile map difference that we want to 881 00:33:07,000 --> 00:33:09,730 return right and we want to basically 882 00:33:09,730 --> 00:33:18,090 compute a DX dy and DZ out of that now 883 00:33:18,090 --> 00:33:21,310 what I'd like to do is I'd like to take 884 00:33:21,310 --> 00:33:22,780 in two tile map positions 885 00:33:22,780 --> 00:33:28,330 in a canopy like so and then I would 886 00:33:28,330 --> 00:33:31,990 like to say how do I subtract the two of 887 00:33:31,990 --> 00:33:34,540 these well I know how to subtract the 888 00:33:34,540 --> 00:33:36,580 offsets directly because the offsets 889 00:33:36,580 --> 00:33:40,030 just are real 32 so producing another 890 00:33:40,030 --> 00:33:42,040 floating-point offset by taking the 891 00:33:42,040 --> 00:33:44,470 distance the difference of these two is 892 00:33:44,470 --> 00:33:46,450 really really easy it would look like 893 00:33:46,450 --> 00:33:49,000 this right that's all I would have to do 894 00:33:49,000 --> 00:33:50,200 I would literally just subtract these 895 00:33:50,200 --> 00:33:52,120 offsets but what I need to do now is I 896 00:33:52,120 --> 00:33:53,800 need to account for these AB Stiles 897 00:33:53,800 --> 00:33:56,380 right I don't have a way of accounting 898 00:33:56,380 --> 00:33:57,580 for the AB Stiles 899 00:33:57,580 --> 00:34:07,500 at all okay so in order to do that I 900 00:34:07,500 --> 00:34:10,120 would I want to be able to do a signed 901 00:34:10,120 --> 00:34:12,850 distance of some kind here so what I 902 00:34:12,850 --> 00:34:15,700 might do is say all right we could do 903 00:34:15,700 --> 00:34:18,400 the subtraction in float for now I have 904 00:34:18,400 --> 00:34:19,630 to think about how I actually want to do 905 00:34:19,630 --> 00:34:22,120 this eventually but for now we could 906 00:34:22,120 --> 00:34:23,620 basically say all right we've got the 907 00:34:23,620 --> 00:34:26,260 the signed distance which is the the d 908 00:34:26,260 --> 00:34:28,780 tile distance right and that's going to 909 00:34:28,780 --> 00:34:33,820 be you know the ABS tile X from a - the 910 00:34:33,820 --> 00:34:38,169 ABS cloud Y like so on like so there we 911 00:34:38,169 --> 00:34:38,560 go 912 00:34:38,560 --> 00:34:41,320 so I'm gonna do that subtraction to get 913 00:34:41,320 --> 00:34:45,100 these these deltas here detail X ETA Y 914 00:34:45,100 --> 00:34:48,640 do TLC right and then those are in tiles 915 00:34:48,640 --> 00:34:50,649 so in order to change the distance in 916 00:34:50,649 --> 00:34:53,050 tiles I would need to know that tile 917 00:34:53,050 --> 00:34:55,030 side in meters right I need to know that 918 00:34:55,030 --> 00:34:57,790 tile map information so I'm gonna have 919 00:34:57,790 --> 00:35:01,210 to take the tile map in order to do that 920 00:35:01,210 --> 00:35:03,970 conversion right I need to know for 921 00:35:03,970 --> 00:35:07,330 every one change when I do this how far 922 00:35:07,330 --> 00:35:09,280 they in tiles I need to know how far 923 00:35:09,280 --> 00:35:11,140 that's actually going to be in the real 924 00:35:11,140 --> 00:35:12,640 meters units that we're using for 925 00:35:12,640 --> 00:35:14,770 everything else so the tile side and 926 00:35:14,770 --> 00:35:18,760 meters right that I'm gonna have to go 927 00:35:18,760 --> 00:35:21,210 ahead and multiply in here in order to 928 00:35:21,210 --> 00:35:24,550 in order to and I guess I could do that 929 00:35:24,550 --> 00:35:29,230 down here as well there we go 930 00:35:29,230 --> 00:35:32,150 so basically I have my detail X 931 00:35:32,150 --> 00:35:37,190 and detail why tom at five meters deep 932 00:35:37,190 --> 00:35:42,590 Tao why like so and outside in meters we 933 00:35:42,590 --> 00:35:47,090 don't really know yet what our RZ should 934 00:35:47,090 --> 00:35:49,460 really be in this case it's unclear that 935 00:35:49,460 --> 00:35:51,740 we ever want to actually have a DZ in 936 00:35:51,740 --> 00:35:54,280 this way but I'll put it to do in there 937 00:35:54,280 --> 00:35:58,670 think about what we want to do about Z 938 00:35:58,670 --> 00:36:00,770 because Z is really kind of not a real 939 00:36:00,770 --> 00:36:02,270 dimension in our system because since 940 00:36:02,270 --> 00:36:04,190 the way time app games work you don't 941 00:36:04,190 --> 00:36:05,750 really have Z in the same way that you 942 00:36:05,750 --> 00:36:08,750 have x and y so it's hard to say but 943 00:36:08,750 --> 00:36:10,970 anyway after we compute these tile 944 00:36:10,970 --> 00:36:12,620 differences and then we actually go 945 00:36:12,620 --> 00:36:16,310 ahead and do the math here to add in the 946 00:36:16,310 --> 00:36:18,050 tile difference amount plus the offset 947 00:36:18,050 --> 00:36:21,140 amount now we've got a real DX dy and DZ 948 00:36:21,140 --> 00:36:23,870 but of course this is actually all going 949 00:36:23,870 --> 00:36:25,880 to be in meters but we need our meters 950 00:36:25,880 --> 00:36:28,820 to pixels in order to actually turn that 951 00:36:28,820 --> 00:36:30,710 into pixels on the screen and these are 952 00:36:30,710 --> 00:36:32,120 all in pixels from here this is all 953 00:36:32,120 --> 00:36:34,940 rendering units so there's our meters to 954 00:36:34,940 --> 00:36:37,850 pixels that gets added in there to 955 00:36:37,850 --> 00:36:39,770 convert that difference that we did and 956 00:36:39,770 --> 00:36:41,240 of course we have to pass the tile map 957 00:36:41,240 --> 00:36:44,930 as well which i think is just gamestate 958 00:36:44,930 --> 00:36:47,120 time okay so there we go and so I 959 00:36:47,120 --> 00:36:51,200 believe that is roughly all we need to 960 00:36:51,200 --> 00:36:55,490 do to get that guy going and of course I 961 00:36:55,490 --> 00:36:57,290 got to return the results of course and 962 00:36:57,290 --> 00:36:59,660 so I think that should be roughly 963 00:36:59,660 --> 00:37:02,590 correct and of course it isn't 964 00:37:02,590 --> 00:37:07,820 classically you gotta love that I think 965 00:37:07,820 --> 00:37:09,890 that's just because I forgot that we 966 00:37:09,890 --> 00:37:11,990 have to flip things around for our our 967 00:37:11,990 --> 00:37:15,050 kind of non we don't really have a 968 00:37:15,050 --> 00:37:16,400 renderer yet like I said so our 969 00:37:16,400 --> 00:37:18,020 coordinate systems are a little ad hoc 970 00:37:18,020 --> 00:37:21,290 here so of course yes this is where we 971 00:37:21,290 --> 00:37:24,170 have to do our flip always which you 972 00:37:24,170 --> 00:37:27,050 know is kind of annoying at the moment 973 00:37:27,050 --> 00:37:28,520 but that will all get handled in our 974 00:37:28,520 --> 00:37:30,260 renderer for us so it's it's really it's 975 00:37:30,260 --> 00:37:33,140 not as janky as it seems like it has to 976 00:37:33,140 --> 00:37:36,800 be the fact that that the the up and 977 00:37:36,800 --> 00:37:39,440 down doesn't quite work the way that we 978 00:37:39,440 --> 00:37:42,860 would like it to but anyway so yes what 979 00:37:42,860 --> 00:37:44,420 we would like to do here is we'd like to 980 00:37:44,420 --> 00:37:45,780 have the player 981 00:37:45,780 --> 00:37:47,610 ideally go in the opposite direction 982 00:37:47,610 --> 00:37:52,230 also let me see here we should also make 983 00:37:52,230 --> 00:37:57,450 sure that we don't have a bug in our in 984 00:37:57,450 --> 00:37:59,760 our offset X offset Y stuff I don't 985 00:37:59,760 --> 00:38:01,350 think we do but we could double check to 986 00:38:01,350 --> 00:38:03,390 make sure that we don't so let's go 987 00:38:03,390 --> 00:38:05,640 ahead and double check everything here 988 00:38:05,640 --> 00:38:07,200 so we're gonna take all of the tile 989 00:38:07,200 --> 00:38:09,570 sighted meters the d2 YY is always going 990 00:38:09,570 --> 00:38:12,870 up that goes up in tiles as well as in 991 00:38:12,870 --> 00:38:17,100 as in our meters units there so that's 992 00:38:17,100 --> 00:38:19,560 correct but yes this this is this is 993 00:38:19,560 --> 00:38:22,170 wrong because obviously the the guy 994 00:38:22,170 --> 00:38:26,070 supposed to go up not the coordinates 995 00:38:26,070 --> 00:38:28,440 are inverted in the renderer as from 996 00:38:28,440 --> 00:38:30,990 what they are in the game that didn't 997 00:38:30,990 --> 00:38:32,220 seem like the bug we were having though 998 00:38:32,220 --> 00:38:35,760 I don't know yes see we still get a 999 00:38:35,760 --> 00:38:38,340 weird we still get a little yeah I was 1000 00:38:38,340 --> 00:38:40,170 gonna say didn't that was that was one 1001 00:38:40,170 --> 00:38:41,430 bug that we have I'm like there's that 1002 00:38:41,430 --> 00:38:45,140 weird kind of we get that kind of nasty 1003 00:38:45,140 --> 00:38:46,970 [Music] 1004 00:38:46,970 --> 00:38:49,950 thing where the X is the X is related to 1005 00:38:49,950 --> 00:38:52,830 the Y I must have had a typo in that 1006 00:38:52,830 --> 00:38:54,180 code let me go back and look at it for a 1007 00:38:54,180 --> 00:38:55,050 second 1008 00:38:55,050 --> 00:38:58,170 Oh fantastic yes I have tons of typos 1009 00:38:58,170 --> 00:39:02,910 wow those are amazing there we go all 1010 00:39:02,910 --> 00:39:08,190 right so I think we are good to go now 1011 00:39:08,190 --> 00:39:10,410 our dude is moving around to the camera 1012 00:39:10,410 --> 00:39:12,630 is where it's supposed to be but we have 1013 00:39:12,630 --> 00:39:13,890 a few other things that we would need to 1014 00:39:13,890 --> 00:39:15,690 handle in order to get everything 1015 00:39:15,690 --> 00:39:17,760 working properly also I should note that 1016 00:39:17,760 --> 00:39:19,800 we still have not finished our bitmap 1017 00:39:19,800 --> 00:39:22,530 routine so if we move to the top you 1018 00:39:22,530 --> 00:39:23,940 will notice I don't know if you can see 1019 00:39:23,940 --> 00:39:26,220 that that our guide doesn't actually you 1020 00:39:26,220 --> 00:39:28,020 can't clip off the front off the top of 1021 00:39:28,020 --> 00:39:30,420 the screen we have it to do in there 1022 00:39:30,420 --> 00:39:31,620 about that so those are the things that 1023 00:39:31,620 --> 00:39:33,210 we have to finish so let's get him 1024 00:39:33,210 --> 00:39:36,180 walking throughout the entire map for 1025 00:39:36,180 --> 00:39:37,950 now for example when he comes off the 1026 00:39:37,950 --> 00:39:41,280 top of the screen here you'll notice the 1027 00:39:41,280 --> 00:39:43,530 camera will never change locations 1028 00:39:43,530 --> 00:39:44,910 because we have never actually 1029 00:39:44,910 --> 00:39:45,840 programmed the camera to change 1030 00:39:45,840 --> 00:39:48,540 locations so he is and we and we also 1031 00:39:48,540 --> 00:39:50,520 are drawing him whether he's on the same 1032 00:39:50,520 --> 00:39:52,080 z plane as the camera or not so when 1033 00:39:52,080 --> 00:39:53,940 technically we would go upstairs will 1034 00:39:53,940 --> 00:39:55,830 never actually see that so we have a 1035 00:39:55,830 --> 00:39:57,120 bunch of stuff that we need to fix so 1036 00:39:57,120 --> 00:39:59,010 let's go ahead and fix all those we've 1037 00:39:59,010 --> 00:39:59,759 got about 15 1038 00:39:59,759 --> 00:40:02,099 look just so we can have things cleaned 1039 00:40:02,099 --> 00:40:03,599 up and working relatively well so we 1040 00:40:03,599 --> 00:40:05,489 could start working on our math having 1041 00:40:05,489 --> 00:40:07,319 math having real math is going to be a 1042 00:40:07,319 --> 00:40:08,759 pretty nice thing let me tell you it's 1043 00:40:08,759 --> 00:40:10,079 been a bit of a struggle to kind of go 1044 00:40:10,079 --> 00:40:11,969 through without ever having really 1045 00:40:11,969 --> 00:40:13,829 vectors or anything like that but you 1046 00:40:13,829 --> 00:40:15,509 know you got to pick an order to do 1047 00:40:15,509 --> 00:40:17,429 things in right and so it's always 1048 00:40:17,429 --> 00:40:20,399 important to kind of you know not not go 1049 00:40:20,399 --> 00:40:28,079 too far too fast alright so first things 1050 00:40:28,079 --> 00:40:30,749 first we always want to move the camera 1051 00:40:30,749 --> 00:40:33,149 to wherever the player is in Z I would 1052 00:40:33,149 --> 00:40:35,909 say right so no matter what happens I 1053 00:40:35,909 --> 00:40:40,799 would say the the camera P I'm just 1054 00:40:40,799 --> 00:40:43,139 gonna say that the ABS tile Z is always 1055 00:40:43,139 --> 00:40:46,999 gonna be the same as the player state 1056 00:40:46,999 --> 00:40:50,130 ABS tile Z right just so what if the 1057 00:40:50,130 --> 00:40:52,859 player goes up then the camera goes up 1058 00:40:52,859 --> 00:40:55,679 if the player goes down it goes down and 1059 00:40:55,679 --> 00:40:58,859 and so I think yeah there you go so now 1060 00:40:58,859 --> 00:41:01,109 we can actually get up and so the only 1061 00:41:01,109 --> 00:41:02,459 thing that now we have problems that the 1062 00:41:02,459 --> 00:41:03,749 player moves off the screen the camera 1063 00:41:03,749 --> 00:41:06,679 doesn't ever follow them right and 1064 00:41:06,679 --> 00:41:09,269 that's no good so what we want to do 1065 00:41:09,269 --> 00:41:10,919 here is we want to then say all right 1066 00:41:10,919 --> 00:41:12,869 the other thing we need to do is to see 1067 00:41:12,869 --> 00:41:15,989 whether the player ever gets more tiles 1068 00:41:15,989 --> 00:41:18,509 to the left or to the right than he 1069 00:41:18,509 --> 00:41:22,559 should be relative to the player now 1070 00:41:22,559 --> 00:41:23,999 what we could do if we're always locked 1071 00:41:23,999 --> 00:41:26,219 to screens there's a lot of different 1072 00:41:26,219 --> 00:41:27,689 ways we could do this you know it 1073 00:41:27,689 --> 00:41:29,309 depends whether we want to drop down our 1074 00:41:29,309 --> 00:41:31,469 own manual camera points and and this 1075 00:41:31,469 --> 00:41:32,549 would allow us to do different things 1076 00:41:32,549 --> 00:41:34,469 like having screens of different scale 1077 00:41:34,469 --> 00:41:36,209 sometimes there's there's just a ton of 1078 00:41:36,209 --> 00:41:37,919 stuff we could do here I'm trying to 1079 00:41:37,919 --> 00:41:40,009 keep it again relatively simple because 1080 00:41:40,009 --> 00:41:42,719 one thing at a time but we basically 1081 00:41:42,719 --> 00:41:46,019 have a problem with our tiles X and 1082 00:41:46,019 --> 00:41:47,279 tiles why were what we want to do is 1083 00:41:47,279 --> 00:41:48,599 that the player moves one screen to the 1084 00:41:48,599 --> 00:41:50,069 right or one screen to the left we want 1085 00:41:50,069 --> 00:41:51,959 the camera to follow them there right 1086 00:41:51,959 --> 00:41:55,199 and so the simplest way we might do that 1087 00:41:55,199 --> 00:41:57,689 is just basically say if we rounded the 1088 00:41:57,689 --> 00:42:00,889 players position to whatever the closest 1089 00:42:00,889 --> 00:42:04,139 center screen Center point was we want 1090 00:42:04,139 --> 00:42:05,699 the camera to always be looking at that 1091 00:42:05,699 --> 00:42:09,109 right and that's one way we could do it 1092 00:42:09,109 --> 00:42:12,689 I'm not sure if that's the smartest way 1093 00:42:12,689 --> 00:42:14,900 to do it or not 1094 00:42:14,900 --> 00:42:18,420 yeah it's really hard to say so one way 1095 00:42:18,420 --> 00:42:20,400 I mean you know let's let's put in 1096 00:42:20,400 --> 00:42:23,100 something let's put in something even 1097 00:42:23,100 --> 00:42:25,350 simpler let's say we've got this diff 1098 00:42:25,350 --> 00:42:29,880 this diff function here right like so 1099 00:42:29,880 --> 00:42:32,000 oops 1100 00:42:32,000 --> 00:42:34,050 in fact I guess we don't even really 1101 00:42:34,050 --> 00:42:35,310 need the diff function now that I think 1102 00:42:35,310 --> 00:42:38,670 about it well I guess we can you know 1103 00:42:38,670 --> 00:42:39,420 kind of want it 1104 00:42:39,420 --> 00:42:40,470 we can't probably do want the 1105 00:42:40,470 --> 00:42:42,630 dysfunction I don't know it's difficult 1106 00:42:42,630 --> 00:42:45,630 to say but I guess what we'll do for now 1107 00:42:45,630 --> 00:42:48,660 is say all right when the when the we do 1108 00:42:48,660 --> 00:42:52,140 the subtraction here then basically what 1109 00:42:52,140 --> 00:42:56,010 I'm gonna do is say if the the Delta X 1110 00:42:56,010 --> 00:42:59,160 is greater than a certain amount then 1111 00:42:59,160 --> 00:43:01,200 I'm going to go ahead and move the 1112 00:43:01,200 --> 00:43:03,630 camera forwards and if it's less than a 1113 00:43:03,630 --> 00:43:06,090 certain amount right I'm gonna move the 1114 00:43:06,090 --> 00:43:08,130 camera backwards I'm just gonna see how 1115 00:43:08,130 --> 00:43:11,400 that works out so basically how far is 1116 00:43:11,400 --> 00:43:13,530 it well I'd say it's it's that seventeen 1117 00:43:13,530 --> 00:43:15,600 by two number again right if the if he 1118 00:43:15,600 --> 00:43:17,850 moves basically more than one screens 1119 00:43:17,850 --> 00:43:20,900 worth away then he'll we'll go ahead and 1120 00:43:20,900 --> 00:43:25,080 do the change so I don't know let's see 1121 00:43:25,080 --> 00:43:26,600 what that number actually ends up being 1122 00:43:26,600 --> 00:43:30,030 if I have seventeen tiles across as I 1123 00:43:30,030 --> 00:43:31,680 think what we said it was normally on 1124 00:43:31,680 --> 00:43:34,710 the thing and so that's eight point five 1125 00:43:34,710 --> 00:43:38,100 is the midpoint so eight tiles in the 1126 00:43:38,100 --> 00:43:40,350 eighth tile right we have seven tiles on 1127 00:43:40,350 --> 00:43:42,000 one side seven tiles on the other side 1128 00:43:42,000 --> 00:43:44,250 and then the middle tile right so 1129 00:43:44,250 --> 00:43:47,130 basically if you were to get let's say 1130 00:43:47,130 --> 00:43:50,370 nine tiles away if you were to get nine 1131 00:43:50,370 --> 00:43:51,930 tiles away from the camera on the 1132 00:43:51,930 --> 00:43:54,450 x-direction that would be too many and 1133 00:43:54,450 --> 00:43:56,520 we'd want to flip to the next screen so 1134 00:43:56,520 --> 00:43:58,650 what we could do is say all right let's 1135 00:43:58,650 --> 00:44:02,490 take 9.0 F is the number times the tile 1136 00:44:02,490 --> 00:44:05,700 side and meters right and that is 1137 00:44:05,700 --> 00:44:09,210 basically going to tell us side in 1138 00:44:09,210 --> 00:44:10,890 meters that's gonna say that the player 1139 00:44:10,890 --> 00:44:13,860 moved too far away from the camera right 1140 00:44:13,860 --> 00:44:16,740 I'm just gonna go ahead and do that like 1141 00:44:16,740 --> 00:44:20,060 so and let's just see what that gets us 1142 00:44:20,060 --> 00:44:22,710 again we got to go upstairs first cuz we 1143 00:44:22,710 --> 00:44:24,630 can't get out of this room so we go out 1144 00:44:24,630 --> 00:44:27,360 it out there and then we go here 1145 00:44:27,360 --> 00:44:36,060 and oh that that is not oh well that did 1146 00:44:36,060 --> 00:44:38,130 exactly what I told him to do we're 1147 00:44:38,130 --> 00:44:41,490 supposed to move the full 17 tiles but 1148 00:44:41,490 --> 00:44:43,530 for some reason I only had it move one 1149 00:44:43,530 --> 00:44:46,020 tile which is not really gonna help us 1150 00:44:46,020 --> 00:44:48,000 here just say the least 1151 00:44:48,000 --> 00:44:51,570 alright let's try that again my bad that 1152 00:44:51,570 --> 00:44:53,070 was the house that was not very bright 1153 00:44:53,070 --> 00:44:56,100 so yes if I go out here now we should 1154 00:44:56,100 --> 00:44:57,930 see me come back on the other side which 1155 00:44:57,930 --> 00:45:00,510 is exactly what happens and that's all 1156 00:45:00,510 --> 00:45:02,670 good again we still we have to go fix 1157 00:45:02,670 --> 00:45:03,960 our problems so that this doesn't happen 1158 00:45:03,960 --> 00:45:06,180 so that's the next thing to do and then 1159 00:45:06,180 --> 00:45:08,040 we also have to fix up and down so here 1160 00:45:08,040 --> 00:45:10,290 we go I can walk out here and then I can 1161 00:45:10,290 --> 00:45:15,600 kind of walk up here and this is the 1162 00:45:15,600 --> 00:45:16,920 place where we would like to go off the 1163 00:45:16,920 --> 00:45:18,600 screen so again 1164 00:45:18,600 --> 00:45:20,520 hey man since we got live code editing I 1165 00:45:20,520 --> 00:45:21,660 don't have to walk all the way back 1166 00:45:21,660 --> 00:45:23,250 there I can just go ahead and say let's 1167 00:45:23,250 --> 00:45:25,710 duplicate this and so since it's 9:00 in 1168 00:45:25,710 --> 00:45:26,940 the direction I guess that would mean it 1169 00:45:26,940 --> 00:45:29,910 was 4:00 here is the tile sided meters 1170 00:45:29,910 --> 00:45:33,230 and so the dy is going to basically do 1171 00:45:33,230 --> 00:45:39,440 this right and that should give us some 1172 00:45:39,440 --> 00:45:43,170 better motion up and down as well right 1173 00:45:43,170 --> 00:45:45,390 so when we walk off the end there oh 1174 00:45:45,390 --> 00:45:47,730 okay so it's actually sorry it's not for 1175 00:45:47,730 --> 00:45:50,130 its 5:00 I just I was happening there 1176 00:45:50,130 --> 00:45:52,650 but we were right it's because we didn't 1177 00:45:52,650 --> 00:45:55,350 encompass that extra tile when we walked 1178 00:45:55,350 --> 00:45:57,750 on to that tile we were in neither 1179 00:45:57,750 --> 00:46:00,510 camera space the camera constantly would 1180 00:46:00,510 --> 00:46:02,130 flip back and forth going oh I'm too far 1181 00:46:02,130 --> 00:46:03,870 away oh I'm too far away oh I'm too far 1182 00:46:03,870 --> 00:46:06,300 away so you actually have to do yeah all 1183 00:46:06,300 --> 00:46:08,670 the way to the end of that fifth tile or 1184 00:46:08,670 --> 00:46:10,740 at least in the middle of it in order to 1185 00:46:10,740 --> 00:46:13,500 not have that sort of problem all right 1186 00:46:13,500 --> 00:46:15,750 so I believe we can now walk all around 1187 00:46:15,750 --> 00:46:19,250 the world with our guy which is nice so 1188 00:46:19,250 --> 00:46:22,530 it's good it's kind of a happy little 1189 00:46:22,530 --> 00:46:24,570 fellow what he's determined you know 1190 00:46:24,570 --> 00:46:26,430 he's happy but he's determined you know 1191 00:46:26,430 --> 00:46:29,520 that's how he is so anyway he's gonna go 1192 00:46:29,520 --> 00:46:32,010 up there let's go up there see here go 1193 00:46:32,010 --> 00:46:34,290 through here yeah so everything's nice 1194 00:46:34,290 --> 00:46:37,230 and happy everything's good no 1195 00:46:37,230 --> 00:46:39,480 complaints alright so basically all we 1196 00:46:39,480 --> 00:46:40,710 really need to do now to 1197 00:46:40,710 --> 00:46:42,750 to get ourselves back to a place that's 1198 00:46:42,750 --> 00:46:44,520 pretty stable for him walking around to 1199 00:46:44,520 --> 00:46:46,230 where we can start to talk about wanting 1200 00:46:46,230 --> 00:46:48,990 his movement code to be better is is you 1201 00:46:48,990 --> 00:46:53,460 know I'm I'm walking out there and I'm 1202 00:46:53,460 --> 00:46:54,990 clipping against the screen here we just 1203 00:46:54,990 --> 00:46:56,339 need to make sure that we do the math 1204 00:46:56,339 --> 00:46:58,109 right for for clipping off that edge of 1205 00:46:58,109 --> 00:46:59,820 the screen I think we already do the 1206 00:46:59,820 --> 00:47:01,080 math right for clipping off the other 1207 00:47:01,080 --> 00:47:03,150 edge of the screen meaning that if I was 1208 00:47:03,150 --> 00:47:05,310 gonna go down I think that works 1209 00:47:05,310 --> 00:47:08,430 properly like so for example going off 1210 00:47:08,430 --> 00:47:11,670 the screen this way just works right so 1211 00:47:11,670 --> 00:47:14,300 that's all fine but it's that it's that 1212 00:47:14,300 --> 00:47:17,010 it's not coming in off the min that we 1213 00:47:17,010 --> 00:47:19,080 haven't done yet so let's go ahead and 1214 00:47:19,080 --> 00:47:24,240 do that and draw bitmap let's go ahead 1215 00:47:24,240 --> 00:47:27,450 and make sure that this function now 1216 00:47:27,450 --> 00:47:29,310 properly handles that you notice that to 1217 00:47:29,310 --> 00:47:31,320 do here that we left in there which is 1218 00:47:31,320 --> 00:47:32,640 source rotates to be changed based on 1219 00:47:32,640 --> 00:47:34,859 clipping and so that's the problem so 1220 00:47:34,859 --> 00:47:37,170 basically what happens is our rectangle 1221 00:47:37,170 --> 00:47:39,570 that we're bleeding does properly get 1222 00:47:39,570 --> 00:47:41,280 clipped so we don't overwrite memory or 1223 00:47:41,280 --> 00:47:42,750 do anything bad like that but what we're 1224 00:47:42,750 --> 00:47:44,960 not doing is advancing the source row 1225 00:47:44,960 --> 00:47:48,570 and the basically that starting pointer 1226 00:47:48,570 --> 00:47:50,460 for where we're copying the pixels we 1227 00:47:50,460 --> 00:47:53,040 need to advance that by however much we 1228 00:47:53,040 --> 00:47:55,260 clipped the left and top edges of this 1229 00:47:55,260 --> 00:47:57,740 bitmap so basically this part right here 1230 00:47:57,740 --> 00:48:00,300 when we do this we need to basically 1231 00:48:00,300 --> 00:48:03,150 save an offset value we need to save us 1232 00:48:03,150 --> 00:48:05,940 like a source offset X and we need to 1233 00:48:05,940 --> 00:48:09,000 save a source offset Y just tell us why 1234 00:48:09,000 --> 00:48:11,130 we should be fetching pixels further in 1235 00:48:11,130 --> 00:48:13,170 because we aren't drawing the ones that 1236 00:48:13,170 --> 00:48:15,540 are off the screen right and to make 1237 00:48:15,540 --> 00:48:17,400 that a little clearer for folks who 1238 00:48:17,400 --> 00:48:19,099 haven't done this sort of thing before 1239 00:48:19,099 --> 00:48:22,710 when we're normally drawing right what's 1240 00:48:22,710 --> 00:48:24,480 happening is if we're clipping off the 1241 00:48:24,480 --> 00:48:26,460 other side of the screen we don't have 1242 00:48:26,460 --> 00:48:28,440 to adjust the point where we copy from 1243 00:48:28,440 --> 00:48:31,290 right all we do is copy less so when we 1244 00:48:31,290 --> 00:48:33,420 copy a row if we started here all we 1245 00:48:33,420 --> 00:48:35,070 have to know is we'll stop copying 1246 00:48:35,070 --> 00:48:37,470 before you know before you would have 1247 00:48:37,470 --> 00:48:38,640 otherwise which would be all the way out 1248 00:48:38,640 --> 00:48:41,369 here but if we were to clip off the min 1249 00:48:41,369 --> 00:48:43,020 edges of the screen right in the case 1250 00:48:43,020 --> 00:48:44,700 like this where we're clipping off both 1251 00:48:44,700 --> 00:48:47,070 of the minimum edges then we can't start 1252 00:48:47,070 --> 00:48:48,570 copying from here we actually need to 1253 00:48:48,570 --> 00:48:51,000 start copying from here and so we 1254 00:48:51,000 --> 00:48:52,770 weren't doing that and so obviously we 1255 00:48:52,770 --> 00:48:53,519 were going to have the 1256 00:48:53,519 --> 00:48:54,869 graphical glitches because what was 1257 00:48:54,869 --> 00:48:56,640 gonna happen is we were gonna start 1258 00:48:56,640 --> 00:48:58,919 copying from here but we were gonna draw 1259 00:48:58,919 --> 00:49:00,989 it to here which basically gives a 1260 00:49:00,989 --> 00:49:03,569 phantom translation of our bitmap down 1261 00:49:03,569 --> 00:49:06,899 and to the right and it makes it look 1262 00:49:06,899 --> 00:49:08,549 like it stops early because this is 1263 00:49:08,549 --> 00:49:10,679 still the clipping for it so it's it 1264 00:49:10,679 --> 00:49:12,359 basically translated our guy this way 1265 00:49:12,359 --> 00:49:14,369 and clipped him so he would just you'd 1266 00:49:14,369 --> 00:49:15,839 see like his head like there when his 1267 00:49:15,839 --> 00:49:17,309 head should be up here off screen and 1268 00:49:17,309 --> 00:49:19,559 his body should be here right so all we 1269 00:49:19,559 --> 00:49:21,479 need to do is just advance that pointer 1270 00:49:21,479 --> 00:49:23,519 pre advance that pointer to the right 1271 00:49:23,519 --> 00:49:26,130 location and that will totally fix the 1272 00:49:26,130 --> 00:49:28,079 bug that we have so all we need to do 1273 00:49:28,079 --> 00:49:31,199 here is basically go alright we have 1274 00:49:31,199 --> 00:49:33,449 this which is our source row but we 1275 00:49:33,449 --> 00:49:35,609 could go ahead right now and update it 1276 00:49:35,609 --> 00:49:38,339 to say that whatever our set X is we'll 1277 00:49:38,339 --> 00:49:40,049 move that many pixels in and whatever 1278 00:49:40,049 --> 00:49:42,509 our offset Y is we'll multiply that by 1279 00:49:42,509 --> 00:49:45,239 the bitmap with right and that will 1280 00:49:45,239 --> 00:49:47,729 offset it by that number of rows so that 1281 00:49:47,729 --> 00:49:49,919 way we'll get you know the the row 1282 00:49:49,919 --> 00:49:51,539 offset and the column offset we're all 1283 00:49:51,539 --> 00:49:53,759 good there so all we need to do now is 1284 00:49:53,759 --> 00:49:55,409 actually store them and of course it's 1285 00:49:55,409 --> 00:49:57,630 whatever it was whatever this value was 1286 00:49:57,630 --> 00:50:02,339 that this negative value is how is we 1287 00:50:02,339 --> 00:50:04,199 want to offset by the off up the 1288 00:50:04,199 --> 00:50:07,529 opposite of that right so there we go 1289 00:50:07,529 --> 00:50:10,349 and now we should be copying this guy 1290 00:50:10,349 --> 00:50:12,569 well or we'll just go ahead and just 1291 00:50:12,569 --> 00:50:15,269 straight up crash because it's 1292 00:50:15,269 --> 00:50:17,039 amateur programming our here on handmade 1293 00:50:17,039 --> 00:50:19,229 hero apparently I don't know exactly 1294 00:50:19,229 --> 00:50:22,099 what it did there oh right because 1295 00:50:22,099 --> 00:50:25,139 because I forgot that this bitmap is 1296 00:50:25,139 --> 00:50:27,749 bottom up right so basically we have to 1297 00:50:27,749 --> 00:50:30,899 actually go down we have to actually 1298 00:50:30,899 --> 00:50:33,630 subtract for each of the the source 1299 00:50:33,630 --> 00:50:36,989 offsets yeah not not not the brightest 1300 00:50:36,989 --> 00:50:39,419 move by KC it's true but again a lot of 1301 00:50:39,419 --> 00:50:41,099 this stuff is just since this is test 1302 00:50:41,099 --> 00:50:42,899 code you can't expect me to remember all 1303 00:50:42,899 --> 00:50:44,669 that stuff when we actually are doing 1304 00:50:44,669 --> 00:50:46,380 the full render code a lot of this will 1305 00:50:46,380 --> 00:50:48,659 be more commented and more directly will 1306 00:50:48,659 --> 00:50:50,249 have boil it down more and then you can 1307 00:50:50,249 --> 00:50:51,959 get mad at me so I'm not gonna Alice 1308 00:50:51,959 --> 00:50:53,489 shame that that was not an Alice shame 1309 00:50:53,489 --> 00:50:55,229 moment my opinion I'm gonna give myself 1310 00:50:55,229 --> 00:50:58,349 a bye on that one all right so anyway I 1311 00:50:58,349 --> 00:51:00,419 think our dude is pretty much okay now 1312 00:51:00,419 --> 00:51:02,130 you can see how he flips properly now 1313 00:51:02,130 --> 00:51:04,019 off either edge of the screen so that's 1314 00:51:04,019 --> 00:51:06,719 all good we'll try it on up as well just 1315 00:51:06,719 --> 00:51:06,930 in 1316 00:51:06,930 --> 00:51:09,240 sure that yep that's all good up and 1317 00:51:09,240 --> 00:51:12,680 down seeming to be good there no issues 1318 00:51:12,680 --> 00:51:17,880 yeah yeah everything is fine okay so he 1319 00:51:17,880 --> 00:51:19,680 can go adventure around are very sparse 1320 00:51:19,680 --> 00:51:21,990 and not particular interesting world but 1321 00:51:21,990 --> 00:51:24,059 at least everything is working the way 1322 00:51:24,059 --> 00:51:26,190 that we think that it should and so 1323 00:51:26,190 --> 00:51:26,760 that's good 1324 00:51:26,760 --> 00:51:28,800 that's all very nice and good the other 1325 00:51:28,800 --> 00:51:30,089 thing that we probably should do at some 1326 00:51:30,089 --> 00:51:31,339 point here is check our framerate 1327 00:51:31,339 --> 00:51:34,050 because of course at the current moment 1328 00:51:34,050 --> 00:51:36,000 you know we have we're doing this 1329 00:51:36,000 --> 00:51:37,950 rendering code without any optimizations 1330 00:51:37,950 --> 00:51:40,020 it's not Cindy it's not optimized at all 1331 00:51:40,020 --> 00:51:42,119 it's it's crazy and so we should 1332 00:51:42,119 --> 00:51:44,849 probably verify that all this crazy 1333 00:51:44,849 --> 00:51:46,829 stuff that we did without any thought to 1334 00:51:46,829 --> 00:51:48,150 the performance of it whatsoever and 1335 00:51:48,150 --> 00:51:49,589 we're not again we're also not even 1336 00:51:49,589 --> 00:51:51,960 using GPU so we're at a severe 1337 00:51:51,960 --> 00:51:54,540 disadvantage performance wise here so we 1338 00:51:54,540 --> 00:51:55,650 should actually just go and check 1339 00:51:55,650 --> 00:51:57,930 because we still haven't had a chance to 1340 00:51:57,930 --> 00:52:00,030 do anything in terms of a heads-up 1341 00:52:00,030 --> 00:52:01,680 display for ourselves I just want to 1342 00:52:01,680 --> 00:52:04,500 take a quick second to look to see what 1343 00:52:04,500 --> 00:52:07,290 our frame rate actually is in practice 1344 00:52:07,290 --> 00:52:10,079 so let's take a look at that and it 1345 00:52:10,079 --> 00:52:11,549 looks like we're still okay we are 1346 00:52:11,549 --> 00:52:13,950 hitting that that that 30 frames per 1347 00:52:13,950 --> 00:52:16,680 second goal and so we are we are in good 1348 00:52:16,680 --> 00:52:19,980 shape all right even with all of that 1349 00:52:19,980 --> 00:52:22,290 pig enos so I think that's about 1350 00:52:22,290 --> 00:52:23,849 everything that I wanted to do today I 1351 00:52:23,849 --> 00:52:25,260 can't think if there's anything else 1352 00:52:25,260 --> 00:52:26,700 that I thought that I needed to do I 1353 00:52:26,700 --> 00:52:28,470 don't think so 1354 00:52:28,470 --> 00:52:31,260 so maybe let's go ahead and go to the 1355 00:52:31,260 --> 00:52:33,510 Q&A a little bit early and trying to 1356 00:52:33,510 --> 00:52:34,859 think if there's anything else oh well 1357 00:52:34,859 --> 00:52:36,240 you know what there is one thing we 1358 00:52:36,240 --> 00:52:39,000 could do that I wanted to mention I 1359 00:52:39,000 --> 00:52:40,650 mentioned this in the forums to people 1360 00:52:40,650 --> 00:52:41,819 because they were having trouble with it 1361 00:52:41,819 --> 00:52:42,930 and I just hadn't had time to do it 1362 00:52:42,930 --> 00:52:44,700 myself we could just throw it at the end 1363 00:52:44,700 --> 00:52:47,760 here and that is that since we're doing 1364 00:52:47,760 --> 00:52:49,650 our live code loading sometimes the 1365 00:52:49,650 --> 00:52:52,200 problem a problem happens with Microsoft 1366 00:52:52,200 --> 00:52:54,960 Visual Studio which is that when the 1367 00:52:54,960 --> 00:52:57,210 compiler writes out the executable it 1368 00:52:57,210 --> 00:52:59,069 sometimes writes a suitable first and 1369 00:52:59,069 --> 00:53:00,630 the PVV second well I think it always 1370 00:53:00,630 --> 00:53:02,819 actually does that and and so the PDB 1371 00:53:02,819 --> 00:53:04,290 actually finishes writing after the 1372 00:53:04,290 --> 00:53:06,270 executable finishes writing in this case 1373 00:53:06,270 --> 00:53:08,369 I should say DLL because it's the DLL 1374 00:53:08,369 --> 00:53:10,230 that we actually care about so we write 1375 00:53:10,230 --> 00:53:12,359 that DLL out and then the PDB gets 1376 00:53:12,359 --> 00:53:14,970 written out when our hot loader goes to 1377 00:53:14,970 --> 00:53:17,760 load the executable in it will load that 1378 00:53:17,760 --> 00:53:19,260 executable almost immediately because 1379 00:53:19,260 --> 00:53:19,990 remember 1380 00:53:19,990 --> 00:53:22,030 you know 30 frames a second here so 1381 00:53:22,030 --> 00:53:23,980 what's gonna load it very very soon and 1382 00:53:23,980 --> 00:53:25,869 the PDB sometimes hasn't finished 1383 00:53:25,869 --> 00:53:27,670 writing so what will happen is Visual 1384 00:53:27,670 --> 00:53:29,619 Studio will fail to load the PDB and 1385 00:53:29,619 --> 00:53:30,940 then we can't set our breakpoints and 1386 00:53:30,940 --> 00:53:32,710 stuff right because the PvP is still 1387 00:53:32,710 --> 00:53:35,050 open for writing so what I wanted to do 1388 00:53:35,050 --> 00:53:36,220 is to show a little trick that we could 1389 00:53:36,220 --> 00:53:37,960 do here to avoid that problem people 1390 00:53:37,960 --> 00:53:39,250 were having trouble with this on the 1391 00:53:39,250 --> 00:53:40,450 forums and I told them how to fix it but 1392 00:53:40,450 --> 00:53:41,680 I figured people on the stream should 1393 00:53:41,680 --> 00:53:43,780 know as well and that's basically just 1394 00:53:43,780 --> 00:53:45,790 to create a lock file so all we really 1395 00:53:45,790 --> 00:53:48,369 have to do is just in in the direct in 1396 00:53:48,369 --> 00:53:49,930 the directory where we're going to put 1397 00:53:49,930 --> 00:53:52,930 that DLL right all we really need to do 1398 00:53:52,930 --> 00:53:55,720 is we just need to put a lock file in 1399 00:53:55,720 --> 00:53:58,720 there and so we can say waiting for TVB 1400 00:53:58,720 --> 00:54:03,640 and we can put that out to like lock 1401 00:54:03,640 --> 00:54:06,160 temp or something and then when we are 1402 00:54:06,160 --> 00:54:08,349 done we'll delete that lock that temp 1403 00:54:08,349 --> 00:54:10,930 file right and that lock dot temp file 1404 00:54:10,930 --> 00:54:13,119 basically just says don't load right now 1405 00:54:13,119 --> 00:54:15,339 because whatever you're going to load is 1406 00:54:15,339 --> 00:54:17,470 going to be stale and so if we look at 1407 00:54:17,470 --> 00:54:18,970 what happens if I do that when I'm doing 1408 00:54:18,970 --> 00:54:21,430 this compile here it's probably hard to 1409 00:54:21,430 --> 00:54:23,920 see because you can't actually we 1410 00:54:23,920 --> 00:54:27,040 probably can't catch it in time well you 1411 00:54:27,040 --> 00:54:28,270 know what I could do I might be able to 1412 00:54:28,270 --> 00:54:30,099 I might be able to show it here I'm not 1413 00:54:30,099 --> 00:54:32,170 sure if I will or will or will not be 1414 00:54:32,170 --> 00:54:35,230 able to catch it but essentially if you 1415 00:54:35,230 --> 00:54:38,859 think about it this way where's my build 1416 00:54:38,859 --> 00:54:45,280 up at and made that I don't know if you 1417 00:54:45,280 --> 00:54:46,570 can see it show up there at uh loops 1418 00:54:46,570 --> 00:54:50,589 that's not right that I don't know if 1419 00:54:50,589 --> 00:54:52,000 you can see it show up there probably 1420 00:54:52,000 --> 00:54:54,550 not yeah never actually it never 1421 00:54:54,550 --> 00:54:58,240 actually boots forth does it see if I 1422 00:54:58,240 --> 00:55:01,030 can get it to go there it was block of 1423 00:55:01,030 --> 00:55:03,430 time and if you can see that pause the 1424 00:55:03,430 --> 00:55:05,080 stream anyway there's a lock top temp 1425 00:55:05,080 --> 00:55:06,580 file now that gets created there and 1426 00:55:06,580 --> 00:55:09,940 that lock temp file will not get deleted 1427 00:55:09,940 --> 00:55:13,630 hopefully until after the PDB is loaded 1428 00:55:13,630 --> 00:55:15,099 because the compiler will have returned 1429 00:55:15,099 --> 00:55:19,510 entirely at that time so once we know 1430 00:55:19,510 --> 00:55:21,400 that there is that lock file in place 1431 00:55:21,400 --> 00:55:22,900 that's just a dummy file that's there to 1432 00:55:22,900 --> 00:55:24,670 let us know when that thing started and 1433 00:55:24,670 --> 00:55:28,390 ended right what I can do is I can go 1434 00:55:28,390 --> 00:55:30,970 ahead and just test to see if the lock 1435 00:55:30,970 --> 00:55:32,470 file is there and assume that whatever 1436 00:55:32,470 --> 00:55:33,850 compilation has to be go 1437 00:55:33,850 --> 00:55:35,830 on no matter how complicated this thing 1438 00:55:35,830 --> 00:55:38,020 gets will always wait and we won't 1439 00:55:38,020 --> 00:55:39,790 delete the lock file until all the 1440 00:55:39,790 --> 00:55:40,780 things that we need to have happen 1441 00:55:40,780 --> 00:55:42,760 before the hot loading occurs have 1442 00:55:42,760 --> 00:55:46,870 occurred right and so when we do that 1443 00:55:46,870 --> 00:55:48,850 sort of low game code thing I don't even 1444 00:55:48,850 --> 00:55:50,620 remember where that is at this point 1445 00:55:50,620 --> 00:55:55,150 it's a little game code what we'll do is 1446 00:55:55,150 --> 00:55:57,130 we can actually say when we go to load 1447 00:55:57,130 --> 00:56:00,910 that game code I think this thing 1448 00:56:00,910 --> 00:56:02,860 actually sets let's see here 1449 00:56:02,860 --> 00:56:06,010 yeah this thing gets the DLL last right 1450 00:56:06,010 --> 00:56:07,540 time so what we could do is when we 1451 00:56:07,540 --> 00:56:09,250 actually go to load the game code we 1452 00:56:09,250 --> 00:56:10,630 could check to make sure that the lock 1453 00:56:10,630 --> 00:56:13,960 file is not there right and we have two 1454 00:56:13,960 --> 00:56:16,270 places technically we could do that we 1455 00:56:16,270 --> 00:56:18,490 could do that really in either position 1456 00:56:18,490 --> 00:56:21,100 and I don't know which one we would like 1457 00:56:21,100 --> 00:56:27,190 to do it's really hard to say I think we 1458 00:56:27,190 --> 00:56:29,110 probably just want to do it here so I 1459 00:56:29,110 --> 00:56:31,870 think what we want to do and why is this 1460 00:56:31,870 --> 00:56:33,340 still there I believe we are getting the 1461 00:56:33,340 --> 00:56:35,710 proper path I think we're doing both of 1462 00:56:35,710 --> 00:56:37,390 those two do's we need to go check to 1463 00:56:37,390 --> 00:56:38,740 make sure if we haven't have a lot of - 1464 00:56:38,740 --> 00:56:39,850 duze lying around they don't have to be 1465 00:56:39,850 --> 00:56:41,560 there so basically what we could do 1466 00:56:41,560 --> 00:56:45,580 right here is just go ahead and and do 1467 00:56:45,580 --> 00:56:48,340 the if right here to see whether or not 1468 00:56:48,340 --> 00:56:51,820 that lock file actually exists and so I 1469 00:56:51,820 --> 00:56:53,410 think the easiest way to do that is just 1470 00:56:53,410 --> 00:56:58,330 to do like maybe a get file attributes 1471 00:56:58,330 --> 00:56:59,860 or something like that let me see what 1472 00:56:59,860 --> 00:57:04,810 the easiest way is to do that in to see 1473 00:57:04,810 --> 00:57:07,270 whether that that file exists I think 1474 00:57:07,270 --> 00:57:14,140 actually which you file exists I don't 1475 00:57:14,140 --> 00:57:18,340 actually know path file exists I don't 1476 00:57:18,340 --> 00:57:19,960 think that's a good I don't think that's 1477 00:57:19,960 --> 00:57:23,070 actually the function that we want 1478 00:57:23,070 --> 00:57:27,250 Windows 2000 professional requires 1479 00:57:27,250 --> 00:57:28,780 sloppy yeah I don't I don't actually 1480 00:57:28,780 --> 00:57:30,820 know if we want that doesn't seem like a 1481 00:57:30,820 --> 00:57:31,480 good thing 1482 00:57:31,480 --> 00:57:33,570 get file attributes might be the easiest 1483 00:57:33,570 --> 00:57:37,270 get file attributes e^x let's see about 1484 00:57:37,270 --> 00:57:40,480 that guy I could also look I don't think 1485 00:57:40,480 --> 00:57:41,860 there's ever follows this function I 1486 00:57:41,860 --> 00:57:44,760 think there is but we could double check 1487 00:57:44,760 --> 00:57:48,150 exists path exists copy file now so 1488 00:57:48,150 --> 00:57:49,170 let's go ahead and use get file 1489 00:57:49,170 --> 00:57:51,120 attributes e^x and basically that should 1490 00:57:51,120 --> 00:57:53,790 return false if we can't actually get it 1491 00:57:53,790 --> 00:57:56,070 right so we'll just call well literally 1492 00:57:56,070 --> 00:58:00,170 just call this thing right like so and 1493 00:58:00,170 --> 00:58:03,360 if it actually if it actually was there 1494 00:58:03,360 --> 00:58:05,600 then we'll be good to go 1495 00:58:05,600 --> 00:58:10,460 this okay so what we need to do here is 1496 00:58:10,460 --> 00:58:13,560 we need to have that file name whatever 1497 00:58:13,560 --> 00:58:15,540 that file name actually has to be and so 1498 00:58:15,540 --> 00:58:16,710 it's going to be source dealing on a 1499 00:58:16,710 --> 00:58:18,780 temp dealing them and lock file name 1500 00:58:18,780 --> 00:58:21,780 right like that and so we'll go ahead 1501 00:58:21,780 --> 00:58:23,130 and pass that lock file name now 1502 00:58:23,130 --> 00:58:25,650 whenever we do a winter cue load code we 1503 00:58:25,650 --> 00:58:35,100 need to do lock bold path and all right 1504 00:58:35,100 --> 00:58:37,950 this is a game code lock full path bat 1505 00:58:37,950 --> 00:58:42,210 source game code DLL and so here I 1506 00:58:42,210 --> 00:58:44,880 should just be able to do temp that with 1507 00:58:44,880 --> 00:58:50,850 LOC there we go lock full path and 1508 00:58:50,850 --> 00:58:55,470 that's I think just called it block dot 1509 00:58:55,470 --> 00:59:00,630 temp and there we go so I think oops I 1510 00:59:00,630 --> 00:59:03,480 think that should be sufficient I'm not 1511 00:59:03,480 --> 00:59:05,730 sure I think it is and so let's take a 1512 00:59:05,730 --> 00:59:08,220 look so if I go in here 1513 00:59:08,220 --> 00:59:10,740 well evidently not oh I did it backwards 1514 00:59:10,740 --> 00:59:14,070 again get file attributes so it's 1515 00:59:14,070 --> 00:59:16,230 basically if not it's supposed to be if 1516 00:59:16,230 --> 00:59:20,040 we don't see the file it should load and 1517 00:59:20,040 --> 00:59:22,410 so I think that should be fine but let 1518 00:59:22,410 --> 00:59:23,760 me just test to make sure that we still 1519 00:59:23,760 --> 00:59:29,280 have our hot loading enabled so okay 1520 00:59:29,280 --> 00:59:33,890 let's go got this guy going I'll make a 1521 00:59:33,890 --> 00:59:36,540 new frame maybe Oh 1522 00:59:36,540 --> 00:59:38,640 the hideous colors maybe I won't make a 1523 00:59:38,640 --> 00:59:41,130 new frame so I'll just move this guy 1524 00:59:41,130 --> 00:59:44,100 down here I guess we could go ahead and 1525 00:59:44,100 --> 00:59:48,090 and do a loop for now let's go ahead and 1526 00:59:48,090 --> 00:59:50,920 make him go up here 1527 00:59:50,920 --> 00:59:57,560 okay and so I don't know what do we want 1528 00:59:57,560 --> 00:59:59,990 to do let's see if our live code editing 1529 00:59:59,990 --> 01:00:01,970 will live code edit him to go backwards 1530 01:00:01,970 --> 01:00:06,130 instead so I'll go in here to handmade 1531 01:00:06,130 --> 01:00:09,770 dot CPP and go to the facing Direction 1532 01:00:09,770 --> 01:00:12,020 stuff and basically I'll just say oh 1533 01:00:12,020 --> 01:00:14,210 yeah whenever he's going to the right 1534 01:00:14,210 --> 01:00:16,640 let's actually make him face left and 1535 01:00:16,640 --> 01:00:17,530 vice versa 1536 01:00:17,530 --> 01:00:24,790 yeah there we go so should be good yeah 1537 01:00:24,790 --> 01:00:27,200 yeah all right 1538 01:00:27,200 --> 01:00:33,349 I'm satisfied okay so I believe we now 1539 01:00:33,349 --> 01:00:35,900 do need to go back to our originally 1540 01:00:35,900 --> 01:00:37,340 scheduled program we're a little bit 1541 01:00:37,340 --> 01:00:40,340 over now three minutes over the QA now 1542 01:00:40,340 --> 01:00:42,560 that we have taken care of that I think 1543 01:00:42,560 --> 01:00:45,950 everything is is is kosher now with that 1544 01:00:45,950 --> 01:00:49,520 yes I believe it is so let us go ahead 1545 01:00:49,520 --> 01:00:51,650 and go to the QA now that we've finished 1546 01:00:51,650 --> 01:00:55,010 that if you would like to have me answer 1547 01:00:55,010 --> 01:00:56,690 a question please put Q colon in front 1548 01:00:56,690 --> 01:00:59,599 of it so that I will see it I and that 1549 01:00:59,599 --> 01:01:01,190 starts now anything that you've put 1550 01:01:01,190 --> 01:01:02,930 already that's Q : 1551 01:01:02,930 --> 01:01:04,460 I won't see it's anything that starts 1552 01:01:04,460 --> 01:01:07,339 now and has a Q : in front of it I will 1553 01:01:07,339 --> 01:01:09,410 I will take a look at and please try to 1554 01:01:09,410 --> 01:01:10,400 keep the questions two things that 1555 01:01:10,400 --> 01:01:12,800 happened on today's stream or previous 1556 01:01:12,800 --> 01:01:15,920 streams so please try to save off-topic 1557 01:01:15,920 --> 01:01:17,240 questions or things about what we're 1558 01:01:17,240 --> 01:01:19,010 going to do in the future for pre 1559 01:01:19,010 --> 01:01:20,420 streams I try to show up about 15 1560 01:01:20,420 --> 01:01:22,220 minutes early to most streams I can't 1561 01:01:22,220 --> 01:01:24,950 always make it but I try to and I answer 1562 01:01:24,950 --> 01:01:26,900 off-topic questions at that time so if 1563 01:01:26,900 --> 01:01:28,130 you're interested in asking off-topic 1564 01:01:28,130 --> 01:01:30,770 questions that's totally fine but come 1565 01:01:30,770 --> 01:01:32,960 before the stream to do those most the 1566 01:01:32,960 --> 01:01:34,820 time I try to be here before them so 1567 01:01:34,820 --> 01:01:45,700 yeah let's see 1568 01:01:45,700 --> 01:01:48,559 genetic species can you do that live 1569 01:01:48,559 --> 01:01:51,109 code with a function call that could 1570 01:01:51,109 --> 01:01:54,499 just be a poke hmm I'm sorry I'm not 1571 01:01:54,499 --> 01:01:57,950 sure what that means can you do that 1572 01:01:57,950 --> 01:02:00,859 live code with the function call could 1573 01:02:00,859 --> 01:02:01,849 you be more specific 1574 01:02:01,849 --> 01:02:06,890 perhaps let's see he numeration x' and i 1575 01:02:06,890 --> 01:02:08,450 correct to say you've not used them in 1576 01:02:08,450 --> 01:02:10,039 handmade hero yet I'm guessing this is 1577 01:02:10,039 --> 01:02:11,299 simply because it's too early to know 1578 01:02:11,299 --> 01:02:12,910 what will eventually require a new 1579 01:02:12,910 --> 01:02:15,079 enumerations and not some other reason 1580 01:02:15,079 --> 01:02:18,619 uh did we really never use an enum that 1581 01:02:18,619 --> 01:02:20,809 may be true we may never yes so we 1582 01:02:20,809 --> 01:02:23,059 haven't ever I do use enums I'm not 1583 01:02:23,059 --> 01:02:24,200 avoiding them for any particular reason 1584 01:02:24,200 --> 01:02:27,559 we just haven't had like sets of types 1585 01:02:27,559 --> 01:02:29,569 or anything probably when we do like 1586 01:02:29,569 --> 01:02:31,009 entities you know our entity types might 1587 01:02:31,009 --> 01:02:32,809 be an enumeration or something like that 1588 01:02:32,809 --> 01:02:35,089 you know but yeah I'm not avoiding them 1589 01:02:35,089 --> 01:02:36,410 we just I guess they just haven't come 1590 01:02:36,410 --> 01:02:39,979 up yet why not layer the individual body 1591 01:02:39,979 --> 01:02:41,569 parts into a single bitmap that way you 1592 01:02:41,569 --> 01:02:43,430 only have to draw one image instead of 1593 01:02:43,430 --> 01:02:47,019 three well that's a very good question 1594 01:02:47,019 --> 01:02:49,759 and hopefully this is a very good answer 1595 01:02:49,759 --> 01:02:53,900 for you I want him to be very bouncy so 1596 01:02:53,900 --> 01:02:56,089 I want him to kind of hop along and I 1597 01:02:56,089 --> 01:02:58,640 want the three parts to kind of do this 1598 01:02:58,640 --> 01:03:01,729 sort of a thing right so I asked 1599 01:03:01,729 --> 01:03:03,589 young-shin to make sure that they were 1600 01:03:03,589 --> 01:03:05,059 separate so that he could kind of be 1601 01:03:05,059 --> 01:03:07,160 like a little springy guy that Springs 1602 01:03:07,160 --> 01:03:10,249 around and in addition to like squashing 1603 01:03:10,249 --> 01:03:12,019 and stretching the bitmaps I also want 1604 01:03:12,019 --> 01:03:13,609 them to move relative to each other if 1605 01:03:13,609 --> 01:03:15,469 that makes sense to really kind of give 1606 01:03:15,469 --> 01:03:20,359 that sense of of you know motion are you 1607 01:03:20,359 --> 01:03:21,589 wearing a blue cape like the handmade 1608 01:03:21,589 --> 01:03:22,099 hero today 1609 01:03:22,099 --> 01:03:24,440 no it's not a cape it's just a shirt I 1610 01:03:24,440 --> 01:03:26,479 don't actually have a cape a handmade 1611 01:03:26,479 --> 01:03:28,869 hero cape 1612 01:03:28,869 --> 01:03:31,910 let's see I just wanted to point out 1613 01:03:31,910 --> 01:03:33,410 there is a magnifying tool in Windows 1614 01:03:33,410 --> 01:03:35,420 that came with air oh yes it's true 1615 01:03:35,420 --> 01:03:38,779 unfortunately it's really hard to use at 1616 01:03:38,779 --> 01:03:39,950 least I find it hard to use 1617 01:03:39,950 --> 01:03:42,349 I like this other tool called zoom in 1618 01:03:42,349 --> 01:03:44,349 which I just haven't gotten around to 1619 01:03:44,349 --> 01:03:49,099 finding I don't know where it is I may 1620 01:03:49,099 --> 01:03:50,630 have to copy it from like an old version 1621 01:03:50,630 --> 01:03:53,539 of Microsoft developer studio or 1622 01:03:53,539 --> 01:03:55,819 something but it was so much easier to 1623 01:03:55,819 --> 01:03:58,130 use than the than the one that 1624 01:03:58,130 --> 01:04:02,960 came with than the one that they ship 1625 01:04:02,960 --> 01:04:08,780 now let's see what they've got this zoom 1626 01:04:08,780 --> 01:04:14,390 in I don't know if this is someone 1627 01:04:14,390 --> 01:04:16,790 else's stupid zoom in I want the actual 1628 01:04:16,790 --> 01:04:19,700 I want the actual zoom in that used to 1629 01:04:19,700 --> 01:04:22,160 come with the dev tools so there used to 1630 01:04:22,160 --> 01:04:30,650 be one and Microsoft SDK tools yeah yeah 1631 01:04:30,650 --> 01:04:33,470 I'll have to go hunt for it I'll have to 1632 01:04:33,470 --> 01:04:36,170 go hunt hunt for it because that's the 1633 01:04:36,170 --> 01:04:38,720 one I actually want I expose that could 1634 01:04:38,720 --> 01:04:41,570 use color cop in fact maybe I should 1635 01:04:41,570 --> 01:04:42,980 just use color cop because color cops 1636 01:04:42,980 --> 01:04:46,090 pretty awesome 1637 01:04:46,090 --> 01:04:53,930 yeah yeah but looks like it doesn't do 1638 01:04:53,930 --> 01:04:58,340 real-time oh well yeah I don't know I 1639 01:04:58,340 --> 01:05:00,200 want to go get that zoom in tool because 1640 01:05:00,200 --> 01:05:01,370 I don't like the one that comes there 1641 01:05:01,370 --> 01:05:02,570 and that's why I haven't been using it 1642 01:05:02,570 --> 01:05:08,320 it's too hard to use in my opinion 1643 01:05:08,320 --> 01:05:10,760 Andy's SD don't you want tested bugging 1644 01:05:10,760 --> 01:05:12,500 um you can't really we'll just have to 1645 01:05:12,500 --> 01:05:14,000 see if we no longer hit the problem 1646 01:05:14,000 --> 01:05:16,190 because there's no way to tell whether 1647 01:05:16,190 --> 01:05:19,010 or not we just got lucky you just you so 1648 01:05:19,010 --> 01:05:20,150 you just have to you have to test it 1649 01:05:20,150 --> 01:05:21,800 like lots of times you can't write 1650 01:05:21,800 --> 01:05:24,740 because it was only sometimes that MSV 1651 01:05:24,740 --> 01:05:26,990 see didn't actually do the reload so I 1652 01:05:26,990 --> 01:05:28,370 just wanted to test just that much and 1653 01:05:28,370 --> 01:05:29,990 then we'll see as we go forward if we 1654 01:05:29,990 --> 01:05:32,180 have if we have the problem where it 1655 01:05:32,180 --> 01:05:38,990 can't set breakpoints 1656 01:05:38,990 --> 01:05:42,200 girl and a bloom oh no I swore I didn't 1657 01:05:42,200 --> 01:05:46,130 mean to swear oh that's the second time 1658 01:05:46,130 --> 01:05:49,069 oh my goodness I don't know even what I 1659 01:05:49,069 --> 01:05:50,900 said that's how bad of a swear that was 1660 01:05:50,900 --> 01:05:55,880 that's awful okay I'm trying to keep 1661 01:05:55,880 --> 01:05:59,800 this the language okay for four kids and 1662 01:05:59,800 --> 01:06:02,630 you know normally I swear a lot I will 1663 01:06:02,630 --> 01:06:04,400 tell you so it's it's been rather 1664 01:06:04,400 --> 01:06:08,119 difficult can you add a standard def 1665 01:06:08,119 --> 01:06:09,530 include two handmade platform about 1666 01:06:09,530 --> 01:06:13,130 eight sure I can do that in fact people 1667 01:06:13,130 --> 01:06:14,569 have been asking for a few things in 1668 01:06:14,569 --> 01:06:16,819 here one was to get standard def in 1669 01:06:16,819 --> 01:06:19,700 there so that platforms could get some 1670 01:06:19,700 --> 01:06:23,270 platforms want that for size T this guy 1671 01:06:23,270 --> 01:06:26,720 right here and so that but the any other 1672 01:06:26,720 --> 01:06:28,220 thing people were asking for is they 1673 01:06:28,220 --> 01:06:29,809 were asking if maybe the utility 1674 01:06:29,809 --> 01:06:31,040 functions could be moved in there 1675 01:06:31,040 --> 01:06:32,720 because they were having trouble 1676 01:06:32,720 --> 01:06:35,210 compiling well in fact you can kind of 1677 01:06:35,210 --> 01:06:37,099 see what they are basically we're still 1678 01:06:37,099 --> 01:06:40,940 using handmade H in win32 and so what I 1679 01:06:40,940 --> 01:06:43,609 could do is I could I could force it to 1680 01:06:43,609 --> 01:06:46,700 stop doing that and and just do handmade 1681 01:06:46,700 --> 01:06:48,640 platform that age and that would tell us 1682 01:06:48,640 --> 01:06:51,049 what our what our stuff is that we're 1683 01:06:51,049 --> 01:06:55,520 missing right and so we would need to 1684 01:06:55,520 --> 01:06:59,720 move in basically all of this stuff for 1685 01:06:59,720 --> 01:07:01,250 the most part so we would need to move 1686 01:07:01,250 --> 01:07:04,730 in to the platform layer all of this 1687 01:07:04,730 --> 01:07:12,349 code I think probably let's see here in 1688 01:07:12,349 --> 01:07:14,750 there I don't know what else and get 1689 01:07:14,750 --> 01:07:17,900 controller so get controller or would 1690 01:07:17,900 --> 01:07:19,549 have to be in there as well where is 1691 01:07:19,549 --> 01:07:21,410 gate controller so those are the things 1692 01:07:21,410 --> 01:07:23,000 that the platform layer was currently 1693 01:07:23,000 --> 01:07:25,250 calling and I don't know that I really 1694 01:07:25,250 --> 01:07:26,960 want all of those in the platform data H 1695 01:07:26,960 --> 01:07:30,020 at the end of the day oops move that 1696 01:07:30,020 --> 01:07:35,660 down a little bit and so yeah I don't 1697 01:07:35,660 --> 01:07:37,069 know if I want all of those things in 1698 01:07:37,069 --> 01:07:38,869 there that that may not be the best idea 1699 01:07:38,869 --> 01:07:41,000 but at least now we can pile clean so 1700 01:07:41,000 --> 01:07:42,049 people who are reporting to other 1701 01:07:42,049 --> 01:07:44,210 platforms can go ahead and do that so 1702 01:07:44,210 --> 01:07:45,319 hopefully that helps them out a little 1703 01:07:45,319 --> 01:07:47,150 bit just making sure that they see our 1704 01:07:47,150 --> 01:07:50,119 win32 layer just only includes handmade 1705 01:07:50,119 --> 01:07:51,230 platform that age 1706 01:07:51,230 --> 01:07:52,550 and that's a little more consistent and 1707 01:07:52,550 --> 01:07:57,140 make it a little easier for them why 1708 01:07:57,140 --> 01:08:05,690 does the guy have no feet well I mean if 1709 01:08:05,690 --> 01:08:11,390 you look that right there should tell 1710 01:08:11,390 --> 01:08:18,410 you why he has no feet how do you know 1711 01:08:18,410 --> 01:08:21,200 which compiler options like CLR and 1712 01:08:21,200 --> 01:08:29,270 standard headers you want to use um I'm 1713 01:08:29,270 --> 01:08:32,210 not sure what you mean by that exactly I 1714 01:08:32,210 --> 01:08:35,870 mean essentially my general rule for for 1715 01:08:35,870 --> 01:08:37,700 standard headers and compilers is that 1716 01:08:37,700 --> 01:08:39,020 you want to include everything in the 1717 01:08:39,020 --> 01:08:41,089 platform layer and you want to include 1718 01:08:41,089 --> 01:08:44,000 as little as possible in the main code 1719 01:08:44,000 --> 01:08:46,910 so you you would ideally I feel like you 1720 01:08:46,910 --> 01:08:52,219 wouldn't want any includes in the in the 1721 01:08:52,219 --> 01:08:53,810 stuff that that gets actually included 1722 01:08:53,810 --> 01:08:56,120 in the game but the bottom line is 1723 01:08:56,120 --> 01:08:58,460 that's not actually physically possible 1724 01:08:58,460 --> 01:09:00,020 most the time because you need to get a 1725 01:09:00,020 --> 01:09:01,460 little bit of information I mean you 1726 01:09:01,460 --> 01:09:03,049 could duplicate what was basically 1727 01:09:03,049 --> 01:09:05,660 happening in these headers so you could 1728 01:09:05,660 --> 01:09:06,380 do that 1729 01:09:06,380 --> 01:09:07,790 but for the most part what you're trying 1730 01:09:07,790 --> 01:09:09,410 to do is minimize the stuff that you're 1731 01:09:09,410 --> 01:09:11,719 including to only be definitions of 1732 01:09:11,719 --> 01:09:14,330 stuff that you actually need in terms of 1733 01:09:14,330 --> 01:09:15,650 types but you don't want to include 1734 01:09:15,650 --> 01:09:17,420 anything else for the most part that's 1735 01:09:17,420 --> 01:09:19,460 the way I usually like to do it because 1736 01:09:19,460 --> 01:09:21,170 I like to make sure that all of my code 1737 01:09:21,170 --> 01:09:22,850 is in my code and then I don't call out 1738 01:09:22,850 --> 01:09:24,259 into the library for anything so that I 1739 01:09:24,259 --> 01:09:26,359 know absolutely everything that's going 1740 01:09:26,359 --> 01:09:27,980 on and I can guarantee that everything's 1741 01:09:27,980 --> 01:09:31,130 portable and so on and so forth but yeah 1742 01:09:31,130 --> 01:09:31,910 that's just me 1743 01:09:31,910 --> 01:09:34,850 in terms of in general how you decide 1744 01:09:34,850 --> 01:09:36,290 what you want to do it's whatever you 1745 01:09:36,290 --> 01:09:37,819 want to use like I mean if you want to 1746 01:09:37,819 --> 01:09:38,960 use stuff 1747 01:09:38,960 --> 01:09:43,759 I mean basically the way to to know 1748 01:09:43,759 --> 01:09:45,859 about size T is just that if you go to 1749 01:09:45,859 --> 01:09:50,000 any kind of reference on C++ or C you 1750 01:09:50,000 --> 01:09:52,549 can kind of see like what it gets what 1751 01:09:52,549 --> 01:09:54,440 you need to include to use it so for 1752 01:09:54,440 --> 01:09:56,030 example in C++ if you're using the 1753 01:09:56,030 --> 01:09:58,250 standard size T it tells you here like 1754 01:09:58,250 --> 01:09:59,810 that's the include that that comes with 1755 01:09:59,810 --> 01:10:04,400 if you're looking at the the C library 1756 01:10:04,400 --> 01:10:08,090 I know where that would be exactly I 1757 01:10:08,090 --> 01:10:14,489 know who says where that is 1758 01:10:14,489 --> 01:10:16,659 here you go there to find the header 1759 01:10:16,659 --> 01:10:19,060 file standard def dot H so you kind of 1760 01:10:19,060 --> 01:10:20,440 have to go hunting for them or you can 1761 01:10:20,440 --> 01:10:23,199 search in your C compilers include 1762 01:10:23,199 --> 01:10:24,400 directory to try to find where they are 1763 01:10:24,400 --> 01:10:26,139 but it can be a little hairy when you're 1764 01:10:26,139 --> 01:10:27,429 like I want to use this language feature 1765 01:10:27,429 --> 01:10:29,860 where is it right so I don't know so I 1766 01:10:29,860 --> 01:10:30,969 don't know if that's exactly what you 1767 01:10:30,969 --> 01:10:34,150 were asking if you want to ask a more 1768 01:10:34,150 --> 01:10:35,679 specifically I can try to answer it 1769 01:10:35,679 --> 01:10:46,380 maybe perhaps a little bit better 1770 01:10:46,380 --> 01:10:48,850 changing the literal value of a variable 1771 01:10:48,850 --> 01:10:51,219 is a peek and poke technique poking a 1772 01:10:51,219 --> 01:10:56,560 value into a memory address oh I see 1773 01:10:56,560 --> 01:11:00,159 what you're asking okay yes for the live 1774 01:11:00,159 --> 01:11:03,190 code it is not poke based for what 1775 01:11:03,190 --> 01:11:06,040 you're saying it is full-on live code so 1776 01:11:06,040 --> 01:11:08,440 for example what we were doing there is 1777 01:11:08,440 --> 01:11:10,389 when like for example you're moving this 1778 01:11:10,389 --> 01:11:13,869 guy around we could actually you know 1779 01:11:13,869 --> 01:11:16,420 change the code to do anything we wanted 1780 01:11:16,420 --> 01:11:18,369 we could we could change it to do 1781 01:11:18,369 --> 01:11:20,380 absolutely anything so for example we 1782 01:11:20,380 --> 01:11:22,480 could just go into the actual code where 1783 01:11:22,480 --> 01:11:25,510 the guy was was being drawn right in the 1784 01:11:25,510 --> 01:11:28,360 draw bitmap code and we could just pull 1785 01:11:28,360 --> 01:11:31,810 on you know draw more heads right I mean 1786 01:11:31,810 --> 01:11:34,179 if we wanted to we could just we could 1787 01:11:34,179 --> 01:11:36,310 just do you know anything and there's a 1788 01:11:36,310 --> 01:11:38,290 second head on the guy maybe we could we 1789 01:11:38,290 --> 01:11:40,060 could go in and say we want to draw lots 1790 01:11:40,060 --> 01:11:42,670 of heads on the guy head count our head 1791 01:11:42,670 --> 01:11:43,690 index equals zero 1792 01:11:43,690 --> 01:11:45,670 head index is less than 10 plus plus 1793 01:11:45,670 --> 01:11:48,369 head index and then you know you get 1794 01:11:48,369 --> 01:11:50,500 into this kind of a situation where you 1795 01:11:50,500 --> 01:11:51,969 just have so many heads you don't really 1796 01:11:51,969 --> 01:11:54,960 know oops I mean header in that head 1797 01:11:54,960 --> 01:11:58,770 like so right and this is still all 1798 01:11:58,770 --> 01:12:02,380 running you know totally fine and you 1799 01:12:02,380 --> 01:12:04,060 can like I do the loop live code editing 1800 01:12:04,060 --> 01:12:06,130 thing that I was doing before where the 1801 01:12:06,130 --> 01:12:08,050 dude kind of does whatever he's thing is 1802 01:12:08,050 --> 01:12:10,330 that he does and that can be running all 1803 01:12:10,330 --> 01:12:12,760 the while if you want to right and so I 1804 01:12:12,760 --> 01:12:15,670 can switch up what I'm doing here I can 1805 01:12:15,670 --> 01:12:17,440 I can remove that and just draw one of 1806 01:12:17,440 --> 01:12:21,340 them right like that I could I could do 1807 01:12:21,340 --> 01:12:23,619 anything I wanted to so yeah we've got 1808 01:12:23,619 --> 01:12:26,050 we've got pretty much as as 1809 01:12:26,050 --> 01:12:28,719 Hardcore live code editing as you can 1810 01:12:28,719 --> 01:12:30,460 get in a reasonable amount of time I 1811 01:12:30,460 --> 01:12:32,530 have some harder core stuff where you 1812 01:12:32,530 --> 01:12:33,840 can actually change data structure 1813 01:12:33,840 --> 01:12:38,170 layouts that I've done in the past but 1814 01:12:38,170 --> 01:12:40,150 that's a huge thing that would take many 1815 01:12:40,150 --> 01:12:41,920 hours of explaining on the stream so I 1816 01:12:41,920 --> 01:12:44,320 decided not to do that one but we've 1817 01:12:44,320 --> 01:12:46,030 basically got as hardcore as you can go 1818 01:12:46,030 --> 01:12:50,230 without that so yeah it's pretty awesome 1819 01:12:50,230 --> 01:12:52,210 too we haven't had that a lot of chance 1820 01:12:52,210 --> 01:12:54,579 to use it yet because we're not tuning 1821 01:12:54,579 --> 01:12:56,619 stuff at this point really where this 1822 01:12:56,619 --> 01:12:58,300 becomes really great and we'll see this 1823 01:12:58,300 --> 01:12:59,920 possibly next week or maybe the week 1824 01:12:59,920 --> 01:13:03,369 after is when you're trying to tune like 1825 01:13:03,369 --> 01:13:05,170 the feel of an animation like in that 1826 01:13:05,170 --> 01:13:07,059 movement code or whatever being able to 1827 01:13:07,059 --> 01:13:08,230 do this where you can just see them 1828 01:13:08,230 --> 01:13:09,849 walking around and tune it and tune it 1829 01:13:09,849 --> 01:13:11,530 and tune it is it's pretty awesome so 1830 01:13:11,530 --> 01:13:23,340 I'm looking forward to that 1831 01:13:23,340 --> 01:13:26,050 what will happen if you have an item 1832 01:13:26,050 --> 01:13:28,420 that is in front in one view but in the 1833 01:13:28,420 --> 01:13:30,670 back on another since it seems you've 1834 01:13:30,670 --> 01:13:32,110 hard-coded the order in which they're 1835 01:13:32,110 --> 01:13:34,210 drawn will you reorder them based on the 1836 01:13:34,210 --> 01:13:35,920 view or some other rendering technique 1837 01:13:35,920 --> 01:13:41,710 so it depends largely I suspect that the 1838 01:13:41,710 --> 01:13:45,550 way your okay so this is just some code 1839 01:13:45,550 --> 01:13:48,670 that we put in here I feel like I say 1840 01:13:48,670 --> 01:13:50,310 this a lot but I guess it doesn't 1841 01:13:50,310 --> 01:13:54,340 necessarily often come through all of 1842 01:13:54,340 --> 01:13:56,320 this is test code none of the code that 1843 01:13:56,320 --> 01:13:58,810 we have written in anything in here will 1844 01:13:58,810 --> 01:14:01,030 actually get used right it's all 1845 01:14:01,030 --> 01:14:04,990 spec'ing out our game engine so we will 1846 01:14:04,990 --> 01:14:06,940 not be drawing the player anything like 1847 01:14:06,940 --> 01:14:09,280 this in the shipping version of the game 1848 01:14:09,280 --> 01:14:12,100 right it will literally bear absolutely 1849 01:14:12,100 --> 01:14:13,900 no resemblance to going on what's going 1850 01:14:13,900 --> 01:14:15,850 on here all of the stuff we are learning 1851 01:14:15,850 --> 01:14:17,230 in that I'm explaining while we go 1852 01:14:17,230 --> 01:14:19,870 through it will absolutely be important 1853 01:14:19,870 --> 01:14:22,180 because we are every single last thing 1854 01:14:22,180 --> 01:14:23,650 that we've learned here will be crucial 1855 01:14:23,650 --> 01:14:27,640 in our making the engine good but none 1856 01:14:27,640 --> 01:14:30,030 of this is how you'd actually do it so 1857 01:14:30,030 --> 01:14:32,710 when I say that I'm just drawing a 1858 01:14:32,710 --> 01:14:34,060 couple things in here so we can put the 1859 01:14:34,060 --> 01:14:35,790 hero in that's literally what I mean 1860 01:14:35,790 --> 01:14:38,470 what we will actually be doing is will 1861 01:14:38,470 --> 01:14:40,150 actually have a number of ways in which 1862 01:14:40,150 --> 01:14:41,440 things actually get sorted into the 1863 01:14:41,440 --> 01:14:43,360 scene and you'll see that once we 1864 01:14:43,360 --> 01:14:44,650 actually get to the point where we have 1865 01:14:44,650 --> 01:14:46,390 a renderer as opposed to just some test 1866 01:14:46,390 --> 01:14:51,430 code that sense why don't use the Emacs 1867 01:14:51,430 --> 01:14:53,290 calc the reason is actually cuz I have 1868 01:14:53,290 --> 01:14:55,900 not bound a key to it yet I only just 1869 01:14:55,900 --> 01:14:58,630 figured out that was there like 1870 01:14:58,630 --> 01:15:01,240 accidentally on the basic Emacs ik Emacs 1871 01:15:01,240 --> 01:15:02,710 has so much stuff in it that I only know 1872 01:15:02,710 --> 01:15:04,660 like 0.5% of the things that are in 1873 01:15:04,660 --> 01:15:06,700 there and so I need to remember to buy 1874 01:15:06,700 --> 01:15:08,260 the key to it eventually so that I can 1875 01:15:08,260 --> 01:15:10,090 just quickly hit it in calc so I get 1876 01:15:10,090 --> 01:15:12,220 meta X quick cash cow blah blah blah 1877 01:15:12,220 --> 01:15:14,650 takes too long but yeah I'm gonna buy 1878 01:15:14,650 --> 01:15:23,000 the key to at some point 1879 01:15:23,000 --> 01:15:26,699 oh so I'm going to sing that maybe I can 1880 01:15:26,699 --> 01:15:34,559 get zoom in at sysinternals calm is that 1881 01:15:34,559 --> 01:15:37,139 true 1882 01:15:37,139 --> 01:15:46,670 Salinas Utilities zoom it zoom it is 1883 01:15:46,670 --> 01:15:56,800 different than zoom in 1884 01:15:56,800 --> 01:16:02,159 interesting 1885 01:16:02,159 --> 01:16:03,969 huh 1886 01:16:03,969 --> 01:16:05,380 well to be honest with you though I'm 1887 01:16:05,380 --> 01:16:07,620 kind of curious about that and since I 1888 01:16:07,620 --> 01:16:10,750 obviously love mark russinovich I I 1889 01:16:10,750 --> 01:16:12,670 might be inclined to take a look at that 1890 01:16:12,670 --> 01:16:16,810 guy I did kind of want zoom in but zoom 1891 01:16:16,810 --> 01:16:18,160 it sounds like fun 1892 01:16:18,160 --> 01:16:20,620 I will say so maybe we'll check that out 1893 01:16:20,620 --> 01:16:23,050 yeah all right thank you for for 1894 01:16:23,050 --> 01:16:25,210 mentioning that yeah that could be 1895 01:16:25,210 --> 01:16:27,610 useful let's go ahead and close that 1896 01:16:27,610 --> 01:16:36,310 down there when you panned off the mint 1897 01:16:36,310 --> 01:16:37,930 edges can you explain how the head was 1898 01:16:37,930 --> 01:16:45,370 redrawing over the body so redrawing 1899 01:16:45,370 --> 01:16:48,400 over the body I'm not sure what you mean 1900 01:16:48,400 --> 01:16:53,430 by the head was redrawing over the body 1901 01:16:53,430 --> 01:16:55,750 well I mean I can sort of just quickly 1902 01:16:55,750 --> 01:16:57,880 go through what was happening there and 1903 01:16:57,880 --> 01:17:00,850 hopefully answer the question as part of 1904 01:17:00,850 --> 01:17:03,880 that so and just for the the fellow who 1905 01:17:03,880 --> 01:17:06,040 was asking about how extensive are our 1906 01:17:06,040 --> 01:17:08,670 live code editing was I will go ahead 1907 01:17:08,670 --> 01:17:13,860 and and introduce a bug in the code 1908 01:17:13,860 --> 01:17:19,930 while it's live there we go all right so 1909 01:17:19,930 --> 01:17:21,580 I'm going to turn off the loops live 1910 01:17:21,580 --> 01:17:25,449 code editing here and go ahead and and 1911 01:17:25,449 --> 01:17:26,890 get us to a point where we could 1912 01:17:26,890 --> 01:17:30,730 actually see that that happening so this 1913 01:17:30,730 --> 01:17:33,940 is what was happening right you can see 1914 01:17:33,940 --> 01:17:36,130 that bug now that I've commented out the 1915 01:17:36,130 --> 01:17:39,730 line so the head wasn't redrawing over 1916 01:17:39,730 --> 01:17:41,560 the body that was not actually what's 1917 01:17:41,560 --> 01:17:44,650 happening what's happening is once we 1918 01:17:44,650 --> 01:17:46,360 hit the minimum edge of the screen right 1919 01:17:46,360 --> 01:17:48,730 so remember the bitmap is bigger here 1920 01:17:48,730 --> 01:17:50,260 because it's just a bunch of alpha empty 1921 01:17:50,260 --> 01:17:52,180 alpha around that guy once we hit the 1922 01:17:52,180 --> 01:17:54,190 edge of the screen and we keep going 1923 01:17:54,190 --> 01:17:56,350 forward what we're essentially doing is 1924 01:17:56,350 --> 01:17:58,900 we've we are now clipping the blit 1925 01:17:58,900 --> 01:18:00,699 rectangle like the blitt rectangle is 1926 01:18:00,699 --> 01:18:04,270 like this big right and in fact you know 1927 01:18:04,270 --> 01:18:05,949 what I could do to just to show this to 1928 01:18:05,949 --> 01:18:08,920 you I could go ahead and right in here 1929 01:18:08,920 --> 01:18:12,760 the our channel always on for example 1930 01:18:12,760 --> 01:18:15,010 like I could do something like this 1931 01:18:15,010 --> 01:18:17,070 right 1932 01:18:17,070 --> 01:18:22,860 oh but I have to do it just for dudes 1933 01:18:22,860 --> 01:18:26,050 just for the little dude there mmm hmm 1934 01:18:26,050 --> 01:18:27,160 how do I want to do that 1935 01:18:27,160 --> 01:18:29,680 well the way I could do that is say if I 1936 01:18:29,680 --> 01:18:33,340 was clipped I suppose so I could do I 1937 01:18:33,340 --> 01:18:40,090 could I could do it this way if what did 1938 01:18:40,090 --> 01:18:44,860 I call that variable source offset so if 1939 01:18:44,860 --> 01:18:48,090 source offset X or a source offset Y 1940 01:18:48,090 --> 01:18:55,900 draw the red channel oops so what I've 1941 01:18:55,900 --> 01:18:57,640 done is I've made it so that you can see 1942 01:18:57,640 --> 01:18:59,860 the entire area of the blip once it 1943 01:18:59,860 --> 01:19:01,630 starts clipping when it clips off the 1944 01:19:01,630 --> 01:19:04,030 minimum edge right so hopefully you can 1945 01:19:04,030 --> 01:19:06,010 see what happens I move up there and now 1946 01:19:06,010 --> 01:19:07,660 my rectangle is flush against the side 1947 01:19:07,660 --> 01:19:12,040 as I move further over our rectangle 1948 01:19:12,040 --> 01:19:14,170 properly clips to the size that it 1949 01:19:14,170 --> 01:19:16,120 should be it correctly sets the size of 1950 01:19:16,120 --> 01:19:19,780 the blit but it is not changing the 1951 01:19:19,780 --> 01:19:22,570 offset in the bitmap where it's copying 1952 01:19:22,570 --> 01:19:24,790 the values from so it's always copying 1953 01:19:24,790 --> 01:19:26,950 as if it were going to copy the whole 1954 01:19:26,950 --> 01:19:29,110 thing but it just gets clipped out 1955 01:19:29,110 --> 01:19:31,450 entirely right as that as the rectangle 1956 01:19:31,450 --> 01:19:32,980 shrinks and shrinks it's only copying 1957 01:19:32,980 --> 01:19:35,320 less and less so what we need to do to 1958 01:19:35,320 --> 01:19:37,750 fix that problem is we need to copy from 1959 01:19:37,750 --> 01:19:40,510 further in at the bitmap as we fall off 1960 01:19:40,510 --> 01:19:42,640 this edge of the screen we need to move 1961 01:19:42,640 --> 01:19:45,400 in on the source the place for copying 1962 01:19:45,400 --> 01:19:48,250 from we need to move in so that he moves 1963 01:19:48,250 --> 01:19:50,290 over even though he's only copying a 1964 01:19:50,290 --> 01:19:52,060 little bit so it's copying this you know 1965 01:19:52,060 --> 01:19:54,160 this part from the rightmost edge of the 1966 01:19:54,160 --> 01:19:55,420 bitmap base so you could think about it 1967 01:19:55,420 --> 01:19:58,300 it's doing that right and so when that 1968 01:19:58,300 --> 01:20:02,800 happens right go ahead and turn the bug 1969 01:20:02,800 --> 01:20:05,160 off now what's going to happen is 1970 01:20:05,160 --> 01:20:07,090 essentially you could still see it's 1971 01:20:07,090 --> 01:20:09,040 only bleeding this this piece right it's 1972 01:20:09,040 --> 01:20:10,470 only blending that rectangle right there 1973 01:20:10,470 --> 01:20:13,090 but what it's doing is it's skipping 1974 01:20:13,090 --> 01:20:15,250 when it copies a row it's skipping the 1975 01:20:15,250 --> 01:20:18,960 first end pixels where n is however many 1976 01:20:18,960 --> 01:20:21,790 however far off the edge we were right 1977 01:20:21,790 --> 01:20:23,920 and so that allows him to move all the 1978 01:20:23,920 --> 01:20:26,260 way off right so does that make a little 1979 01:20:26,260 --> 01:20:29,230 more sense right we didn't have to do 1980 01:20:29,230 --> 01:20:30,610 that when we were clipping on the other 1981 01:20:30,610 --> 01:20:32,290 side of the screen because on the other 1982 01:20:32,290 --> 01:20:34,389 side of the screen we're going from the 1983 01:20:34,389 --> 01:20:36,670 left to the right when we copy a row so 1984 01:20:36,670 --> 01:20:39,159 all we had to do is stop early so the 1985 01:20:39,159 --> 01:20:42,010 this this for loop that's going to a max 1986 01:20:42,010 --> 01:20:44,860 X when we clip the max X that just that 1987 01:20:44,860 --> 01:20:46,270 just works that just solves the problem 1988 01:20:46,270 --> 01:20:46,810 right there 1989 01:20:46,810 --> 01:20:52,270 we set the max X right here right here 1990 01:20:52,270 --> 01:20:54,310 right when the max X is greater than the 1991 01:20:54,310 --> 01:20:55,630 buffer width so when the max X would be 1992 01:20:55,630 --> 01:20:57,940 off this edge we'd go ahead and stop it 1993 01:20:57,940 --> 01:20:59,980 and we set it to that that edge that's 1994 01:20:59,980 --> 01:21:01,239 all we need to do because we just 1995 01:21:01,239 --> 01:21:02,949 stopped copying the row right we just 1996 01:21:02,949 --> 01:21:04,540 stopped copying the row early that's it 1997 01:21:04,540 --> 01:21:07,960 right but when we're trying to move the 1998 01:21:07,960 --> 01:21:09,219 guy by clicking the keyboard when I'm 1999 01:21:09,219 --> 01:21:11,500 focused in the other window but on the 2000 01:21:11,500 --> 01:21:13,030 other edge it's not that simple because 2001 01:21:13,030 --> 01:21:14,949 if we were to just stop copying the row 2002 01:21:14,949 --> 01:21:17,020 early we get what we saw before where 2003 01:21:17,020 --> 01:21:19,719 the guy appears to stop again clamp 2004 01:21:19,719 --> 01:21:21,190 against that edge because it's still 2005 01:21:21,190 --> 01:21:23,199 copying the pixels from the beginning of 2006 01:21:23,199 --> 01:21:24,369 the bitmap where we don't want to copy 2007 01:21:24,369 --> 01:21:26,739 those pixels right so hopefully that 2008 01:21:26,739 --> 01:21:29,110 makes more sense I'll go ahead and 2009 01:21:29,110 --> 01:21:32,080 remove that there and there you go 2010 01:21:32,080 --> 01:21:42,760 so now we're back to normal oops can't 2011 01:21:42,760 --> 01:21:44,290 wait to do a better player movement code 2012 01:21:44,290 --> 01:21:45,429 it's awful trying to get through these 2013 01:21:45,429 --> 01:21:50,409 doors yeah I'm just like every time I 2014 01:21:50,409 --> 01:21:51,489 try to go through a drawer I'm like I 2015 01:21:51,489 --> 01:22:02,010 gotta fix that 2016 01:22:02,010 --> 01:22:04,150 do you ever write tests or does the 2017 01:22:04,150 --> 01:22:09,010 average game not have unit tests well so 2018 01:22:09,010 --> 01:22:10,480 you didn't test I've covered this a 2019 01:22:10,480 --> 01:22:11,440 couple times before I'll just say 2020 01:22:11,440 --> 01:22:13,360 quickly again unit tests aren't very 2021 01:22:13,360 --> 01:22:16,570 useful in games because that not many 2022 01:22:16,570 --> 01:22:18,250 things have the kind of well-defined 2023 01:22:18,250 --> 01:22:20,770 repeatability that you need to make unit 2024 01:22:20,770 --> 01:22:23,350 testing successful but sometimes you do 2025 01:22:23,350 --> 01:22:26,110 and so for like the renderer for example 2026 01:22:26,110 --> 01:22:28,450 where you that would probably be a place 2027 01:22:28,450 --> 01:22:32,710 where we do unit tests and we will have 2028 01:22:32,710 --> 01:22:34,780 some performance tests which look a lot 2029 01:22:34,780 --> 01:22:35,830 like unit tests they're not really 2030 01:22:35,830 --> 01:22:37,750 testing correctness as much as they're 2031 01:22:37,750 --> 01:22:39,430 testing speed so we'll have some of that 2032 01:22:39,430 --> 01:22:41,680 so you will see a little bit of that you 2033 01:22:41,680 --> 01:22:43,030 just don't see as much of it as you 2034 01:22:43,030 --> 01:22:45,700 could in other disciplines where the 2035 01:22:45,700 --> 01:22:47,290 state space is much simpler games have 2036 01:22:47,290 --> 01:22:50,020 huge state spaces that are that are very 2037 01:22:50,020 --> 01:22:51,880 different from the kinds of code that 2038 01:22:51,880 --> 01:22:55,480 that is usefully tested by unit tests 2039 01:22:55,480 --> 01:22:57,040 and so usually if you were doing unit 2040 01:22:57,040 --> 01:22:59,230 tests on a game you're often testing 2041 01:22:59,230 --> 01:23:00,670 things that don't really that aren't 2042 01:23:00,670 --> 01:23:02,860 really the hard part so you'd like your 2043 01:23:02,860 --> 01:23:04,690 bulletproofing your easy cases by 2044 01:23:04,690 --> 01:23:06,490 writing unit tests in most game code and 2045 01:23:06,490 --> 01:23:08,530 that doesn't really help you but there 2046 01:23:08,530 --> 01:23:10,090 are places where you can use it and we 2047 01:23:10,090 --> 01:23:11,680 will use it I suspect on the stream in a 2048 01:23:11,680 --> 01:23:12,970 couple of places we just haven't gotten 2049 01:23:12,970 --> 01:23:15,070 anything we're we're still doing 2050 01:23:15,070 --> 01:23:16,750 exploratory work on how we want the 2051 01:23:16,750 --> 01:23:18,430 engine designed and so until we get into 2052 01:23:18,430 --> 01:23:19,630 some code that we think that we're gonna 2053 01:23:19,630 --> 01:23:21,340 ship there's really not much that much 2054 01:23:21,340 --> 01:23:23,170 point in doing unit tests right because 2055 01:23:23,170 --> 01:23:24,040 you just kind of wasting your time 2056 01:23:24,040 --> 01:23:25,540 you're wasting your time bulletproofing 2057 01:23:25,540 --> 01:23:34,190 something that you're out playing ship 2058 01:23:34,190 --> 01:23:36,599 does this form of live coding work with 2059 01:23:36,599 --> 01:23:39,659 adding member variables to structs in 2060 01:23:39,659 --> 01:23:42,270 some cases yes in some cases no like I 2061 01:23:42,270 --> 01:23:44,520 said there's the harder data data layout 2062 01:23:44,520 --> 01:23:48,090 stuff is something we didn't do because 2063 01:23:48,090 --> 01:23:49,770 it was going to be a very much more 2064 01:23:49,770 --> 01:23:51,539 involved process to do that it involves 2065 01:23:51,539 --> 01:23:53,489 writing medic ode and stuff and so I 2066 01:23:53,489 --> 01:23:55,860 didn't want to do that but you can add 2067 01:23:55,860 --> 01:23:57,869 to like the end of structs in certain 2068 01:23:57,869 --> 01:24:00,840 situations but you can't rearrange data 2069 01:24:00,840 --> 01:24:02,789 members and the reason for that is 2070 01:24:02,789 --> 01:24:05,909 because well you I mean you could as 2071 01:24:05,909 --> 01:24:07,590 long as there weren't any of them in use 2072 01:24:07,590 --> 01:24:09,780 yet right but assuming that there are 2073 01:24:09,780 --> 01:24:11,820 ones in use they won't get remapped and 2074 01:24:11,820 --> 01:24:13,860 so what you need to do is you need to go 2075 01:24:13,860 --> 01:24:15,690 in and remap all of the ones that were 2076 01:24:15,690 --> 01:24:19,260 different now and we yes so we didn't 2077 01:24:19,260 --> 01:24:25,409 implement that how does this test code 2078 01:24:25,409 --> 01:24:26,909 help with the Future architecture since 2079 01:24:26,909 --> 01:24:29,219 it all gets dumped so basically what it 2080 01:24:29,219 --> 01:24:31,679 does is it will define exactly what we 2081 01:24:31,679 --> 01:24:35,610 want our engine to do I always say write 2082 01:24:35,610 --> 01:24:38,250 the usage code first and I really really 2083 01:24:38,250 --> 01:24:40,469 really mean that never write an engine 2084 01:24:40,469 --> 01:24:42,539 without knowing exactly how the game is 2085 01:24:42,539 --> 01:24:44,429 going to use that engine and that is 2086 01:24:44,429 --> 01:24:45,480 what we're doing right now so we're 2087 01:24:45,480 --> 01:24:46,949 basically just building a game doing 2088 01:24:46,949 --> 01:24:48,539 whatever it is that we want to do first 2089 01:24:48,539 --> 01:24:50,099 and then what we'll do is we'll just 2090 01:24:50,099 --> 01:24:52,770 kind of pull out those pieces and turn 2091 01:24:52,770 --> 01:24:55,710 them into real engine components as we 2092 01:24:55,710 --> 01:24:57,599 go and we already did a little bit of 2093 01:24:57,599 --> 01:24:59,159 that with our tile map we haven't done a 2094 01:24:59,159 --> 01:25:01,380 whole lot but we've already made the the 2095 01:25:01,380 --> 01:25:03,960 tile map stuff work kind of that way 2096 01:25:03,960 --> 01:25:05,219 where we've defined what it need to do 2097 01:25:05,219 --> 01:25:06,599 and we just haven't we haven't gone and 2098 01:25:06,599 --> 01:25:08,309 done like full hardcore engine stuff on 2099 01:25:08,309 --> 01:25:09,510 it yet but we did pull it out into a 2100 01:25:09,510 --> 01:25:11,070 little system and so that's the way 2101 01:25:11,070 --> 01:25:14,070 things will work so don't think of it as 2102 01:25:14,070 --> 01:25:16,409 dumping think of it as continually 2103 01:25:16,409 --> 01:25:18,539 evolving but the point that I'm trying 2104 01:25:18,539 --> 01:25:20,820 to make before was that none of the code 2105 01:25:20,820 --> 01:25:22,679 that we wrote as written will be what 2106 01:25:22,679 --> 01:25:23,820 ships in the game so you don't really 2107 01:25:23,820 --> 01:25:26,670 have to worry about it at that level you 2108 01:25:26,670 --> 01:25:28,559 just have to look at it and go okay what 2109 01:25:28,559 --> 01:25:30,150 does this do right now and why do we 2110 01:25:30,150 --> 01:25:32,190 want it to do that and what is what do 2111 01:25:32,190 --> 01:25:33,750 we need the engine to eventually do for 2112 01:25:33,750 --> 01:25:35,520 us in that case so the question that the 2113 01:25:35,520 --> 01:25:36,900 person asked about sorting is actually 2114 01:25:36,900 --> 01:25:38,159 totally fine to ask a little further 2115 01:25:38,159 --> 01:25:39,329 down the road when we're trying to 2116 01:25:39,329 --> 01:25:41,610 figure out how we want to do things 2117 01:25:41,610 --> 01:25:43,559 attached to guys so that they start 2118 01:25:43,559 --> 01:25:45,239 right and all those sorts of things but 2119 01:25:45,239 --> 01:25:46,679 you know that's not really 2120 01:25:46,679 --> 01:25:48,659 at this point we're not really trying to 2121 01:25:48,659 --> 01:25:49,679 solve those kind of problems right now 2122 01:25:49,679 --> 01:25:51,599 once we get to them we'll think about 2123 01:25:51,599 --> 01:25:52,800 how we want them solved we'll spec that 2124 01:25:52,800 --> 01:25:54,749 for the engine push it aside and off you 2125 01:25:54,749 --> 01:26:05,250 go 2126 01:26:05,250 --> 01:26:07,200 I'm not sure if this is true I'm 2127 01:26:07,200 --> 01:26:09,750 assuming you are making the guy clip 2128 01:26:09,750 --> 01:26:12,840 when leaving the screen but why make it 2129 01:26:12,840 --> 01:26:15,330 clip if you can just make it follow the 2130 01:26:15,330 --> 01:26:18,180 yellow box which might clip the guy 2131 01:26:18,180 --> 01:26:23,010 itself again I really sorry I'm not sure 2132 01:26:23,010 --> 01:26:26,880 I understand the question yeah I 2133 01:26:26,880 --> 01:26:28,110 apologize I'm not sure I understand the 2134 01:26:28,110 --> 01:26:30,480 question so I can't really add much to 2135 01:26:30,480 --> 01:26:38,010 that if streaming assets will be 2136 01:26:38,010 --> 01:26:39,330 required to display all visual 2137 01:26:39,330 --> 01:26:40,770 information will there be some type of 2138 01:26:40,770 --> 01:26:42,180 manual limit placed on a potential 2139 01:26:42,180 --> 01:26:43,860 generation to ensure that all assets 2140 01:26:43,860 --> 01:26:45,530 will never be required for a single room 2141 01:26:45,530 --> 01:26:47,700 well that's kind of getting ahead again 2142 01:26:47,700 --> 01:26:49,950 of where we are but the simple answer to 2143 01:26:49,950 --> 01:26:53,100 that is it depends on what our asset 2144 01:26:53,100 --> 01:26:55,320 plan is it depends whether our assets 2145 01:26:55,320 --> 01:27:00,030 have a degradation path or not though 2146 01:27:00,030 --> 01:27:02,970 end of questions right at the end of 2147 01:27:02,970 --> 01:27:06,330 questions how is that possible that is 2148 01:27:06,330 --> 01:27:10,460 just - that is a good omen people well 2149 01:27:10,460 --> 01:27:13,320 ladies and gentlemen thank you very much 2150 01:27:13,320 --> 01:27:15,630 for joining me for another episode of 2151 01:27:15,630 --> 01:27:17,340 hand made hero this was a pretty fun one 2152 01:27:17,340 --> 01:27:19,260 I'm kind of glad we have a little dude 2153 01:27:19,260 --> 01:27:21,030 moving around now that's a little bit 2154 01:27:21,030 --> 01:27:23,310 satisfying and it makes me want him to 2155 01:27:23,310 --> 01:27:25,620 have a nice sort of feel as he moves and 2156 01:27:25,620 --> 01:27:28,350 a nice animation as he moves around and 2157 01:27:28,350 --> 01:27:30,330 so I feel like that kind of answers my 2158 01:27:30,330 --> 01:27:31,950 question of what we should do next I 2159 01:27:31,950 --> 01:27:33,630 think I definitely do want to go ahead 2160 01:27:33,630 --> 01:27:36,030 and say let's animate the guy next and 2161 01:27:36,030 --> 01:27:39,060 make him have kind of a nice feel as you 2162 01:27:39,060 --> 01:27:41,910 move them around because that'll 2163 01:27:41,910 --> 01:27:44,430 basically let me start talking about the 2164 01:27:44,430 --> 01:27:46,740 math and let us get into some kind of 2165 01:27:46,740 --> 01:27:49,230 really interesting stuff yeah I think 2166 01:27:49,230 --> 01:27:50,730 that's that's that's what we want to do 2167 01:27:50,730 --> 01:27:52,770 so I think tomorrow what we'll do is 2168 01:27:52,770 --> 01:27:55,830 we'll end off well I'll take a look at 2169 01:27:55,830 --> 01:27:58,110 my sheet of stuff that we've postponed 2170 01:27:58,110 --> 01:28:00,150 tomorrow will basically be our final 2171 01:28:00,150 --> 01:28:01,260 clean-up day we'll just go through 2172 01:28:01,260 --> 01:28:03,240 everything anything that we want done 2173 01:28:03,240 --> 01:28:05,460 before then and then let's let's just go 2174 01:28:05,460 --> 01:28:07,710 ahead and say unless there's some major 2175 01:28:07,710 --> 01:28:09,570 turnaround over the weekend or something 2176 01:28:09,570 --> 01:28:11,250 let's just go ahead and say that Monday 2177 01:28:11,250 --> 01:28:12,600 is going to be our day to start some 2178 01:28:12,600 --> 01:28:15,000 serious math action because that's going 2179 01:28:15,000 --> 01:28:17,040 to power us up a lot and we're gonna 2180 01:28:17,040 --> 01:28:18,270 need that power for all the stuff that 2181 01:28:18,270 --> 01:28:18,540 we're 2182 01:28:18,540 --> 01:28:23,250 want to do so please consider joining us 2183 01:28:23,250 --> 01:28:27,390 for that for that episode Monday 8:00 2184 01:28:27,390 --> 01:28:30,510 p.m. PST we will be back here but if you 2185 01:28:30,510 --> 01:28:33,390 would like to catch us tomorrow tomorrow 2186 01:28:33,390 --> 01:28:35,100 is the stream for our friends in Europe 2187 01:28:35,100 --> 01:28:37,590 obviously on Fridays we always go ahead 2188 01:28:37,590 --> 01:28:39,630 and do a stream earlier in the morning 2189 01:28:39,630 --> 01:28:41,340 so that people on the time zones can 2190 01:28:41,340 --> 01:28:43,260 catch up set of 8:00 p.m. tomorrow's 2191 01:28:43,260 --> 01:28:45,330 will be 9:00 a.m. Pacific Standard Time 2192 01:28:45,330 --> 01:28:48,690 in the morning so if you are interested 2193 01:28:48,690 --> 01:28:51,570 in catching sort of the the final the 2194 01:28:51,570 --> 01:28:53,910 final step in our in our current series 2195 01:28:53,910 --> 01:28:55,020 of handmade here uh stuff before we 2196 01:28:55,020 --> 01:28:57,180 start the math please join us tomorrow 2197 01:28:57,180 --> 01:28:59,820 at 9:00 a.m. Pacific Standard Time I 2198 01:28:59,820 --> 01:29:01,410 know it's a little bit early I will be 2199 01:29:01,410 --> 01:29:03,420 groggy so will everyone else but we'll 2200 01:29:03,420 --> 01:29:04,470 get through it with a little bit of 2201 01:29:04,470 --> 01:29:07,440 coffee almond milk I suspect and I would 2202 01:29:07,440 --> 01:29:10,470 love to see you there again if you are 2203 01:29:10,470 --> 01:29:12,030 interested in following along at home 2204 01:29:12,030 --> 01:29:14,160 and you have not done so you can always 2205 01:29:14,160 --> 01:29:15,810 PR to the game and that comes with the 2206 01:29:15,810 --> 01:29:17,040 full source code so you can always 2207 01:29:17,040 --> 01:29:19,440 download every night after we finished 2208 01:29:19,440 --> 01:29:21,120 programming you can always download the 2209 01:29:21,120 --> 01:29:22,320 latest source code and follow along at 2210 01:29:22,320 --> 01:29:24,000 home it also comes with the test assets 2211 01:29:24,000 --> 01:29:26,100 that we're using here so you can you 2212 01:29:26,100 --> 01:29:27,840 know use those as well and see you can 2213 01:29:27,840 --> 01:29:29,130 you can kind of play around with them 2214 01:29:29,130 --> 01:29:32,550 mm-hmm just like we're doing similarly 2215 01:29:32,550 --> 01:29:33,780 if you want to support the video series 2216 01:29:33,780 --> 01:29:36,570 we have a patreon we also have a news or 2217 01:29:36,570 --> 01:29:37,770 patreon I don't actually know you 2218 01:29:37,770 --> 01:29:38,250 pronounce that 2219 01:29:38,250 --> 01:29:40,860 I suppose patreon I'm not sure but you 2220 01:29:40,860 --> 01:29:41,820 can subscribe to that if you want 2221 01:29:41,820 --> 01:29:43,530 support the video series and we have a 2222 01:29:43,530 --> 01:29:46,470 news and forum site you can go to which 2223 01:29:46,470 --> 01:29:47,820 has a lot of great information on it 2224 01:29:47,820 --> 01:29:48,690 it's got the schedule for the week 2225 01:29:48,690 --> 01:29:50,310 posted it's got an episode guide with 2226 01:29:50,310 --> 01:29:52,050 all the previous episodes and people 2227 01:29:52,050 --> 01:29:55,380 submit time-coded sort of jump lists and 2228 01:29:55,380 --> 01:29:56,490 you can jump around in them which is 2229 01:29:56,490 --> 01:29:58,710 kind of handy there's a coding reference 2230 01:29:58,710 --> 01:29:59,880 section which has ports to other 2231 01:29:59,880 --> 01:30:00,960 platforms if you're trying to follow 2232 01:30:00,960 --> 01:30:02,130 along the Linux or Mac there's some 2233 01:30:02,130 --> 01:30:04,140 great resources for you there and of 2234 01:30:04,140 --> 01:30:05,820 course there is a code discussion forum 2235 01:30:05,820 --> 01:30:07,020 if you want to ask questions so please 2236 01:30:07,020 --> 01:30:08,210 check it out if you're trying to learn 2237 01:30:08,210 --> 01:30:10,410 from the stream that's a great place to 2238 01:30:10,410 --> 01:30:11,910 go a lot of really helpful people up 2239 01:30:11,910 --> 01:30:13,080 there and people have done some really 2240 01:30:13,080 --> 01:30:14,610 great stuff so I highly recommend it 2241 01:30:14,610 --> 01:30:16,260 alright thank you everyone for joining 2242 01:30:16,260 --> 01:30:18,960 me and I hope to see you tomorrow and 2243 01:30:18,960 --> 01:30:24,050 Monday as well so take it easy everyone 164338

Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.