I see this suggested often regarding projects similar to mine.Demivec wrote:From my observations it doesn't seem as if you are using any of the other functions of a console besides display and keyboard input. Perhaps it may be useful to create your own mock console. You would only have to implement functions that you specifically need and doing so would give you the added benefit of using a custom font easily. In addition I think it would allow porting of your game to Linux or MAC OS, if that is desired, a little easier.Vernostonos wrote:I would like to increase the console window and buffer size. I found the API function but have no idea how to implement it, does anyone have a simple example?
The complexity of my program has exceeded the usefulness of what a 80x25 character display can offer.
https://docs.microsoft.com/en-us/window ... windowinfo
Creating a 2D application to simulate a console is beyond both the scope of this project and likely my abilities at this time, despite the obvious benefits it offers.
In effort to keep the file size and requirements as low as possible I want to compile this game as a real console application.
@Mijikai
What makes that code example you posted x64? Its calling in the kernel32.lib which I thought was a subset of 32bit / X86?
It looks like it could do what I need, but want my application to run on older systems so 64bit I must avoid.
I messing around with Infratec's example to see what it can do.
Code: Select all
OpenConsole()
ConsoleTitle ("INFRATEC CONSOLE - WINDOW SIZE EXAMPLE")
EnableGraphicalConsole(1)
ConsoleColor(7, 0)
Import "kernel32.lib"
CompilerIf #PB_Compiler_Processor = #PB_Processor_x86
GetConsoleWindow_.i() As "_GetConsoleWindow@0"
SetCurrentConsoleFontEx_.i(hConsoleOutput.i, bMaximumWindow.i, *lpConsoleCurrentFontEx) As "_SetCurrentConsoleFontEx@12"
CompilerElse
GetConsoleWindow_.i() As "GetConsoleWindow"
SetCurrentConsoleFontEx_.i(hConsoleOutput.i,bMaximumWindow.i,*lpConsoleCurrentFontEx) As "SetCurrentConsoleFontEx"
CompilerEndIf
EndImport
Repeat
key$ = Inkey()
If key$ <> ""
If key$ = #CR$ ; HIT ENTER
PrintN("text here makes the window bigger it can scroll!")
PrintN("text here makes the window bigger it can scroll!")
PrintN("text here makes the window bigger it can scroll!")
PrintN("text here makes the window bigger it can scroll!")
PrintN("text here makes the window bigger it can scroll!")
PrintN("text here makes the window bigger it can scroll!")
PrintN("text here makes the window bigger it can scroll!")
PrintN("text here makes the window bigger it can scroll!")
PrintN("text here makes the window bigger it can scroll!")
PrintN("text here makes the window bigger it can scroll!")
PrintN("text here makes the window bigger it can scroll!")
PrintN("text here makes the window bigger it can scroll!")
PrintN("text here makes the window bigger it can scroll!")
PrintN("text here makes the window bigger it can scroll!")
PrintN("text here makes the window bigger it can scroll!")
PrintN("text here makes the window bigger it can scroll!")
Else
Print(key$)
EndIf
Else
Delay(10)
EndIf
Until key$ = #ESC$