5.8 KiB
Tyra (Work in progress)
Tiny game engine for PS2 (PlayStation 2™) homebrew, written in C++98
View Demo (soon) »
Report Bug
·
Request Feature
Table of Contents
About The Project
Samples
This repository contains a early version of game engine with simple demos for PS2 (PlayStation 2™) that I've developed using the freely available PS2DEV, unofficial SDK. Developing for PS2 was and is a big challenge for me, it's pretty low-level and hard (for me :D). The architecture is completely different from an Intel x86 and there are lots of extra things that you need to take into account. There are some samples available to teach on, but overall community died several years ago :/
Why PS2 game dev is so different? Creating games for PS2 is completly different from dragging colored buttons from side to side through an application with nice GUI (ex. Unity).
Coding something for PS2 requires from you doing everything from scratch, even data transfer management through (/co)processors like:
- EE (Emotion Engine) - whole set of processors and subsystems that make up the PlayStation 2
- GS (Graphic synthesizer) - configurable rasterizer and texture mapper, geometry transformations are not done by it. Has only 2MB~ memory for textures, but very high transfer rate, so you can switch them in the blink
- VU0 - vector processor accessed by inline assembly code injected into C program
- VU1 - vector processor (similar vertex shader) accessed via DMAC
- IOP - I/O processor which enables access to peripheral devices, such the game controller
Features
- VU1 (PATH 1 rendering) with double buffering
- GIF (PATH 3 rendering) with double buffering
- Optimized calculations using VU0
- Frustum culling
- Backface culling
- Perspective projection (like OpenGL's)
- Audio support
- Animation support
- Third person view "lookAt" camera (like OpenGL's)
- Dualshock 2 pad support
- RGB 888 24bit texture support (with .bmp loader)
- 3D files loaders: ".obj", ".dff" (renderware) and ".md2"
- Multi threading management
- 3D object management
- Lighting support (now PATH3 only)
- Other: collision, gravity etc.
Built With
Getting Started
To get a local copy up and running follow these simple steps.
Prerequisites
This is an example of how to list things you need to use the software and how to install them.
Installation
- Clone the repo
git clone https://github.com/ps2-tyra/tyra.git
- Get into src folder and compile it!
make
Extra info
- Textures can be saved using GIMP. Just replace red with green color, and when exporting select .bmp, 24bit: RGB888, without saving information about colors
- If you want to run .elf in PCSX2, be sure that you have version >=1.6 and Host access enabled in PCSX2 configuration file.
- If you want to use your own .obj file, please check "triangulate faces" in blender. PS2 is supporting only trinagle primitive type.
Roadmap
Roadmap moved to github kanban:
https://github.com/ps2-tyra/tyra/projects/1
See the open issues for a list of proposed features (and known issues).
Contributing
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
License
Distributed under the Apache License 2.0 License. See LICENSE for more information.
Contact
Sandro Sobczyński - sandro.sobczynski@gmail.com
Project Link: https://github.com/ps2-tyra/tyra