Sign in to follow this  

Console Font Size

This topic is 4086 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hey ive been doin C++ for about a month or 2 now, and me and my friend are doin a small arcade style rpg for fun and learning and I got a small issue. In the console window you can right click the title bar choose proporties then font then 8 X 8 to get a nice perfectly square font ratio. Even better you can choose to apply this property every time it starts up. However it would be nice if there was a way to set this for the user so the player doesnt have to. Ive searched around an I cant seem to find a way to do it. Ive found every which way to change the window size, but not the font. Please help. Just incase your curious heres a pre alpha of the game executable, its not much content but Ive put alot of work into making the graphics and physics functions work well. Its getting close to where I can just sit back and make the game content. DungeonManIII.exe

Share this post


Link to post
Share on other sites
You're right when you assume few players will do it manually. I didn't bother with it, and actually, it didn't look too bad. A better solution (and certainly easier) solution would be to use two characters per tile.

Bytheway, did you hardcode that level into the game? Since there's no level files around... Let's just say that while it may be easier at first, it's by far the most convenient solution. Spend some time writing level-loader code, so you can create levels as simple .txt files. Much more flexible in the end. :)
Oh, and the input is extremely sensitive...

I created an ascii prototype similar to this a while ago. It shows pretty well what I mean: game download and source. I hope it's of some use to you guys. :)

Share this post


Link to post
Share on other sites
Using 2 characters per tile is out of the question.
* Implementing it would be a nightmare for the playstyle of this game.
* It would be even more of a nightmare if I tried to change my current setup to work that way, and I aint gonna delete all my work and start from scratch for a small project thats just for fun.
* lastly The resolution of the game would be too large for some of the stuff I plan on doing.

And the level is hardcoded, and not hardcoded at the same time. Technically its hardcoded because its in a .cpp file that is compiled, linked, and indeed hardcoded into the game. But its not really hardcoded because I have all the level information in its own file seperate from everything else, it mineaswell be a txt file off to the side except I havent taken the time to learn how to go about doing that yet and its just easier to make it a .cpp. Its the only level I got so far, ive spent all my time setting up the game ive had no time to create actual content. But that moment is close at hand.

btw fryball, interesting game, had no flippin clue how to play, did beat level 1 though, and uh, level 2 was interesting...
Oh yea and I know the controlls are a bit touchy, like I said its pre alpha, things are still not quite done yet. for now the shift key is for walking.

SO does anyone PLEASE have a way to code in the font size? PLEASE!?

Share this post


Link to post
Share on other sites
BUMP!
Hey its been like a week this has been up and its got 96 views and is on page 5 but not a single response! I still need a solution to my delema.

Please reread the very first post to see my problem.

I know there are many console functionalty guru's here. Someones gotta know how to do it.

Share this post


Link to post
Share on other sites
I don't know if this works but since you've bumped, you could have a look at SetCurrentConsoleFontEx.

I have no idea if this programmatically allows the changes you'd make via the tool bar of a console window and I can't really test it at the moment, but from a brief scan of MSDN, it might be what you are looking for.

HTH Paul

Share this post


Link to post
Share on other sites
NisseBosseLasse what actually happend when you tried to run my game? Id like to know to see if theres anything I can do or change to make it work.

Easily Confused
Well I looked into it and the function you listed is windows vista only. So I will be able to use that in the future but not as of yet, Here's a small discussions about the whole thing.

There is a function that will return me the current font size but not change it. If worse comes to worse ill just make a loop that wont let you play the actual game till you change the settings. Then when windows Vista rolls around ill go back in and add in that fuctionality that does it automatically. But I would HATE to do that to my playerbase.

If there is another way please speak up. Thank you.

Share this post


Link to post
Share on other sites
Hmm not sure how to go about fixing that. Sorry, but ill look into it.

Checked into CreateFont and it may work, but im really dubious. I checked around and I was only able to get ahold of one single peice of working code and even at that it looked like a nightmare to figure out, perhaps ill put up a topic on how to use CreateFont() in this forum or another.

If anyone can run me by how to use CreateFont I would give them one million thank yous. All the code I found showed how to use CreateFont...plus like 8 other things, so it wasnt very helpfull.

Share this post


Link to post
Share on other sites

This topic is 4086 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this