gamedev-patterns-ts's People
Forkers
h3rsko cshang2017 brendanpowershifter mcorrigan89 dongminseol santanacostamarco chris-daynes quzq frauschert joaqim noxasaxon jdrew001 huytran19 costas-gero crunchwrap89 eastolfigamedev hamilsauce mohiulalamprince rickylam11 zimablizko itpao25 wakababa jasonhertzog arojasjg test-and-co mohamedmehdigara sergifont meowster-s-manual rama227 alex-mckay syyonggamedev-patterns-ts's Issues
Small bug where Entity._components can never fully be empty
Since index=0 evaluates as false, the last element will never be removed in _components.
should be:
if (toRemove && index !== undefined) {
See: joaqim@e84cbd0
Where I also added test that would fail without this fix.
input.spec.ts does not recognize MouseEvent('click')
I suspect that changes have been made since the guide was initially put up, I've checked (and double checked), but this unit test no longer succeeds (indeed, it didn't succeed at all for me be that before or after fixing false positives/negatives fixes).
Fixes the problem as now the simulated mouse click is done on the document as a whole and not body. I suspect that changes in how MouseEvents are handled (calling preventDefault unless specifically told not to on elements) to be the main issue. It was of course a necessary change to support many click functionalities of todays browsers. Now I could of course have made an EventHandler which disables preventDefault, but this was the quick and dirty solution.
window.requestAnimationFrame = jest.fn().mockImplementationOnce((cb) => cb()) fails the unit test
In Game Loop Part 2 of your tutorial neglects to mention the following in the game
public Awake(): void{
//Components
this.AddComponents(new GameInputComponents())
super.Awake()
//Child entities
for(const entity of this.Entities){
entity.Awake()
}
window.requestAnimationFrame(() => {
this._lastTimeStamp = Date.now()
this.Update()
})
// Remove
this.Update()
// Remove
}
Not removing the this.update() from your Awake() method in game.ts causes the mockImplementation to continuously do a range out of bounds as it is, essentially a forever loop.
Cheers for the guide tho! I've only done Game Dev in Unity and.. This is much more hands on.
Abandoned?
Was loving the tutorial so far, but it ends in the pathfinding part.
Are you planning in continuing it?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.