Impact

This forum is read only and just serves as an archive. If you have any questions, please post them on github.com/phoboslab/impact

9 years ago by Cless

http://gameprogrammingpatterns.com/

A fairly advanced book and mostly meant for larger games with many moving parts. But it's free and a good read, so surely somebody here will find it useful!

9 years ago by FelipeBudinich

It's a very good book :)

I actually read it about a week ago, and got some pretty neat ideas.

The singleton chapter is very interesting, I added some new functionality to my persistence plugin based on it: http://impactjs.com/forums/code/persistence-plugin-localstorage

The author strongly advices against Singletons, but you can't offload localStorage operations on a webworker, so there is no reason not to do it

9 years ago by svenanders

Interesting - I'll read this :)

About singletons. They're pretty handy for a lot of things, so I wouldn't be against it as a general rule. I'm interested to check out what the author is saying about it.

9 years ago by Cless

@FelipeBuninich: Cool! :)

@svenanders: The author's main problem with singletons is that they are global. In a framework like Impact, pretty much everything is global, and there's not much need to worry about concurrency in client-side JavaScript. Singletons are mainly problematic in large games with multiple people working on it and lots of concurrency and moving parts.

9 years ago by svenanders

Aha, right. Well, that's the biggest issue with Javascript right there, that everything is global. There is often need for globals, though you should limit them and keep them in a single place (in my opinion). Config files can be said to be globals as well, but I don't hear people complain about them as compared to the regular outbursts you get when you add a set of defined globals to your project.
Page 1 of 1
« first « previous next › last »