Re: Game Objects Library

2016-11-30 Thread AudioGames . net Forum — Developers room : chrisnorman7 via Audiogames-reflector


  


Re: Game Objects Library

Hi,I must confess I didn't know what an Entity component system was until I googled it, so I may be misunderstanding what you're asking.It's simply another way to use objects, so you can subclass and what you like, same as creating normal classes.From that perspective, yes you could use it to follow the entity component design principals (in so far as I understand them).HTH, and sorry I'm possibly being vague.

URL: http://forum.audiogames.net/viewtopic.php?pid=287751#p287751





___
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector

Game Objects Library

2016-11-27 Thread AudioGames . net Forum — Developers room : chrisnorman7 via Audiogames-reflector


  


Game Objects Library

Hi all,In my quest to break my mindspace project into small chunks, I have just released the objects part of the code.dumpible_objects provides you with an easy systems-agnostic way to represent your game objects pythonically, while making it dead easy to dump and load them to and from a simple json file.To read the full docs (I don't want to repeat myself here), and clone or whatever, go to the Github page.Here's a basic object though:from dumpible_objects import BaseObject
class Weapon(BaseObject):
def post_init(self):
self.add_attribute('name', default='ordinalry-looking gun')  # The name of the weapon.
self.add_attribute('shots', default=5)  # The number of shots left (or maybe blade strength?).
self.add_attribute('#target')  # Preserves the target, assuming it is another instance of BaseObject.That object would dump and reload with no problems, so you see you don't have to write boilerplate code for dumping the object, use multiple files or anything like that.Hope this helps someone. There's a full test suite (11 tests), and the code is written specifically for Python 3.5, although it might work on earlier versions.

URL: http://forum.audiogames.net/viewtopic.php?pid=287467#p287467





___
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector

Game Objects Library

2016-11-27 Thread AudioGames . net Forum — Developers room : chrisnorman7 via Audiogames-reflector


  


Game Objects Library

Hi all,In my quest to break my mindspace project into small chunks, I have just released the objects part of the code.dumpible_objects provides you with an easy systems-agnostic way to represent your game objects pythonically, while making it dead easy to dump and load them to and from a simple json file.To read the full docs (I don't want to repeat myself here), read the docs (and clone or whatever) from the Github page.Here's a basic object though:from dumpible_objects import BaseObject
class Weapon(BaseObject):
def post_init(self):
self.add_attribute('name', default='ordinalry-looking gun')  # The name of the weapon.
self.add_attribute('shots', default=5)  # The number of shots left (or maybe blade strength?).
self.add_attribute('#target')  # Preserves the target, assuming it is another instance of BaseObject.That object would dump and reload with no problems, so you see you don't have to write boilerplate code for dumping the object, use multiple files or anything like that.Hope this helps someone. There's a full test suite (11 tests), and the code is written specifically for Python 3.5, although it might work on earlier versions.

URL: http://forum.audiogames.net/viewtopic.php?pid=287467#p287467





___
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector

Game Objects Library

2016-11-27 Thread AudioGames . net Forum — Developers room : chrisnorman7 via Audiogames-reflector


  


Game Objects Library

Hi all,In my quest to break my mindspace project into small chunks, I have just released the objects part of the code.dumpible_objects provides you with an easy systems-agnostic way to represent your game objects pythonically, while making it dead easy to dump and load them to and from a simple json file.To read the full docs (I don't want to repeat myself here), read the docs (and clone or whatever):https://github.com/chrisnorman7/dumpible_objectsHere's a basic object though:from dumpible_objects import BaseObjectclass Weapon(BaseObject):    def post_init(self):        self.add_attribute('name', default='ordinalry-looking gun')  # The name of the weapon.        self.add_attribute('shots', default=5)  # The number of shots left (or maybe blade strength?).        self.add_attribute('#target')  # Preserves the target, assuming it is another instance of BaseObject.That object would dump and reload with no problems, so you see you don't have to write boilerplate code for dumping the object, use multiple files or anything like that.Hope this helps someone. There's a full test suite (11 tests), and the code is written specifically for Python 3.5, although it might work on earlier versions.

URL: http://forum.audiogames.net/viewtopic.php?pid=287467#p287467





___
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector

Game Objects Library

2016-11-27 Thread AudioGames . net Forum — Developers room : chrisnorman7 via Audiogames-reflector


  


Game Objects Library

Hi all,In my quest to break my mindspace project into small chunks, I have just released the objects part of the code.dumpible_objects provides you with an easy systems-agnostic way to represent your game objects pythonically, while making it dead easy to dump and load them to and from a simple json file.To read the full docs (I don't want to repeat myself here), read the docs (and clone or whatever):https://github.com/chrisnorman7/dumpible_objectsHere's a basic object though:from dumpible_objects import BaseObjectclass Weapon(BaseObject):    def post_init(self):        self.add_attribute('name', default='ordinalry-looking gun')  # The name of the weapon.        self.add_attribute('shots', default=5)  # The number of shots left (or maybe blade strength?).        self.add_attribute('#target')  # Preserves the target, assuming it is another instance of BaseObject.That object would dump and reload with no problems, so you see you don't have to write boilerplate code for dumping the object, use multiple files or anything like that.Hope this helps someone. There's a full test suite (11 tests), and the code is written specifically for Python 3.5, although it might work on earlier versions.Take care,Chris

URL: http://forum.audiogames.net/viewtopic.php?pid=287467#p287467





___
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector