Commit Graph

26 Commits

Author SHA1 Message Date
Doyle Thai 68976bd6f8 Remove strings.[h|c] files. Combined into common 2016-11-29 01:44:03 +11:00
Doyle Thai 6df92e7aed Change naming convention, merge texture/shaders
Reduce the number of files in project by merging texture and shaders into
assets/renderer file. It's better to keep code local to where it is rather than
splitting them into "self-contained modules". It becomes easier to understand
reading top-to-bottom and there's is less jumping around which can increase the
difficulty of comprehending the code.

Convert names to use more of a <namespace>_<object><Action> format.
2016-11-27 21:16:12 +11:00
Doyle Thai 339ae38b38 Simplify shaders, enable coloring of primitives 2016-11-12 01:17:30 +11:00
Doyle Thai 4795fe1cb1 Switch developing game to asteroids, start project
Switch to something of smaller scope in aim to be able to finish a project from
start to finish. Also allow refreshed eyes to review the existing API and see
what can be improved on after taking a short break from the project.
2016-11-09 22:36:41 +11:00
Doyle Thai 332888f3b5 Switch mem allocation to custom memory block
No longer repeatedly invoke malloc for retrieving memory. Some operations still
leak memory (notably audio streaming). We introduce notion of Transient and
Permanent storage. Transient memory is used for data in memory that is
temporarily allocated (i.e. graphics for that frame's output), and permanent as
more like game state storage.

We now give out pointers from a pre-allocated block of memory, so we have no
allocation cost and benefits of reduced memory leaks. The transient block gets
reset every frame. Any memory allocated within is cleared at no cost simply by
rearranging the base pointer of the memory block.
2016-09-24 14:43:59 +10:00
Doyle Thai 5b682ddcf6 Add draft better string library implementation 2016-09-07 23:33:01 +10:00
Doyle Thai e90b31de55 Separate UI code into own file 2016-08-17 18:04:51 +10:00
Doyle Thai 190822c1f6 Add entity attack audio cue 2016-07-28 22:17:32 +10:00
Doyle Thai 85becdfd6c Merge the game to dengine, reduce header coupling
Until engine architecture can clearly be separated from the game, i.e.
notion of entity storage belonging to game and concept of entity belonging
to engine, worlds/scenes belonging to game or engine- the project will
only refer to Dengine.
2016-07-28 15:19:23 +10:00
Doyle Thai 8a3886a60e Separate entity functions to own file 2016-07-28 14:33:58 +10:00
Doyle Thai 84a0f755ea Abstract audio playback into own file 2016-07-27 01:34:26 +10:00
Doyle Thai fd94eb5afd Mobs battle with hero, engine architect. changes
Mobs battle in real-time with the hero when in range. Start encapsulating
logic into entityStateSwitch() to organise entity properties changing
between different states.

Introduce basic concept of memory management in MemoryArena. Begin passing
around a memory object to track memory usage and eventually delegate
memory allocations through. Remove the old memory tracker in the debug
object and incorporate into engine primarily.

Add a debug console for logging information and events to the screen in
a console-like fashion. Debug is now initialised after the game, this is
so that you can pass the game's memory arena and font file to the debug
services. Debug services now properly initialise debug element positions
from this information and not through the update routine.
2016-07-19 21:19:26 +10:00
Doyle Thai a426461dad Fix up include headers, try to reduce dependencies
Ensure that all headers are self-sufficient instead of relying on included
headers to include headers for execution.
2016-07-16 23:27:52 +10:00
Doyle Thai d0b4c99787 Create empty texture idea, change function scopes
Some functions which should not be exposed in the API have been switched
to INTERNAL scope. We have a notion of an empty texture in World Traveller
that we can pass in situations where we just want to render a solid
colour with no associated texture.

The alternative to this was creating a separate shader for rendering
primitives but would require at some point to expose the AssetManager to
the renderer or the user on behalf has to manually switch shaders before
rendering (non-intuitive).
2016-07-16 17:15:03 +10:00
Doyle Thai 1f364f7024 Update debug data architecture and methods 2016-07-09 20:46:04 +10:00
Doyle Thai 46629a489a Add debug rendering, fix misaligned pos render bug
Rendering using a non-default quad specifies normalised coordinates
relative to the frame buffer size. Hence each render of these frames
should origin from (0,0) any other value is invalid.
2016-07-08 02:45:37 +10:00
Doyle Thai 753d700ca6 Complete port over to C, replace glm math lib 2016-06-18 19:12:09 +10:00
Doyle Thai 6251e105c8 Remove stdstring, use platform layer to open files 2016-06-18 02:01:43 +10:00
Doyle Thai 3c51010e77 Port project over to C, some C++ left 2016-06-18 00:40:40 +10:00
Doyle Thai bcb847c18c Add acceleration to movement code 2016-06-17 18:11:23 +10:00
Doyle Thai 5cebf9ad0d Build world model in engine 2016-06-17 00:14:58 +10:00
Doyle Thai 68c53dad0a Switch to sprite renderer 2016-06-09 15:49:03 +10:00
Doyle Thai 761609e1f9 Add sprite functionality, doesn't render yet 2016-06-07 23:54:14 +10:00
Doyle Thai 864dca6f3d Add basics for breakout game, separate tutorial code 2016-06-05 17:54:41 +10:00
Doyle Thai 7295d4712c Abstract asset loading to asset manager 2016-06-04 22:42:22 +10:00
Doyle Thai 04e9f7bf85 Initialise repo 2016-06-03 15:07:40 +10:00