Java Game Development (LibGDX) | Episode 5 - Creating fonts and setting up the MainMenu class

preview_player
Показать описание
In this episode, I show you what we're going to use to create the main menu and how to create BitmapFonts that we can use in our program.

----- BitmapFont generator for all platforms -----
If you're using a Mac or Linux, you can use Hiero instead of BMFont. Hiero is actually better and comes with libGDX anyway.

--------------------------------------------------------------------

stay tuned @dermetfan
Рекомендации по теме
Комментарии
Автор

I'm really finding your tutorials helpful and enjoyable! Thank you for the service, it has been great.

wbwrqom
Автор

To all those ppl, who got an error at this line ((Game) MainMenu()) - if your eclipse cant find the getApplicationListener() - get the latest nighly libGDX build, not the stable one. That worked for me!

OppaHansi
Автор

Thank you :)
It's always a little balance act: If I explain too much, the video is too long and I confuse people, but on the other hand I think it's good to know what's going on under the hood.

Danke, dir auch ^^

dermetfan
Автор

wow, thanks for figuring that out, I was pounding my head for a long time trying to find a way to do that.

trueneutral
Автор

V-sync is enabled in libGDX by default.
It's probably a good idea to run your game and different frame rates. 30, 60, 120, random, etc. Just to make sure unforeseen things don't happen. If you've used delta correctly everything should be fine

MegaMech
Автор

thanks man a lot for this helper tutotial, you are really professional 😍😍

mohamedgendy
Автор

Great video.
Now I know how to create a Bitmap Font.

pabloserra
Автор

Sorry for late reply. It looks like they changed things, I updated the description.

dermetfan
Автор

You have this relaxed way of handling interruptions ; )
Good and helpful video as well, although you might have cut short the details on the font generating... But i guess since you go into quite detail, it is just a consistent way of explaining everything down to a detailed level, so good job anyway!

Beste Grüße =)

Pegaryx
Автор

Also, Java and C++ are both object oriented languages. Class templates to create your own data type / class is teh basic concept: Classes with super / sub classes (= data types).
We do this all the time, for example when we create a Screen or a Runnable, just everytime you see the @Override annotation.

dermetfan
Автор

Thank you, it's quite easy to understand

leemichael
Автор

Windows-> preferences -> java -> Code Style -> Code Templates |

Inside of the code templates window you should see "Configure generated code and comments:", in there:
Code -> method -> edit |

 and then remove the //todo comment line (You no longer have to remove these in auto-generated methods)

 You can also remove them from the constructor tab and the catch block tab

voxfox
Автор

I guess it's not included in the latest stable release. Try updating to the latest nightly, it worked for Mamdouh Mahrous as well. They recommend using the nightlies anyway.

dermetfan
Автор

Strange. I'm having the exact same problem. Built my project off the latest stable release of libGDX, but looking in the Application interface, there is no getApplicationListener method.

TheLostPebble
Автор

If you mean flipped (for a y-down coordinate system) with inverted, I didn't find a way. It's possible to flip it without using an AssetManager.
If you mean invert the Colors, it looks like it works, but somehow the font looks exactly the same when I draw it:
assetManager.get("font/black64.fnt", BitmapFont.class).setColor(assetManager.get("font/black64.fnt",
Was black before, looks like black after. Printing the color to console shows that it's inverted...

dermetfan
Автор

The most common way is probably to simply create another font. Hiero can do that with an outline for you:

dermetfan
Автор

I guess I'm stuck loading the flipped font outside of the asset manager. I'm having one last problem, my bitmap font isn't displaying the characters correctly, there is text, but it's all messed up.

trueneutral
Автор

so you can flip the font vertically, but can you flip it horizontally?

trueneutral
Автор

hi, how can i auto-import in eclipse the class of the variables wich i call? For example you create the variable table (  class Table)  and your Eclipse import for you automatically the

fortunatorosa
Автор

I pressed ctrl + space and selected "Anonymous Inner Type" from the list.
It cannot instantiate it unless you define the class body because it's an interface, so make sure to do so:
new TweenCallback() {
// class body with the method in
}

dermetfan
visit shbcf.ru