TheGameCreators / GameGuruRepo

The GameGuru Repository For Community Collaboration
http://www.game-guru.com
137 stars 56 forks source link

Font is not visible after a game reload (GGC) #1169

Closed krupar101 closed 2 years ago

krupar101 commented 3 years ago

Dear Game Creators! I encountered a bug where after second load of the game during one game session the text on screen disappears.

How to replicate:

  1. Start a new game or load a save
  2. Go to game menu (main menu or ingame menu) and either load the same / another save or start a new game again.

After doing this the text in game disappears. I even analyzed the source code and it seems that loadallfonts() function was forgotten during game_init.

This seems consistent with my experience as it is being triggered on game_freegame and going from the game to main menu I actually get the fonts on the "Load Game" screen. They just disappear after loading which I assume trigger game_init function.

Can you take a look at it as it seems to be a simple fix in M-game.cpp file.

If you want to see it in action it happens every time in my Starallax Tipra project. https://gamejolt.com/games/starallax-tipra/614558

Best regards, Krupar!

AmenMoses commented 3 years ago

Can confirm that this also happens for me and spoils a really good game from krupar101.

plemsoft commented 3 years ago

@krupar101 Thanks for reporting this issue, There is not any code that delete the fonts they are always there, loadallfonts() just restore the default font if you have changed the font in .lua with the command "SetFont".

Do you use "SetFont" ?

What text is not visible ? Prompt or "Text" commands ?

The only thing i can think of is that the fontsize is not correct ? , if the prompt do not display could you try to use "PromptTextSize(3)" before your prompt command and check if that fix it ?.

Thanks for your help :)

krupar101 commented 3 years ago

@plemsoft I'm not using SetFont() anywhere. Also I have tried to verify integrity of game files in Steam for whole GG and this didn't help.

As for what is not visible:

  1. Default display of ammo count and health
  2. TextCenterOnX
  3. Prompt
  4. PromptDuration
  5. Text

You can see this effect on DK Productions video:

  1. On first load: https://youtu.be/kOcxx5k9vL0?t=773
  2. After second load: https://youtu.be/kOcxx5k9vL0?t=860

What can I do to help you track down this issue? If it helps I can provide my whole GG files folder.

plemsoft commented 3 years ago

@krupar101 I give your game a try when im done with todays Max work, no need to sent anything :)

AmenMoses commented 3 years ago

The easiest way to see it is to load a saved game then immediately re-open the save game menu, there is no text in the buttons!

I've managed to build a standalone without the omegacore thingy and the issue still exists so it isn't that causing it.

I also noticed the global sounds all had ids in the 99000 range so I changed them all to 9000 instead, didn't make any difference.

plemsoft commented 3 years ago

@krupar101 Played your game and found and fixed the bug, here is a new "Starallax Tipra.exe" give it a good test and let me know if it also works for you :)

https://drive.google.com/file/d/1EyFdGwkFvfUIyj8arNeufi1Spx5oz2lm/view?usp=sharing

BTW: It was really fun to play, great game you made 👍

krupar101 commented 3 years ago

@plemsoft Thanks! And the .exe does not really work for me. It's not even loading a new game properly for some reason. Did it work for you? Maybe you uploaded the wrong file? :)

krupar101 commented 3 years ago

Ohhh, sorry... This time the problem was between the chair and the keyboard -,-.

I restarted my PC and ran it as Admin - now it looks great. I will test it further and let you know but so far looks very promising!