Ambiera ForumDiscussions, Help and Support. |
|
|
|||||
|
I'm interested in making a game, which is a bit like "Pokemon with Superheroes." For those with the background I'd like to set up the powers in an object-oriented way, that are allocated to the player and enemies in the game (OOP type set up), that way the code can be reused and allocated differently for each actor (i.e. regeneration). Is it possible to do this in CopperCube 5? If so how do I set it up? I assume I use prototyping but i'm not sure how to integrate it into the basic game. The graphics and the "game build" are actually secondary to me building up the rpg system, so my approach is probably the opposite way around to most approaching CopperCube. Thanks. |
||||
|
Basically everything is an object in JavaScript, you just need a way to come up with a system to use it, that you like. I'm personally usually writing classes / objects like this:
That way you can easily derive stuff from other classes, and create objects easily using the usual var obj = new NameOfMyClass(x,y,z); notation. |
|