[Resolved] Hide Startup Window on Fullscreen
Blitz3D Forums/Blitz3D Beginners Area/[Resolved] Hide Startup Window on Fullscreen
| ||
I know this has been answered before somewhere but I'm looking for some updated solution. I'm trying to launch my game in fullscreen and not showing the console startup window. How do I accomplish this? |
| ||
do you mean the debug window? open blitz then click on programs>debug enabled? to unmark it. Remember to deactivate it when you create the executable for your game since it's going to make the entire process slower. |
| ||
Not exactly. If you run a 3d code with or w/o debug enabled you still get a small window from the beginning and depending how big the first load sequence is. There was an attempt here but it only works in windowed mode.. Supafly blitz window I don't understand it.. |
| ||
Okay, I made it work in fullscreen and it's the same code. 1- Create an executable with Bot Builder's code, put it in the 'bin' folder inside blitz3d folder and run it. Graphics 640,480,0,2 CopyFile "runtime.dll","runtime_backup.dll" fil=OpenFile("runtime.dll") siz=FileSize("runtime.dll") For i=0 To siz byt=ReadByte(fil) If Frst=True Then If scnd=True Then If byt=$8B Then pos=i-1 Exit Else scnd=False If byt<>$CA Then frst=False EndIf ElseIf byt=$10 Then scnd=True Else If byt<>$CA Then Frst=False EndIf ElseIf byt=$CA Then Frst=True EndIf Next Print "Changing byte "+pos+" (value $10) to $00" SeekFile fil,pos WriteByte fil,$00 CloseFile fil Print "Done. Press any key to continue." 2- Add the .decls from Bot Builder's that's a little bit above the one to change the .dll and add it to the 'userlibs' folder .lib "user32.dll" FindWindow%(runtime$, name$):"FindWindowA" ShowWindow%(hwnd,val):"ShowWindow" 3- You can test it by adding these two parts to your code: ;Gets the app handle hWnd=SystemProperty$("AppHWnd") ;Makes the window appear. Use after graphics/graphics3d ShowWindow hwnd,5 |
| ||
This is awesome ThePaiva!!! :D It works out of the box! But it's weird though cause I tried running it a few times and I still get the occasional black startup box in 1 out of 10 runs, otherwise it looks good. Thanks a lot! :D |
| ||
I've tried it about 20 times now and even though the box still appears about 1 out 5 times, it's always for a fraction of a second, so it's not really that noticeable as before. I'm glad I could help you :D |
| ||
I wouldn't have worried about hiding the console window, people have been happily playing games made in Blitz for years without complaining. ;) |
| ||
Its just a matter of preference steve ancell. As a developer, I would like to make detailed adjustments if possible and know how things work and can be improved. It's also how you present your product and the console window seems like you are installing something to the end user. It's not really crucial but eh.. it just doesn't look good. ;-) "Presentation is Everything" as they say. Anyway, this has been solved by ThePaiva. cheers :) |
| ||
Maybe so, I've just never known anyone to complain that's all. |
| ||
Now that Mark's made Blitz3D open-source though, I wonder if killing the console could be patched in before re-compiling the Blitz source? |
| ||
Yes, that would be a good idea Steve, especially with Ploppy's VS2010 build which further expands the capabilities of b3d and have more flexibility. Working with VS, I just know there are many option to remove the console, here's one by adding this code to the linker option.. /SUBSYSTEM:windows /ENTRY:mainCRTStartup I'm happy with ThePaiva's solution for now but if any chance I can make some changes to the source I will post my code. |
| ||
I do know some C++, just not enough experience to hack around with the Blitz source unfortunately. I used Blitz3D for about 10 years, I purchased a boxed copy around 2004, I now do in-browser stuff so therefore I use Monkey-X. |
| ||
Good to know Steve. I have never tried Monkey-X, but looks like its another easy job using BASIC as language with making games :-) Good luck with your work. |
| ||
The problem I´ve had with this solution together with another solution I needed for Windows 8 fullscreen (which is actually faked windowed mode just to keep the speed of window in fullscreen in windows 8, true fullscreen is awful slow for me) so I had to ditch this. |