Go to file
John McCardle 4ffe438d1b Squashed commit of the following: [standardize_texture_handling]
closes #18

commit b114ec3085
Author: John McCardle <mccardle.john@gmail.com>
Date:   Thu Mar 21 22:22:35 2024 -0400

    cleaning up for merge

commit d7228172c4
Author: John McCardle <mccardle.john@gmail.com>
Date:   Thu Mar 21 21:39:15 2024 -0400

    Messy, but monumental: PyTexture::pyObject works

    this also coincidentally fixes a weird bug I encountered while
    (mis?)using tp_alloc: by using PyType_GenericAlloc, I avoid the segfault
    that tp_alloc sometimes causes. See the horrible UIDrawable retrieval
    macro that I use in UI.h for a workaround that can probably be replaced
    with this technique

commit 2cf8f94310
Author: John McCardle <mccardle.john@gmail.com>
Date:   Wed Mar 20 21:16:52 2024 -0400

    Radical new example pattern for exposing a C++ class to Python

commit 84a8886da2
Author: John McCardle <mccardle.john@gmail.com>
Date:   Sun Mar 17 16:29:33 2024 -0400

    Fixed render issue with UIGrid / PyTexture: wasn't positioning or scaling properly after fetching sprite

commit 20f80c4114
Author: John McCardle <mccardle.john@gmail.com>
Date:   Sun Mar 17 16:23:52 2024 -0400

    Fixed sprite indexing error in PyTexture; needs non-square sprite tests, but feeling confident!

commit afd4ff1925
Author: John McCardle <mccardle.john@gmail.com>
Date:   Sat Mar 16 21:53:24 2024 -0400

    good progress, we're building again. Issue with Grid (tile sprite) textures and I think the sprite indexes are being calculated wrong (x and y transposed?)

commit bfd33102d1
Author: John McCardle <mccardle.john@gmail.com>
Date:   Sat Mar 16 14:52:35 2024 -0400

    Squashed basically all the compile bugs in UISprite, but UIEntity and UIGrid use textures as well, so they need to be fixed too before the project will build again

commit 47d0e34a17
Author: John McCardle <mccardle.john@gmail.com>
Date:   Sat Mar 16 11:31:39 2024 -0400

    Initial PyTexture class

    no testing done.
    should enable rectangular (non-square) textures

    "sprite" method; let's just overwrite sprites with texture coords
    Hoping to replace awful code like:
    `self->data->sprite.sprite.setTextureRect(self->data->sprite.itex->spriteCoordinates(val));`

    with something like:
    `self->data->sprite = self->data->texture->sprite(val);`
2024-03-21 22:24:42 -04:00
assets Crypt of Sokoban: incomplete 7DRL game and engine stress-test 2024-03-08 22:26:40 -05:00
deps/platform Windows build 2024-02-25 15:38:38 -05:00
modules Refactor: Python 3.12, build libtcod & SFML from source. Cmake build. Directory cleanup 2024-02-24 22:48:39 -05:00
src Squashed commit of the following: [standardize_texture_handling] 2024-03-21 22:24:42 -04:00
.gitignore Refactor: Python 3.12, build libtcod & SFML from source. Cmake build. Directory cleanup 2024-02-24 22:48:39 -05:00
.gitmodules Refactor: Python 3.12, build libtcod & SFML from source. Cmake build. Directory cleanup 2024-02-24 22:48:39 -05:00
CMakeLists.txt Windows build 2024-02-25 15:38:38 -05:00
LICENSE.md Refactor: Python 3.12, build libtcod & SFML from source. Cmake build. Directory cleanup 2024-02-24 22:48:39 -05:00
README.md Refactor: Python 3.12, build libtcod & SFML from source. Cmake build. Directory cleanup 2024-02-24 22:48:39 -05:00

README.md

McRogueFace - 2D Game Engine

An experimental prototype game engine built for my own use in 7DRL 2023.

Blame my wife for the name

Tenets:

  • C++ first, Python close behind.
  • Entity-Component system based on David Churchill's Memorial University COMP4300 course lectures available on Youtube.
  • Graphics, particles and shaders provided by SFML.
  • Pathfinding, noise generation, and other Roguelike goodness provided by TCOD.

Why?

I did the r/RoguelikeDev TCOD tutorial in Python. I loved it, but I did not want to be limited to ASCII. I want to be able to draw pixels on top of my tiles (like lines or circles) and eventually incorporate even more polish.

To-do

  • Initial Commit
  • Integrate scene, action, entity, component system from COMP4300 engine
  • Windows / Visual Studio project
  • Draw Sprites
  • Play Sounds
  • Draw UI, spawn entity from Python code
  • Python AI for entities (NPCs on set paths, enemies towards player)
  • Walking / Collision
  • "Boards" (stairs / doors / walk off edge of screen)
  • Cutscenes - interrupt normal controls, text scroll, character portraits
  • Mouse integration - tooltips, zoom, click to select targets, cursors