Using DebugCameraConfig Class

Tim Buchalka's Learn Programming Academy
A free video tutorial from Tim Buchalka's Learn Programming Academy
Professional Programmers and Teachers - 914K+ students
4.5 instructor rating • 50 courses • 918,068 students

Learn more from the full course

Learn Java Creating Android Games Using the LibGDX library

Become a real games programmer. Create Games Using Java with the LibGDX Game Development Framework.

57:52:40 of on-demand video • Updated July 2020

  • Create their own games for Android
  • Understand LibGDX and how to use it for games development
  • Understand and use Entity Component Systems
  • Understand Entity Component Systems and work with Ashley LibGDX extension
  • Understand how to create reusable components for future game development
  • Understand basics of data oriented design
  • Understand what are Entities, Components, Systems in game development
  • Understand different techniques of game development and find what technique is best for your next game
  • Understand how to create professional User Interfaces using Scene2D API
  • Understand asset loading and master asset management
  • Understand how to create useful utilities which help to debug your game
  • Understand how to write clean and maintainable code
  • Understand how to use particle effects
  • Understand how to deal with common exceptions and errors
  • Understand how to check collision between game objects and react on collision
  • Understand how to work with frame buffer objects
  • Understand how to clean up and refactor code
English In previous lecture you show our debug camera on six Clauss and now we're going to freak's compilation that has to be kept in sight all Dubuc camera controller and now our debug came out of control. We use our config from configuration file. But before we continue using our configuration everything to create another here that to print everything about our configuration so we can just overwrite top string method which is from object and then create a link to create a local Y S which is like separate and we can get it from a system that gets property and property is a line a set. Right. So this will give us a line separator depending on which system are we working. Is it Unix system or Windows system. And we're going to return my C for Moto-ST. So the box camera called fix and we are going to open current records and then plus a line set. So in your line we're going to put Mock's zoomed in equals plus mux Zomi plus separates. And another plus some not max zoom out plus mux so much of the zone out plus line separator Plus most speed equals Plus more speed plus light separator plus zoom speed equals Plus the zoom speeds plus separates them. Plus what we show our left. Keep it close plus the left key plus on separate. Plus I know we can copy paste basically. So we left right up down and here we're going to put our right key right here we're to put up and here comes the also in quotes we need to create these two right up and down. And the same goes for our zooming zoom out the set and look. So we just copy paste. So after don't keep we're going to zoom in. And then the zoom zoom zoom out key. This is Kyunki. And then reset key and the rest will be a lock key. And as you know key on keyboards show that in. So they are defined as in. And we even need to lead them to stink up here. We're going to put zoom in. Zoom out. Key reset. And a lock key. And the last thing here is just to add our closing curly brackets and that's it. So now when we print this out all Archy's will be not. And we don't want that. So the easiest is just to call that inputs keys and toasting and Carkeek cold. So this is peacoat. So real quick calls to those things for example he found the right shift key code these let's say 27 then this will convert our 27 number into our shift. So we just need to copy and paste the same puts keys to string and adds curly brackets. So don't forget to add cornermen brackets after all. So zoomin key then adds curly brackets. Zoom out. Resets it and there is a lock key. So now we will get our real case not just the Colts. Let's go back to our de-bug camera controller and here we will need our camera fix. So we're going to create it as a private de-bunk camera. It's a debug camera Tawfiq and call it classic. And we're going to instantiate it inside our costs. So coffee is new book. Come to think and we're going to love it out. So let's create little VDX. And we're going to put it in full level so camera. I mean really cool informative. So camera comfits a force to just print all off. So right now we eastern state our camera controller it'll print out a concert to console. So we know which keys are used for what. And since here there are some coalition areas that we need to fix. So to get them off speed they would just use configure and get speed for those speeds. We will use configure and get zone speed and here instead of writing all these dx input is key pressed. We did the same inside our fixed costs and we just named him his left breast. So here we can just put conflict he's left pressed here real conflict. He's right. And here we'll put fake is up. Preste the next two will be called freaks. He's now preste. Then we have coffeecake is zoom. He pressed next. He's all sick. He's zoom out first and I would just towbar recur. Conflict is a reset trust and conflict is a local place. So we just replaced everything in our debark camera controller to use our calls. And here we're inserting the zoom we need conflict get mocs zoom in and configure and get mocs zoom out. So now we can finally put on our project and see if everything works correct. But before that let's go to our trace file and up upkeep let's put the color of some big T. Now with our application status when our debug camera gets tentative we will see that in our console recap de-bug camera config and Max zoomin is zero point two and we can see that our file has been loaded because our up he is the. So now if we press w nothing is happening but through Pristiq recovery that our camera gets moved and with coma and that we can trust zoomin has so much our player is still moving. OK let's remove this. Who's the builder and let's check if it works if there is not five. So we will just delete the whole debug camera file and run our project to. So it's there it's not file revenues default. And that we can see it printed out that using the false file doesn't exist the bulk debug camera configfs. So if we didn't create our file we would use default. So let's get our 5 bucks which is easy if we right click on it's directory and local history show history and then we will just this deleting. Just click on rebirths and yes that probably won't appear on your site since you are not using it. So our file is back and all these courses that we created in tools can be used in any other way. So in any game that you create in future you can just copy the whole package to your game and use this debug camera controller. GDX hotels and Cutis. So we created three reusable Klaas's we will see how they help us and we have seen how zooming in zoom got going our camera around our world really helps.