Page 2 of 2
Re: [Resolved] setGameStateValue stores integers only?
Posted: 23 January 2021, 13:58
by Een
Yes, we sometimes miss some questions... sorry about that.
In general, it's indeed preferable not to make hacks, because then evolving the framework may break the games. And sometimes, the original developer is not there for fixes or advice, so it can be a headache, or even force us to remove the game (for example, some games have been disabled for turn based because the developer did a layer on top of the framework when BGA was realtime only, and this proved incompatible with the evolution to allow for turn based, and too big an effort to rewrite).
Re: [Resolved] setGameStateValue stores integers only?
Posted: 23 January 2021, 18:57
by BrianLovesMarvel
I can understand not wanting framework-provided functions or tables to be modified. I want to develop games in a forward-thinking and compatible way.
I was just seeking a simple answer about non-integer globals. Are they supported? How do people handle them?
I have been using dbmodel.sql to create tables and I'm comfortable with that approach. However, when I ran Control Panel -> Manage Games -> Game -> Check your project, I was informed "dbmodel.sql: Warning: Database file is too big (178 lines), its likely an overkill and design problem". I realized that I might be able to use the globals instead of tables for some variables but ran into the integer-only issue.
The cause of many computer program design issues is often early optimization, so maybe I'm worrying for no reason

...
The real problem is that programmers have spent far too much time worrying about efficiency in the wrong places and at the wrong times; premature optimization is the root of all evil (or at least most of it) in programming. - Knuth, Computer Programming as an Art (1974)
... but still, I want to make efficient use of BGA resources and not have my game be slow. I'll continue with the database approach and try not to hit it too often.
Best wishes, Brian (OP)
Re: [Resolved] setGameStateValue stores integers only?
Posted: 23 January 2021, 19:05
by Een
BrianLovesMarvel wrote: ↑23 January 2021, 18:57
However, when I ran Control Panel -> Manage Games -> Game -> Check your project, I was informed "dbmodel.sql: Warning: Database file is too big (178 lines), its likely an overkill and design problem".
Yes, this warning is there to prompt people to think, but might be too strongly worded. It can be completely normal for some games to have a complex database structure.
BrianLovesMarvel wrote: ↑23 January 2021, 18:57
The cause of many computer program design issues is often early optimization, so maybe I'm worrying for no reason

...
The real problem is that programmers have spent far too much time worrying about efficiency in the wrong places and at the wrong times; premature optimization is the root of all evil (or at least most of it) in programming. - Knuth, Computer Programming as an Art (1974)
I didn't know this quote, it's a good one
Have fun!