 This topic is going to get me probably a lot of mean comments down in the comments section but I'll talk about it anyway and give some examples of where I'm coming from and It's a conversation about HTML5, which I use HTML5 for pretty much all of my GUI interfaces regardless of what programming language I'm writing in whether it be C or bash or I don't really do much Python anymore But if I did I'd probably use HTML for that but the conversation comes mainly when we're talking about gaming and Although I will admit that it may not be the absolute best option for all scenarios HTML5 is a great option for game design Yeah, if you're developing if you're working for a big company you're developing a Very very high-end game I'm not saying you can't create the image to the game in HTML5 as the interface But it's probably not the best option and I'll give you that but some people are just so against HTML5 It and it's silly because those people are their mindset is what HTML used to be for years ago And HTML was stagnant for years It was very limited and I actually recently had a conversation some of you might have seen in the IRC channel with someone Where they were talking about how great flash was and let me let me send three good straight And most people know this flash is a load of crap always has been always will be it's just horrible It did fill a need for a time It was the only option to accomplish certain things in a web browser At a certain time but HTML5 has surpassed all of that. I don't keep up to date much on flash Since I haven't used it in years But but HTML5 Allows for WebGL use which will allow hardware acceleration and true 3d graphics Which at least when HTML5 first are doing it flash did not have those capabilities I'm 99% sure and I don't know if it does at this point and Let's get into the conversation a little bit more about what I'm talking about and give you some examples here but basically people think that HTML5 is horrible for game design and my argument that is my argument with a lot of things when people complain about a lot of stuff is a Lot of it comes down to the person doing the programming a person who knows how to program properly can can get a lot more out of a system than someone who can't and When it comes to HTML5 again, you have WebGL which is just open GL It's running on your machine open GL which is used by a lot of games For example doom 3 use open GL and that was an incredible game and WebGL is no different WebGL is just an API That allows JavaScript to talk to the open GL So open GL is gonna use your GPU if your system is set up right and it's going to render great The problem comes in when it comes to gaming is the other part of the game Which in most cases you're gonna get your most lag when it comes from when it comes to Physics and collision detection. There's a lot of math there and JavaScript is not the best for that But again in most cases you're gonna be using JavaScript for these but you don't have to you can be using pretty much any language You want HTML5 isn't the language you're programming in it is just the GUI interface But even if you are using JavaScript You can optimize your code to run great, but even if you don't and I'm gonna give you examples here I went to Walmart and then I also went to Sam's Club and my my test for these things is I run I try to run a real-world test, so I'm looking at machines under $200 here because if you can get your game running on a machine that's under $200 Then because there's only so much the hardware can do but $200 is a fairly low price margin for gaming and You're not going to be playing any really high-end game on a $200 tablet or phone But what can you accomplish with almost you know no optimization in your code whatsoever? Well, I found you can get pretty good optimization So these tests and I have I've had this code. This code I wrote years ago. It's up on my website I'll put links in the description to the files We're written in Babylon.js, which isn't the best platform. I much prefer 3js but it's and I have examples with and without physics and with and without textures spheres and and basic cubes and The real test here is I think I did test with with physics with spheres on all these So you got a higher poly than you would with a with just a square Or I'm in a cube But the max that it will allow you to run is at 150 160 frames per second So best case scenario you're gonna get 60 frames a second out of these and in my opinion and people argue especially gamers will argue With me on this as long as you're over 30 frames a second. You're gonna get pretty good results So how many objects can you get going in a scene? with physics Going in collision detection with no optimization whatsoever Before you drop below the 30 frames a second on a machine that is $200 or less So let's have a look at these examples here. So here we're looking at a $98 Samsung tablet obviously not a power beast of a machine and it's starting off at 30 frames per second Which isn't very much, but I think that's the most you're gonna really get out of a machine like this Here we're looking at another. It's a chrome book $179 see we're getting better performance right off the bat We're getting our max of 60 frames per second and it does drop rather quickly though But still we're still over the 30 frames per second at 300 mesh But once we get to 300 of those spheres again spheres that have physics and collision detection Going then we start to drop below acceptable numbers for me here We're looking at the same machine, but we're removing the physics and the collision detection and we're just using low-poly cubes with textures on them And you can see we're getting that 60 frames a second well over those at 300 mesh mark And it's going to stay at that number for quite a while because again, it's not the HTML. It's not the WebGL It's not the rendering of the 3d environment that is the issue It has to your performance issue in this sort of scenario It's gonna come from the physics and the collision detection Which not every object in your game is going to have physics and collision detection or need it Throughout the entire game and that's what I'm talking about when I say optimizing your game here We're at about thousand of these mesh and we're still well over 40 frames a second here. We're looking at a hundred and sixty nine dollar machine and here. We're getting you know about 60 frames a second off the bat We're at about 200 of those spheres that have physics and collision detection going and we're still at about 60 frames a second when we get to the 300 mark after 300 mark it starts dropping a little bit But still in what I would consider good performance for Something that I would be creating but once I get to about 500 of these spheres again with collision detection and and Physics then it starts to drop below what I would consider acceptable Looking at a hundred and seventy nine dollar Chromebook here again We're starting off pretty good around that 60 frames per second again You can see a difference again between having physics and collision and again Not every object in your game is going to have All that stuff going on but the rendering of the image is still pretty good here again It seems like these you know closer to $200 mark tablets do good till about 500 of these spheres get going all bouncing colliding into each other with pretty decent collision detection But with again no optimization on any of that here We're going back to that original Samsung 98 dollar machine just show you again That one originally was only getting 30 frames a second And here it is again with the cubes with no physics or collision detection just some textures And again, it's maxing out at 30 frames a second 31 frames a second Which is pretty much the best that in this scenario you're going to get out of this machine You'll see here at one point It does drop below the 30 frames a second when I click on the screen and I make the camera jump because now It's calculating the physics in that camera again using the CPU for calculating that not the GPU for rendering But as you can see without the physics it was holding that 30 frames a second that pretty high number of mesh We're still at 28 29 frames per second here and we're pulling up on a thousand mesh And here you'll see I'm going to click the screen and it makes the the camera jump And you can see it drop down to about 24 frames a second there One last machine we're gonna look at here hundred seventy-seven dollars is over at Sam's Club another Chromebook And again, it's gonna Be about the same as the other Chromebooks in that price range starting off at 60 frames a second till we got to about 300 mesh and then it's dropping down to about 50 frames a second But I would say that it's playable with about 500 of these Spheres going with collision detection and physics and again, that's having all of those objects with those features So just look and again, I'm gonna get a lot of complaints down the comments from people probably mostly gamers Who I have a little respect for I mean gamers over exaggerate everything There's gamers out there who still use use ps2 mouse mice's mouses They they'll use a ps2 mouse because they think they're gonna get better performance out of it Which is just completely unrealistic. That's that's their mindset And and for them anything under 60 frames second is probably horrible and I disagree with that I mean I can watch a Film movie at 24 frames a second and it looks fine. Why would the game be any different? 30 frames a second on on most digital formats and yeah We're moving up for a higher speed stuff at the higher speed stuff is good for slow-mo stuff and now we're getting into arguments that People some people claim they see differences in in in performance But for me 30 frames a second is great You're not going to be playing an extremely high-end game with a lot of physics on any tablet of this caliber But as you can see you can definitely get something playable and again, that's without optimization That's that's when you're a programmer again as a programmer You can write code and I always go back to you know the classic example of John Carmack and not I'm not even just talking about doom and the incredible things he did with doom and and Wolfenstein but before that When all these big companies were trying to get side scrollers on computers But computers just weren't fast enough and it was just determined that that computers, you know personal computers PCs weren't fast enough and weren't going to be for a while because Machines like Nintendo were optimized for games and these weren't He created he recreated Mario Brothers 3 from scratch because he came up with a new technique for programming and and again So even though he had these hardware limitations He came up with an idea on how program. Yes, he I'm assuming wrote it in C Or something similar, but it wasn't that he wrote in C everyone was trying to write that sort of stuff in C or similar languages It's the fact that he came up with a concept of not refreshing the whole screen He came up with that idea and was able to use it and it was able to recreate this game Because he was a good programmer and he worked with what he had work with what you have and yeah again I'm not saying it's the only option, but I hate when people criticize HTML 5 when it comes to this sort of thing it works great even on low-end devices and I feel like in most cases and different snare cases have different scenarios I have different you know tools you might need but the fact that with HTML 5 as your interface People can run these games Without having to install anything and have to worry about getting infected by your your your your software as much because it's it's running in a Browser which should contain it. Yes, there's always going to be You know security issues here and there, but it's not the same as downloading On on your desktop computer or a tablet or program that could be doing anything and I Think it's great and and again, let's also I mean there's so many misconceptions about HTML HTML runs on your machine It's loaded through a network just like almost anything else you do But once it's loaded you don't need an internet connection more unless the game requires it for you know multiplayer or storing scores or whatever HTML 5 can be set very easily to run offline you load it up once you can disconnect shut down your machine turn it back on go to that URL again And it will be there and you also download and run it run it locally As far as hosting yourself or you don't even really need a server in certain situations But not that that's that's that's that's just options on what you can do Anyway, again feel free to tell me how wrong I am down in the comments I do thank you for watching and taking this time. This video is a little bit longer For these talk videos, but I sure hope you enjoyed it. Thank you and have a great day