2 Attachment(s)
THE WAREHOUSE - thinBASIC game project
I have an idea for a game project - THE WAREHOUSE.
You as a player wake up in a mysterious warehouse and you need to find a way out.
Goals of the project
1/ Create a fun little game I would like to publish once finished as binary for free on itch.io
- this should allow us to promote thinBASIC a bit
2/ Explore more in depth what it takes to have game with multiple possible inputs
- how to ballance gameplay to be fun with both keyboard and mouse or XBox controller
3/ Identify spaces for improvement in TBGL, other modules and maybe even in the core language itself
- I expect to run into issues here and take it as a journey to discover what could we enhance
4/ Try to share more the whole process as I think with my GitHub adventures I completely escaped the community in the last years
- while I consider GitHub to be the goto solution for development, forum is simply more fun :)
You will always find the latest version and change log in this first post.
Please note the first post will never contain spoilers for the game, but further posts down the thread will have big spoiler potentail.
If you want to just enjoy the game, stick to this post, if you want to learn a bit along the way, please do not hesitate to follow the development.
Status of the project
In development, there is nothing to really play yet, but you are welcome to try current versions :)
Change log
Version 0.1 - Provides title screen to "game" transition. You can try to walk with XBox controller or Mouse and Keyboard in a huge empty environment
Version 0.2 - Populates warehouse with crates and allows jumping around
Petr
Version 0.1 - technical breakdown
Version 0.1 is very basic, and not entertaining yet, but features few core elements.
Title screen
The game starts with title screen, which seems basic, but implements the mechanics mentioned further - displaying key descriptions from controller config (not just hardwired values into string prompt).
Note that the displayed character for A button on XBOX controller is custom, and part of the font in the area which would be otherwise not used. So I "steal" characters with ASCII codes 252 - 255 for XBox buttons.
The animation is done in rudimental way of randomly picked camera angles, which are interpolated in linear way.
The whole aesthetic of the game will be closer to 2000's titles, riding on the retrowave which I enjoy a lot in games currently.
State transition mechanics
I would like to offer a regular structure to the game, that is some title screen, main menu, game itself and maybe some other states.
To achieve this, there is a concept of State, which has always the same interface:
- Initialize
- DrawFrame
- ProcessInput
- Deinitialize
All these functions take always as input StateContext, which allows to pin custom data for each state and process input in generic way.
Standard interface allows standard handling - so no crazy "IFs" for menu, game, ... everything handled in the same way and structure.
Control bindings
I try to play with unified interface allowing controls via keyboard, mouse and XBox controller for now.
It is an interesting exercise in understanding how XBox controller works on low level, and how to make the code easy to read on the high level.
For now the control keys are hardwired in controller.tbasicu, but already stored in a structure which will in time allow hopefully a proper user control binding.
Petr
1 Attachment(s)
Version 0.2 - populating the warehouse
I would like to share updated version.
Populated warehouse
The warehouse is now populated by columns of crates of the same type.
The algorithm basically generates columns of different sizes on fixed grid.
Collision detection
There is a rudimentary collision detection implemented for the boxes, so you should not be able to walk into one and you should be able to hop on the boxes.
Few quirks and bugs still there, some reminiscent of Tomb Raider corner bug :D
Jumping
SPACE / A key on XBox controller now allow framerate invariant jumping.
I hope you will have fun exploring the warehouse :)