Jump to content
reepblue

Small Code Demo

Recommended Posts

I've decided to upload a demo of what I've been working on for the past 6 months (more if you count the old code I scavenged). The scene and app code is very basic but there is a lot going on here.

  • A folder will be created in your Documents folder that'll save the settings, key/joy bindings and the logfile.
  • The app uses SDL2 for controller detection and handling.
  • If you run the batch, Fullscreen mode will enable.
  • Sounds are preloaded from json scripts.
  • Although not shown/used, An entities physics properties can be changed via a script definition.
  • Game takes input on actions which are defined by json scripts saved to your documents file.
  • FPS player can walk, crouch, jump, and zoom.
  • There is a weapon system in the works. If you touch the sphere prop, you'll get 6 hemispheres in front of you. This is a developer 'weapon'; kind of like my own version of weapon_cubemap.
  • Plenty of actors are in this build, just not showcased.
  • Core code is compatible with Leadwerks 5. As for the game stuff - sorta.
  • Everything is written in C++! Actors attach with the help of Lua, and scripts are json files.

Notes:

  • SDL2 has failed on some computers during previous implementations. This time I only use SDL2 for controller input and it works so far. If it doesn't work I'll just disable the define.
  • No Linux build yet. It should compile, just need to set the projects up.
  • If you have dual monitors, don't use fullscreen as the entire window might stretch across all displays. I'll have to look into border less windows.
  • There was GUI working, but I thought of a better way of implementing it. I had it set to the window class when I should be setting it to the world class or the camera class.Issue with doing the GUI in the camera is that the camera gets deleted per world-Clear().  could do some nasty stuff to prevent it, but I think I'll just leave it be and do the GUI in the world class.
  • If you run in fullscreen, you can press the END key to end the program.

Hopefully it works!

GameTemplateDemo.zip

Edited by reepblue
Added the note about the END key.
  • Like 2

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...