197 lines
9.6 KiB
Markdown
197 lines
9.6 KiB
Markdown
---
|
||
sidebar_position: 1
|
||
---
|
||
|
||
# Cocos Creator vs PixiJS
|
||
|
||
We've been working with **Cocos Creator** for a long time and have recently started exploring **PixiJS**. After gaining experience with both frameworks, we strongly recommend continuing with **Cocos Creator** as our primary game engine, based on the following points.
|
||
|
||
---
|
||
|
||
## Full-Featured Engine vs Rendering-Only Framework
|
||
|
||

|
||
|
||
Cocos Creator offers a complete, feature-rich environment that significantly **reduces development overhead** and **accelerates production timelines**.
|
||
|
||
It comes with a **visual editor**, **built-in animation tools**, **component-based architecture**, and **robust cross-platform support**, making it ideal for both web and native deployment.
|
||
|
||

|
||
|
||
PixiJS, on the other hand, is a lightweight, high-performance **rendering engine**. While it's excellent for raw rendering, it lacks out-of-the-box support for essential features like UI systems, animation tools, and scene management. These must be built or integrated separately, adding **unnecessary overhead**, **longer development time**, and **reduced team efficiency**.
|
||
|
||
## Cocos Creator Meets All the Goals PixiJS Aims to Solve
|
||
|
||
PixiJS is often considered for the following reasons:
|
||
|
||
- Creating a multi-layer framework for base games, slot games, and other genres.
|
||
- Adopting newer technologies like WebGPU and asset compression.
|
||
- Gaining full control over the game framework.
|
||
- Offering an easy-to-use, lightweight, and high-performance environment for the web.
|
||
|
||
**Cocos Creator already addresses all of these goals:**
|
||
|
||
- We’ve successfully used Cocos for multiple game genres (2D & 3D), including hundreds of slot games with diverse UIs and features.
|
||
- Cocos provides **built-in asset compression** and broad format support:
|
||
- **Audio**: `.wav`, `.mp3`, `.ogg`
|
||
- **Textures**: `.jpg`, `.png`, `.webp`, `.pkm`, `.pvrtc`
|
||
- **WebGPU support** has been available since version 3.6.2 (released ~2.5 years ago). Enabling it requires just a toggle in the build settings.
|
||
- While full control over the engine isn't usually necessary, Cocos Creator is **open-source**. We've already leveraged this by customizing the engine to power our slot games.
|
||
- Its Unity-inspired design makes it **extremely intuitive**, especially compared to lower-level frameworks like PixiJS.
|
||
|
||
Even though PixiJS may have an edge in raw performance, we've **never hit performance limits** in Cocos Creator that would require switching to PixiJS.
|
||
|
||
## Cocos Creator Empowers Cross-Department Collaboration
|
||
|
||
Unlike PixiJS, which is primarily geared toward developers, Cocos Creator is a full-fledged game engine designed to support collaboration across the entire game development team — including developers, designers, and artists.
|
||
|
||
The visual editor is a powerful tool that enables non-programmers to contribute meaningfully throughout the development process. Instead of working separately on isolated parts, teams can work together directly within the same environment.
|
||
|
||
---
|
||
|
||
🎮 Game Designers (GD) Can:
|
||
- Build wireframes and prototypes to define early gameplay concepts.
|
||
- Design and position UI layouts without writing code.
|
||
- Configure enemy formations and movement patterns (e.g., for fish or shooting games).
|
||
- Set up animations using the timeline editor.
|
||
- Create and adjust level design elements for casual or social games.
|
||
|
||
 
|
||
|
||
🎨 Artists Can:
|
||
- Import and organize assets directly into the editor.
|
||
- Use built-in color picking tools for visual adjustments.
|
||
- Preview and tweak animations (Spine, frame-by-frame, or custom).
|
||
- Design multi-resolution UI that works across various screen sizes and devices.
|
||
|
||
 
|
||
|
||
## Publishers Are Choosing Cocos Creator Over PixiJS
|
||
|
||
Across the industry, publishers use a wide variety of engines: Cocos Creator, PixiJS, Phaser, Cocos2dJS, and various custom JavaScript/HTML5 frameworks.
|
||
|
||
Among these, **Cocos Creator stands out as the dominant choice**.
|
||
|
||
### Top 10 Publishers on Juad – Engine Usage:
|
||
|
||
| Publisher | Engine | Version(s) |
|
||
|-|-|-|
|
||
|  | Cocos Creator | 2.4.4 / 2.4.10 / 3.8.2 |
|
||
|  | PixiJS | 3.0.2 |
|
||
|  | Cocos Creator | Custom |
|
||
|  | Cocos Creator | 2.4.9 |
|
||
|  | Cocos Creator | 2.4.9 |
|
||
|  | Cocos Creator / PixiJS | 2.4.5 / 6.3.2 |
|
||
|  | Cocos Creator | 2.4.5 |
|
||
|  | Cocos Creator | 2.4.12 |
|
||
|  | Cocos2dJS | 3.17 |
|
||
| | Cocos Creator / React-PixiJS| 3.8.2 / 16.13.1-7.1.1 |
|
||
|  | Cocos Creator | 2.0.9 |
|
||
|
||
> Info:
|
||
> - Latest PixiJS version: **8.8**
|
||
> - Pragmatic is still using **PixiJS 3.0.2**, released over **10 years ago**
|
||
> - Latest Cocos Creator versions: **2.4.15** and **3.8.6**
|
||
|
||
## We're Deep Into Cocos Creator
|
||
|
||
Our current projects rely heavily on Cocos Creator. Our **core logic**, **templates**, **documentation**, and **workflow** are all designed around it.
|
||
|
||
Switching to PixiJS would require:
|
||
- Building an entirely new framework.
|
||
- Retraining our developers.
|
||
- Creating new tools and processes.
|
||
- Managing a split tech stack between Cocos and PixiJS teams.
|
||
|
||
The cost and complexity of such a transition far outweigh the potential benefits.
|
||
|
||
## Technical Struggles With PixiJS
|
||
|
||
While evaluating PixiJS (v8.8), we encountered several **critical limitations and technical issues**:
|
||
|
||
### ❌ Unsupported Particle Plugin
|
||
- The most popular particle emitter plugin became incompatible with Pixi v8.
|
||
- The original maintainer abandoned the project.
|
||
- It was only revived later by a community fork, which may still have bugs.
|
||
|
||
🔗 [Issue #211 – pixijs-userland/particle-emitter](https://github.com/pixijs-userland/particle-emitter/issues/211)
|
||
|
||
### ❌ Container Auto-Size Issues
|
||
- `Container` components automatically resize based on their children.
|
||
- This behavior makes it difficult to implement fixed-size layouts.
|
||
- Layout solutions are fragmented across multiple plugins.
|
||
|
||
🔗 [Issue #7 – pixijs/layout](https://github.com/pixijs/layout/issues/7)
|
||
|
||
### ❌ No RichText Support
|
||
- No built-in rich text support.
|
||
- `HTMLText` doesn't support the `<img>` tag or texture atlas integration.
|
||
- We can't render UI like this without heavy customization:
|
||
|
||

|
||
|
||
### ❌ No Built-In Text Shrinking
|
||
- Overflow mode for text shrinking is not supported.
|
||
- Current vs expected output:
|
||
|
||
| Current | Expected |
|
||
|-|-|
|
||
|  |  |
|
||
|
||
### ❌ Missing ScrollBar in ScrollBox
|
||
- The `ScrollBox` component lacks built-in scrollbar rendering.
|
||
- We had to manually modify its source to add this feature.
|
||
|
||

|
||
|
||
### ❌ Asset Cache Key Conflict
|
||
- Pixi uses asset names (not unique IDs) as cache keys.
|
||
- Duplicate names (e.g. `btn-start.png`) cause conflicts and unexpected behavior during asset loading.
|
||
|
||
## Wasted Effort on Contributing to PixiJS
|
||
|
||
Each technical issue required deep debugging, community searching, and sometimes direct contributions to the PixiJS GitHub repository.
|
||
|
||
While we’re happy to contribute, this **slowed down our internal development** and shifted effort away from our product.
|
||
|
||
### Some of Our Contributions:
|
||
|
||
- **Invisible Graphics Not Updating**
|
||
- Severity: CRITICAL
|
||
- Status: NOT FIXED
|
||
- 🔗 [Issue #11294](https://github.com/pixijs/pixijs/issues/11294)
|
||
- Contributor: *Phu Lai*
|
||
|
||

|
||
|
||
- **Font Family Cache Bug**
|
||
- Severity: MINOR
|
||
- Status: FIXED in v8.6.5
|
||
- 🔗 [Pull Request #11151](https://github.com/pixijs/pixijs/pull/11151)
|
||
- Contributor: *Trung Le*
|
||
|
||

|
||
|
||
- **AssetPack Power of Two Issue**
|
||
- Severity: MINOR
|
||
- Status: FIXED in `assetpack` v1.3.0
|
||
- 🔗 [Pull Request #105](https://github.com/pixijs/assetpack/pull/105)
|
||
- Contributor: *Trung Le*
|
||
|
||

|
||
|
||
## The Oppinions of our PixiJS Game Developers
|
||
|
||
While the development team is genuinely excited about exploring a new framework, even they do not recommend building or using the framework based on PixiJS.
|
||
|
||
Although we've successfully developed a full slot game for web desktop, the remaining work required to make the framework production-ready is substantial.
|
||
|
||
Furthermore, even once the framework is complete, the process of using it to build actual games is significantly more complex compared to the streamlined workflow we already have with Cocos Creator.
|
||
|
||
## ✅ Final Recommendation
|
||
|
||
Cocos Creator is **proven**, **feature-complete**, and **deeply integrated** into our current pipeline.
|
||
|
||
PixiJS, while powerful as a renderer, lacks critical features and requires substantial additional development. We've also encountered technical roadblocks that reduce productivity and increase maintenance burden.
|
||
|
||
For these reasons, **we strongly recommend continuing with Cocos Creator** as our main game engine for both current and future slot game development. |