No description
This repository has been archived on 2025-02-04. You can view files and clone it, but cannot push or open issues or pull requests.
Find a file
Charlie b37652e1ce v0.00.004 - Custom logging, more concurrency & bugfixing
Concurrency:
	- Refactored spinlock out of OS api (deprecated old procs)
	- Concurrency utilites:
		void spinlock_init(Spinlock *l);
		void spinlock_acquire_or_wait(Spinlock* l);
		bool spinlock_acquire_or_wait_timeout(Spinlock* l, f64 timeout_seconds);
		void spinlock_release(Spinlock* l);
		void mutex_init(Mutex *m);
		void mutex_destroy(Mutex *m);
		void mutex_acquire_or_wait(Mutex *m);
		void mutex_release(Mutex *m);
		void binary_semaphore_init(Binary_Semaphore *sem, bool initial_state);
		void binary_semaphore_destroy(Binary_Semaphore *sem);
		void binary_semaphore_wait(Binary_Semaphore *sem);
		void binary_semaphore_signal(Binary_Semaphore *sem);
		Macro MEMORY_BARRIER
	- Concurrency tests

Docs:
	- custom_logger.c example to show how one can make a custom logger and have logs displayed in-game

Utility:
	- draw_text_and_measure() which is just an overload of draw_text but it also does a measure and returns it

Misc:
	- Added u64 thread_id to global context. This is set in main() for main thread and in thread startup when you dispatch a Thread
	- Fixed a bug where plain rects would be drawn with the incorrect color
	- Fixed a bug where quads from earlier frames would be drawn
2024-07-09 18:38:06 +02:00
.vscode - Replace lodepng with stb_image (& add stb_truetype for fonts) 2024-07-04 20:56:27 +02:00
asset_workbench basic player move init, lesson #1 2024-07-02 14:36:47 +07:00
oogabooga v0.00.004 - Custom logging, more concurrency & bugfixing 2024-07-09 18:38:06 +02:00
.gitignore - Replace lodepng with stb_image (& add stb_truetype for fonts) 2024-07-04 20:56:27 +02:00
build.bat - Portable DEPRECATED macro 2024-07-09 09:07:30 +02:00
build.c v0.00.004 - Custom logging, more concurrency & bugfixing 2024-07-09 18:38:06 +02:00
build_dissassembly.bat - Portable DEPRECATED macro 2024-07-09 09:07:30 +02:00
build_release.bat - Portable DEPRECATED macro 2024-07-09 09:07:30 +02:00
changelog.txt v0.00.004 - Custom logging, more concurrency & bugfixing 2024-07-09 18:38:06 +02:00
entry_randygame.c - Fixed bug in ALLOCATOR_REALLOC corrupting memory/returning invalid address 2024-07-03 17:55:25 +02:00
oogabooga.code-workspace included workspace for easier setup 2024-07-04 09:37:04 +07:00
player.png basic player move init, lesson #1 2024-07-02 14:36:47 +07:00
README.md Fixed memory bug & window placement 2024-07-08 17:57:23 +02:00
rock0.png entity megastruct init 2024-07-03 17:56:19 +07:00
tree0.png entity megastruct init 2024-07-03 17:56:19 +07:00
tree1.png entity megastruct init 2024-07-03 17:56:19 +07:00

ooga booga

TOC

Getting started

If you'd like to learn how to use the engine to build a game, there's a completely free course in the Skool community

You can find all tutorials and resources for getting started within the community.

What is ooga booga?

Ooga booga, often referred to as a game engine for simplicity, is more so designed to be a new C Standard, i.e. a new way to develop software from scratch in C. Other than <math.h> we don't include a single C std header, but are instead writing a better standard library heavily optimized for developing games. Except for some image & audio file decoding, Ooga booga does not rely on any other third party code.

Quickstart

  1. Install clang, add to path
  2. Clone repo to <project_dir>
  3. Make a file my_file.c in <project_dir>
int entry(int argc, char **argv) {
	print("Ooga, booga!\n");
}
  1. in build.c add this line to the bottom
#include "my_file.c"
  1. Run build.bat
  2. Run build/cgame.exe
  3. profit

The "Build System"

Our build system is a build.c and a build.bat which invokes the clang compiler on build.c. That's it. And we highly discourage anyone from introducing unnecessary complexity like a third party build system (cmake, premake) or to use header files at all whatsoever.

This might sound like we are breaking some law, but we're not. We're using a compiler to compile a file which includes all the other files, it doesn't get simpler. We are NOT using third party software to run the same compiler to compile the same files over and over again and write it all to disk to then try and link it together. That's what we call silly business (and unreasonably slow compile times, without any real benefit).

Examples & Documentation

Documentation will come in the form of a lot of examples because that's the best way to learn and understand how everything works.

See examples.

Simply add #include "oogabooga/examples/some_example.c" to build.c and compile & run to see the example code in action.

Other than examples, a great way to learn is to delve into the code of whatever module you're using. The codebase is written with this in mind.

Licensing

By default, the repository has an educational license that makes the engine free to use for personal projects.

Educational license terms

When you're ready to take the next step and work on a commercial game, you can upgrade to the full commercial license.

Here are the benefits of obtaining the full license:

  • Permanent Ownership: You completely own the source code for life.
  • No Recurring Fees or Royalties: Just an affordable one-time payment.
  • It qualifies you to enter the private Skool community, where there's daily calls with Randy & Charlie, to help speedrun your game's development

You can contact us to find out more.