Age | Commit message (Collapse) | Author | |
---|---|---|---|
2022-04-01 | Add a game timerHEADmaster | cflip | |
This adds a delta time that ensures that everything moves at the same speed regardless of framerate or system. | |||
2022-03-30 | Store train objects in a unique_ptr | cflip | |
The trains were being destructed after leaving the scope of the addVehicle function. This change makes sure the trains stay allocated for the entire lifetime of the level. Fixes #2 | |||
2022-03-29 | Fix sprite sorting when rendering the level | cflip | |
This fixes a misuse of std::find_if and vector iterators. Previously, the first vehicle in the currently drawing tile would be drawn, and then every other vehicle would be drawn regardless of position. | |||
2022-03-29 | Return a reference instead of a pointer in addVehicle() | cflip | |
2022-03-28 | Checkout with submodules on CI | cflip | |
This ensures that stb_image.h can be included. | |||
2022-03-28 | Merge pull request #3 from junaire/ci | cflip | |
Add GitHub Actions | |||
2022-03-28 | Add Github Actions. | Jun Zhang | |
Signed-off-by: Jun Zhang <jun@junz.org> | |||
2022-03-26 | Update build instructions | cflip | |
2022-03-26 | Fix SDL include path in window.cpp | cflip | |
2022-03-26 | Include stb_image as a submodule instead of a file in the repository | cflip | |
Instead of storing a copy of stb_image.h in the repository directly, we can just include it as a submodule. | |||
2022-03-26 | Add missing #includes for find_if and ceil | cflip | |
2022-03-26 | Implement sprite depth sorting | cflip | |
This algorithm draws the level in two passes; the ground and rail tiles are drawn first, then the train cars and walls. This method isn't perfect, but it'll do for now. | |||
2022-03-24 | Add a header to the level file format | cflip | |
2022-03-24 | Create new trains on right click instead of moving the existing train | cflip | |
2022-03-24 | Don't create a copy of the train graphics per vehicle | cflip | |
2022-03-24 | Add acceleration/deceleration to the train | cflip | |
2022-03-24 | Add camera panning with arrow keys | cflip | |
2022-03-23 | Automatically copy resources to build directory | cflip | |
2022-03-23 | Simplify track sprite lookup | cflip | |
2022-03-23 | Prevent oversized levels from saving | cflip | |
The current level format uses bytes to store the width and height, so levels that are larger than that are not allowed to be saved. I don't think that the game will need levels larger than 255x255, but if it does then the level format can be updated. | |||
2022-03-23 | Reallocate tilemap on level load | cflip | |
This prevents some issues with loading levels that are larger than the current one. | |||
2022-03-22 | Update link to cflip.net's Nonortho page | cflip | |
2022-03-21 | Implement simple level saving and loading | cflip | |
For now, it just reads and writes the width, height, and tile data to 'level.non' | |||
2022-03-21 | Add support for keyboard events in the Window | cflip | |
2022-03-21 | Minor improvements in Window class | cflip | |
* Ensure event callbacks are not null before calling them * Mark shouldClose() as const * Use nullptr instead of NULL | |||
2022-03-21 | Add a basic wall tile | cflip | |
2022-03-06 | Create new tile byte format | cflip | |
Track tiles now have their direction information stored in the high 4 bits of the tile byte, creating a clearer separation between the type of tile and other persistent data. This will make the code more managable for adding new tile types and with the new macros and enums the code is much easier to read and understand. | |||
2022-03-03 | Keep list of all vehicles in Level class | cflip | |
Newly created vehicles are now to be added to the Level, which automatically updates and renders them. This infrastructure will be needed for depth sorting and eventually level saving. | |||
2022-03-03 | Remove unnecessary method parameter in Train class | cflip | |
2022-02-28 | Quick and simple multi-car train implementation | cflip | |
2022-02-27 | Fix typo in window.cpp | cflip | |
2022-02-27 | Remove unnecessary <cmath> include in util.h | cflip | |
2022-02-27 | Remove Starliner.mp3 | cflip | |
2022-02-27 | Add sprite for east-west moving train car | cflip | |
2022-02-27 | Add build instructions to README | cflip | |
2022-02-27 | Add highlight on hovered tiles | cflip | |
2022-02-27 | Automatically set train direction on right-click | cflip | |
2022-02-27 | Miscellaneous code cleanup | cflip | |
2022-02-27 | Add ClangFormat configuration | cflip | |
2022-02-27 | Rename TrainCar to Train | cflip | |
Although the name isn't entirely accurate, it looks nicer. | |||
2022-02-27 | Make train movement smoother | cflip | |
2022-01-29 | Initialize member variables | cflip | |
2022-01-29 | Close program on image read failure | cflip | |
2022-01-29 | Add CMake build output to gitignore | cflip | |
2022-01-29 | refactor: adjust the project infra. (#1) | Jun Zhang | |
* refactor: adjust the project infra. This patch adds cmake build system to the project, and adjust infrastructure stuff. Signed-off-by: Jun Zhang <jun@junz.org> * fix: remove compiler flags that only exist in GCC. Signed-off-by: Jun Zhang <jun@junz.org> | |||
2022-01-25 | Remove unused code | cflip | |
2022-01-25 | Convert Starliner to mp3 | cflip | |
2022-01-25 | Resolve merge conflict | cflip | |
2022-01-25 | No need to specify tile ids above 1 | cflip | |
2022-01-25 | Implement simple train car | cflip | |
For now, the car just exists at a certain tile and has a 'progress' timer until it moves to the next track tile. |