Im making a pacman game in console. My idea was to create map and mobs just by using chars. There is no problem with the walls or the collection point, because there I can use chars which are in a default font. However, the problem starts when I want to create ghosts or pacman. There are no pacman or ghost char in default font. Is there a way to change font and write it into console? Only what i found is change font and write it by using Jframe but it is not what im looking for.
Asked
Active
Viewed 241 times
1
-
4I think the word you're looking for is "font" or "typeface", not "char". And if that's the case, since you're making a console game I don't think there's a(n easy) way to force a font in whatever terminal emulator your users are using. – Federico klez Culloca Oct 28 '21 at 09:50
-
2Please don't use the word "char" to refer to anything other that the `char` type. It makes your question hard to understand. Also, when you use the word "import" explain what you mean. I assume that this is not a Java `import` ... but that doesn't explain what it *does* mean. – Stephen C Oct 28 '21 at 09:51
-
@FedericoklezCulloca - I thought he meant character as in "a character in a play". Like Baby Yoda. – Stephen C Oct 28 '21 at 09:53
-
2For the record, the `char` type has 65536 values. They all exist ... and you can't make any more of them. – Stephen C Oct 28 '21 at 09:55
-
@StephenC: you can't make _more_, but U+E000 to U+F8FF are 6400 codepoints within the Java `char` range (UCS2 now BMP) that can be used for anything "agree[d] among cooperating users". – dave_thompson_085 Oct 28 '21 at 12:54
-
Well yea ... but it is unclear what the OP is really asking, and he never bothered to clarify his question. – Stephen C Oct 28 '21 at 13:00
-
Use a capital P for the Pacman and a capital G for a ghost. – Gilbert Le Blanc Oct 30 '21 at 17:25
-
@GilbertLeBlanc could you write it as answer? i'll give you best answer – BabyYoda Nov 02 '21 at 20:59