Re: Python and its editors.

2016-03-04 Thread AudioGames . net ForumDevelopers room : chrisnorman7 via Audiogames-reflector


  


Re: Python and its editors.

I personally like Notepad2. Christopher Tothe told me about it (so big thanks to him), and it's like Notepad++ but doesn't have any of the strange accessibility problems and a couple of annoyances I used to find with it.It also runs from my Dropbox, which is a big plus point for me!HTH,

URL: http://forum.audiogames.net/viewtopic.php?pid=252510#p252510





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

Re: current landscape of audiogame creation tools

2016-03-04 Thread AudioGames . net ForumDevelopers room : chrisnorman7 via Audiogames-reflector


  


Re: current landscape of audiogame creation tools

Pyglet also work with Python3. I'm using 3.5, and it works great.For anyone who's finding it hard, it's simply a case of suing decorators.import pygletwindow = pyglet.window.Window(caption = 'Pyglet Test')@window.on_key_press(simple, modifiers):    print('Simple = %s, modifiers = %s.' % (simple, modifiers))pyglet.app.run()Or by sub-classing:import pygletclass MyWindow(pyglet.window.Window):    def on_key_press(self, simple, modifiers):        print('Simple = %s, modifiers = %s.' % (simple, modifiers))pyglet.app.run()HTH,

URL: http://forum.audiogames.net/viewtopic.php?pid=252503#p252503





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

Re: current landscape of audiogame creation tools

2016-03-04 Thread AudioGames . net ForumDevelopers room : chrisnorman7 via Audiogames-reflector


  


Re: current landscape of audiogame creation tools

Pyglet also works with Python3. I'm using 3.5, and it works great.For anyone who's finding it hard, it's simply a case of using decorators:import pygletwindow = pyglet.window.Window(caption = 'Pyglet Test')@window.eventdef on_key_press(simple, modifiers):    print('Simple = %s, modifiers = %s.' % (simple, modifiers))pyglet.app.run()Or by sub-classing:import pygletclass MyWindow(pyglet.window.Window):    def on_key_press(self, simple, modifiers):        print('Simple = %s, modifiers = %s.' % (simple, modifiers))window = MyWindow(caption = 'Test Pyglet with classes')pyglet.app.run()HTH,

URL: http://forum.audiogames.net/viewtopic.php?pid=252503#p252503





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

Re: current landscape of audiogame creation tools

2016-03-04 Thread AudioGames . net ForumDevelopers room : chrisnorman7 via Audiogames-reflector


  


Re: current landscape of audiogame creation tools

Pyglet also works with Python3. I'm using 3.5, and it works great.For anyone who's finding it hard, it's simply a case of using decorators:import pygletwindow = pyglet.window.Window(caption = 'Pyglet Test')@window.on_key_press(simple, modifiers):    print('Simple = %s, modifiers = %s.' % (simple, modifiers))pyglet.app.run()Or by sub-classing:import pygletclass MyWindow(pyglet.window.Window):    def on_key_press(self, simple, modifiers):        print('Simple = %s, modifiers = %s.' % (simple, modifiers))window = MyWindow(caption = 'Test Pyglet with classes')pyglet.app.run()HTH,

URL: http://forum.audiogames.net/viewtopic.php?pid=252503#p252503





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

Re: current landscape of audiogame creation tools

2016-03-03 Thread AudioGames . net ForumDevelopers room : chrisnorman7 via Audiogames-reflector


  


Re: current landscape of audiogame creation tools

Hi,I don't really understand enough maths to write audiogames, but I have used Pyglet with joysticks, and it works fine.There's also the amazing Libaudioverse which has already been mentioned, and I personally like Twisted a lot for my networking needs.I know I've basically said stuff that others have, but I like to think I condensed it! :-)Cheers.

URL: http://forum.audiogames.net/viewtopic.php?pid=252407#p252407





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

MUD Proxy

2016-03-03 Thread AudioGames . net ForumDevelopers room : chrisnorman7 via Audiogames-reflector


  


MUD Proxy

Hi all,I spent some time last night writing a MUD proxy.The point of this bit of code is to get around the annoying antiscripter employed by Miriani (and probably other games) which only allow you to enter so many commands a second before they start complaining. All my code does is throttle the number of commands per second back so only so many can go through.All commands are entered into a queue, then sent on as the preset time threshold has been exceeded.To run it, type something like:python mud_proxy.py toastsoft.net 1234 -i 0.33This makes the proxy forward any connections to toastsoft.net, port 1234 (Miriani), and only allows a command through every 0.3 seconds (so 3 commands per second).Using this I can type as quickly as I like and not get any adverse reaction for my apparent scripting.I don't think this is breaking any rules (although I've not checked), because far from speeding you up and giving you an unfair
  advantage, it actually slows you down, just to below the threshold where the antiscripter catches you.You can download the code from here.If you would like to try Miriani with my running instance of the proxy, point your client at code-metropolis.com, port 1234.Commands aren't logged or anything, so I can't see anything anyone is doing. If you don't believe me, then good for you! Get the code, read it, learn from it, and run it on your own machine.The only requirement outside of the Python standard library is twisted.The code should work on Python 2, and Python 3.I hope this is of use to someone.

URL: http://forum.audiogames.net/viewtopic.php?pid=252411#p252411





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

Re: Pythonic SQL-Based Accounts System

2016-11-14 Thread AudioGames . net ForumDevelopers room : chrisnorman7 via Audiogames-reflector


  


Re: Pythonic SQL-Based Accounts System

No worries mate. Any problems please let me know.

URL: http://forum.audiogames.net/viewtopic.php?pid=285828#p285828





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

Another Pythonic Game Engine

2016-11-22 Thread AudioGames . net ForumDevelopers room : chrisnorman7 via Audiogames-reflector


  


Another Pythonic Game Engine

Hi all,I thought I'd throw in with my multiplayer game engine.I guess calling it a game engine is a bit rich, it's kind of generic.Anyways, if you want to give it a go, including a smple guess the number game, the code is at:https://github.com/chrisnorman7/mindspace_protocol.gitIt's usage is a lot like Flask / Klein, and (as you'll see from the example game), it really doesn't tae much to get a multiplayer game going with it.It does not include any game mechanics. I'll be working these into another project, and I don't feel they belong with the protocol (which is obviously sort of the network layer).Anyways, feedback, constructive criticism, issues and pull requests are most welcome.

URL: http://forum.audiogames.net/viewtopic.php?pid=286759#p286759





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

Re: Another Pythonic Game Engine

2016-11-22 Thread AudioGames . net ForumDevelopers room : chrisnorman7 via Audiogames-reflector


  


Re: Another Pythonic Game Engine

Sorry, I used an underscore instead of a hyphen. Try: https://github.com/chrisnorman7/mindspace-protocol

URL: http://forum.audiogames.net/viewtopic.php?pid=286778#p286778





___
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 ForumDevelopers 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

Game Objects Library

2016-11-27 Thread AudioGames . net ForumDevelopers 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 ForumDevelopers 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 ForumDevelopers 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

Re: my new online engine, coded in python

2016-11-21 Thread AudioGames . net ForumDevelopers room : chrisnorman7 via Audiogames-reflector


  


Re: my new online engine, coded in python

Hi,I'd personally recommend using flake8 as your checker (pylint makes me suicidal).Also, I personally use PBR for installing packages, here's the files I use:from setuptools import setupsetup(    setup_requires = ['pbr', 'setuptools'],    pbr = True)[metadata]name = summary = description-file = README.mdhome-page = https://github.com/chrisnorman7/license = MPL-2[tool:pytest]testpaths = "tests"addopts = "-xq"Obviously fill out the stuff in setup.cfg, and ensure your package is in a git repo.HTH also.

URL: http://forum.audiogames.net/viewtopic.php?pid=286753#p286753





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

Re: my new online engine, coded in python

2016-11-21 Thread AudioGames . net ForumDevelopers room : chrisnorman7 via Audiogames-reflector


  


Re: my new online engine, coded in python

Alternatively for ORM, it's not been done yet, but I'm working on a sort of one-object-fits-all solution, where you can make objects dumpable just by setting properties. That might be of some help.This forum has got me splitting everything off into packages to share stuff LOL.Also, Pep8 is a hard woman to love! :-)

URL: http://forum.audiogames.net/viewtopic.php?pid=286755#p286755





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

SQL-Based Accounts System

2016-11-13 Thread AudioGames . net ForumDevelopers room : chrisnorman7 via Audiogames-reflector


  


SQL-Based Accounts System

Hi all,I've been reading these forums, and I see a few bits about multiplayer games, so I thought I'd share which I stripped out of an effort of my own.Basically I was writing a game server, when I realised many of the components were reusable, so while I considered how to precede I stipped the code down, and put the accounts system and the protocol into separate libraries, so others can hopefully benefit from them.My accounts system uses SQLalchemy to store stuff. You can use your existing engine if you're using SQLalchemy already - and in fact this is recommended - by passing it to the setup function:from sqlalchemy_accounts import setupaccounts = setup(engineengine)accounts pretends to be a module, and you can access it's methods:account = accounts.create_account(username='john', password='rubbish_password')assert accounts.authenticate('john', 'rubbish_password') is
  accountaccount.lock('You are not welcome.')assert accounts.authenticate(account.username, account.password) is NoneObviously this would be fairly useless if you couldn't add extra information, so (still using SQL), you can add dictionary-style attributes:account['email'] = 'j...@example.com'assert account['email'] == 'j...@example.com'If anyone finds this useful and wants me to add in more functionality, please let me know.You can download it from:https://github.com/chrisnorman7/sqlalchemy_accountsI have just updated the code style so flakes8 doesn't throw a fit when it runs through it, so problems may be related to that. Either complain on here or submit an issue / pull request.Cheers, and I hope this helps someone.

URL: http://forum.audiogames.net/viewtopic.php?pid=285729#p285729





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

SQL-Based Accounts System

2016-11-13 Thread AudioGames . net ForumDevelopers room : chrisnorman7 via Audiogames-reflector


  


SQL-Based Accounts System

Hi all,I've been reading these forums and I see a few bits about multiplayer games, so I thought I'd share something which I stripped out of an effort of my own.Basically I was writing a game server, when I realised many of the components were reusable, so while I considered how to precede I stipped the code down, and put the accounts system and the protocol into separate libraries, so others can hopefully benefit from them.My accounts system uses SQLalchemy to store stuff. You can use your existing engine if you're using SQLalchemy already - and in fact this is recommended - by passing it to the setup function:from sqlalchemy_accounts import setupaccounts = setup(engineengine)accounts pretends to be a module, and you can access it's methods:account = accounts.create_account(username='john', password='rubbish_password')assert accounts.authenticate('john', 'rubbish_password&
 #039;) is accountaccount.lock('You are not welcome.')assert accounts.authenticate(account.username, account.password) is NoneObviously this would be fairly useless if you couldn't add extra information, so (still using SQL), you can add dictionary-style attributes:account['email'] = 'j...@example.com'assert account['email'] == 'j...@example.com'If anyone finds this useful and wants me to add in more functionality, please let me know.You can download it from:https://github.com/chrisnorman7/sqlalchemy_accountsI have just updated the code style so flakes8 doesn't throw a fit when it runs through it, so problems may be related to that. Either complain on here or submit an issue / pull request.Cheers, and I hope this helps someone.

URL: http://forum.audiogames.net/viewtopic.php?pid=285729#p285729





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

Pythonic SQL-Based Accounts System

2016-11-13 Thread AudioGames . net ForumDevelopers room : chrisnorman7 via Audiogames-reflector


  


Pythonic SQL-Based Accounts System

Hi all,I've been reading these forums and I see a few bits about multiplayer games, so I thought I'd share something which I stripped out of an effort of my own.Basically I was writing a game server, when I realised many of the components were reusable, so while I considered how to precede I stripped the code down, and put the accounts system and the protocol into separate libraries, so others can hopefully benefit from them.What you end up with is a system-agnostic accounts system.sqlalchemy is used as a backend. You can use your existing engine if you're using sqlalchemy already - and in fact this is recommended - by passing it to the setup function:from sqlalchemy_accounts import setup

accounts = setup(engineengine)accounts pretends to be a module, and you can access it's methods:account = accounts.create_account(username='john', password='rubbish_password')
assert accounts.authenticate('john', 'rubbish_password') is account
account.lock('You are not welcome.')
assert accounts.authenticate(account.username, account.password) is NoneObviously this would be fairly useless if you couldn't add extra information, so (still using SQL), you can add dictionary-style attributes:account['email'] = 'j...@example.com'
assert account['email'] == 'j...@example.com'If anyone finds this useful and wants me to add in more functionality, please let me know.You can download it from:https://github.com/chrisnorman7/sqlalchemy_accountsI have just updated the code style so flakes8 doesn't throw a fit when it runs through it, so problems may be related to that. Either complain on here or submit an issue / pull request.Cheers, and I hope this helps someone.

URL: http://forum.audiogames.net/viewtopic.php?pid=285729#p285729





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

Re: Using git for GitHub.com

2016-11-13 Thread AudioGames . net ForumDevelopers room : chrisnorman7 via Audiogames-reflector


  


Re: Using git for GitHub.com

Hi,I use the normal Git for Windows which can be found as the first result (for me at least) on Google.When you install it, there is an option about using git and includd tools from Git Bash Only... I change that so I can use Git and all included Unix tools from the windows command prompt... Next screen I set it to use the standard windows command interpreter, and that's pretty much it.As a bonus with that package you get ls, ssh, scp, head, tail and a bunch of other cool tools you'd want anyway.As for learning, I just sort of learnt as I went along really.HTH.

URL: http://forum.audiogames.net/viewtopic.php?pid=285698#p285698





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

Re: Using git for GitHub.com

2016-11-13 Thread AudioGames . net ForumDevelopers room : chrisnorman7 via Audiogames-reflector


  


Re: Using git for GitHub.com

With the git command you can do for example:git help checkout.All documentation opens in your web browser.HTH.

URL: http://forum.audiogames.net/viewtopic.php?pid=285713#p285713





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

Re: Coding A Life Sim In Inform 7

2016-11-21 Thread AudioGames . net ForumDevelopers room : chrisnorman7 via Audiogames-reflector


  


Re: Coding A Life Sim In Inform 7

@LadyJuliette, I haven't got much on at this time, and I'm always looking to test myself.If you fancy, send me an email with your ideas (very well fleshed out), and we can see about creating such a thing using Python if you like?Python's the only language I know, so I can't be flexible on that point (unless you wanted HTML I guess, I could do that).With it working this way, if you did fancy learning the mightiest of Pythons, then you could learn by example as we developed your game.HTH.

URL: http://forum.audiogames.net/viewtopic.php?pid=286579#p286579





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

Re: my new online engine, coded in python

2016-11-21 Thread AudioGames . net ForumDevelopers room : chrisnorman7 via Audiogames-reflector


  


Re: my new online engine, coded in python

Hi,This is looking like good stuff!I think I would personally like to see more of a separation between the systems, so for example I could use pyglet instead of Pygame for example.Any chance you could bung that on Github or something?I've found at least one thing I'd like to fix, then I can submit pull requests and such.Cheers, and keep up the good work.

URL: http://forum.audiogames.net/viewtopic.php?pid=286581#p286581





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

Re: New in browser rpg

2016-11-12 Thread AudioGames . net ForumDevelopers room : chrisnorman7 via Audiogames-reflector


  


Re: New in browser rpg

Hi,I really like what you've done! I was actually thinking of something similar the other day, so I'm glad someone's done it!Good work!

URL: http://forum.audiogames.net/viewtopic.php?pid=285602#p285602





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

Re: Game Objects Library

2016-11-30 Thread AudioGames . net ForumDevelopers 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

Re: Create multi-player text-based games easily with Python

2017-05-15 Thread AudioGames . net ForumDevelopers room : chrisnorman7 via Audiogames-reflector


  


Re: Create multi-player text-based games easily with Python

Well if there's anything I can help with please let me know.I've started making my own MUD using this module, and it's helping me realise where things need changing ETC.There's already a bunch of new events and the banned hosts api is more configurable.

URL: http://forum.audiogames.net/viewtopic.php?pid=311052#p311052





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

Re: Create multi-player text-based games easily with Python

2017-05-17 Thread AudioGames . net ForumDevelopers room : chrisnorman7 via Audiogames-reflector


  


Re: Create multi-player text-based games easily with Python

Hi,I can't actually see the error other than the word File, but I suspect you haven't installed the package.First runpython setup.py installOrpip install git+https://github.com/chrisnorman7/game-server-base.git#egg=gsbhTH.

URL: http://forum.audiogames.net/viewtopic.php?pid=311345#p311345





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

Create multi-player text-based games easily with Python

2017-05-04 Thread AudioGames . net ForumDevelopers room : chrisnorman7 via Audiogames-reflector


  


Create multi-player text-based games easily with Python

Hi all,I recently found myself writing lots of text-based game-type stuff, some of it MUD-like, and some intended to be played with a custom client. Either way, I found myself re-using a lot of the same code, so I made me a package!The package is creatively called gsb (Game Server Base), and it's reminiscent of Flask or Klein.There's a more complete example in the repo's examples folder, but here's a basic idea:from gsb import Server  # like flask.Flask.

s = Server()  # This holds commands ETC.


@s.command('^quit$')
def do_quit(caller):
"""Disconnect from the game."""
s.disconnect(caller.connection)


s.run()This will run a very minimalist game on port 4000.Clearly it's not very interesting having only one command, but you can create as many as you like, making yourself a fully-functioning MUD-type server, or (I used it for) an RTS-type thingy. I was using Telnet to test, so I thought I may as well make it MUD like.Anyways, there's full documentation (for once). If anyone's got any suggestions or whatever, please let me know either by email or Github or something.Visit the repo.To install with pip do:pip install git+https://github.com/chrisnorman7/game-server-baseHappy hacking.

URL: http://forum.audiogames.net/viewtopic.php?pid=309696#p309696





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

Re: Create a game map?

2019-10-01 Thread AudioGames . net ForumDevelopers room : chrisnorman7 via Audiogames-reflector


  


Re: Create a game map?

Hi,Probably an unpopular suggestion, but worth chucking out there:I know there's lots of boilerplate code in here, but I've taken the _Base class from my pyrts project.With the below code you can instantiate maps and tiles with relative ease. Of course there's no provision for storing objects, but that's only a matter of extending what I've written.I use this kind of setup a lot. If you want to see more sql in action, look at the pyrts source code, or check the running instance.from enum import Enum as PythonEnum
from inspect import isclass

from sqlalchemy import (
create_engine, Column, Integer, ForeignKey, Enum, inspect
)
from sqlalchemy.exc import DatabaseError
from sqlalchemy.orm import relationship, sessionmaker
from sqlalchemy.ext.declarative import declarative_base

engine = create_engine('sqlite:///:memory:')
Session = sessionmaker(bind=engine)
session = Session()


class TileTypes(PythonEnum):
"""The possible types for tiles."""

sand = 0
grass = 1
water = 2
wall = 3
lava = 4


class _Base:
"""Create a primary key and some useful methods."""
id = Column(Integer, primary_key=True)

def save(self):
"""Save this object."""
session.add(self)
try:
session.commit()
except DatabaseError:
session.rollback()
raise

def delete(self):
session.delete(self)
try:
session.commit()
except DatabaseError:
session.rollback()
raise

@classmethod
def query(cls, *args, **kwargs):
"""Return a query object with this class."""
return session.query(cls).filter(*args).filter_by(**kwargs)

@classmethod
def count(cls, *args, **kwargs):
"""Return the number of instances of this class in the database."""
return cls.query(*args, **kwargs).count()

@classmethod
def first(cls, *args, **kwargs):
"""Return the first instance of this class in the database."""
return cls.query(*args, **kwargs).first()

@classmethod
def get(cls, id):
"""Get an object with the given id."""
return cls.query().get(id)

@classmethod
def one(cls, *args, **kwargs):
return cls.query(*args, **kwargs).one()

@classmethod
def all(cls, *args, **kwargs):
"""Return all child objects."""
return cls.query(*args, **kwargs).all()

@classmethod
def classes(cls):
"""Return all table classes."""
for item in cls._decl_class_registry.values():
if isclass(item) and issubclass(item, cls):
yield item

@classmethod
def number_of_objects(cls):
"""Returns the number of objects in the database."""
count = 0
for base in cls.classes():
count += base.count()
return count

def __repr__(self):
name = type(self).__name__
string = '%s (' % name
attributes = []
i = inspect(type(self))
for column in i.c:
name = column.name
attributes.append('%s=%r' % (name, getattr(self, name)))
string += ', '.join(attributes)
return string + ')'

@classmethod
def get_class_from_table(cls, table):
"""Return the class whose __table__ attribute is the provided Table
instance."""
for value in cls._decl_class_registry.values():
if getattr(value, '__table__', None) is table:
return value


Base = declarative_base(bind=engine, cls=_Base)


class Tile(Base):
"""A tile on the map."""

__tablename__ = 'tiles'
x = Column(Integer, nullable=False)
y = Column(Integer, nullable=False)
type = Column(Enum(TileTypes), nullable=False)
map_id = Column(Integer, ForeignKey('maps.id'), nullable=False)
map = relationship(
'Map', backref='tiles', single_parent=True,
cascade='all, delete-orphan'
)


class Map(Base):
"""A map which can contain lots of tiles."""

__tablename__ = 'maps'
size_x = Column(Integer, nullable=False, default=100)
size_y = Column(Integer, nullable=False, default=100)
default_type = Column(
Enum(TileTypes), nullable=False, default=TileTypes.sand
)

@property
def size(self):
return self.size_x, self.size_y

@size.setter
def size(self, value):
self.size_x, self.size_y = value

def tile_at(self, x, y):
"""Return the type of tile at the given coordinates."""
tile = Tile.first(map=self, x=x, y=y)
if tile is None:
return self.default_type
return tile.type

def add_tile(self, x, y, type):
"""Create and return a tile of the given type at the given
coordinates."""
return Tile(map=self, x=x, y=y, type=type)


if __name__ == '__main__':
Base.metadata.create_all()
m = Map()
m.save()
m.add_tile(1, 1, TileTypes.wall).save()
assert 

Re: Android coding and editors?

2019-11-10 Thread AudioGames . net ForumDevelopers room : chrisnorman7 via Audiogames-reflector


  


Re: Android coding and editors?

Have you tried Dart with Flutter? Dart is very much like _javascript_, and you can code in whatever editor you like.HTH.

URL: https://forum.audiogames.net/post/475237/#p475237




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


Dart

2020-04-28 Thread AudioGames . net ForumDevelopers room : chrisnorman7 via Audiogames-reflector


  


Dart

Hi all,I recently started working with Dart and Flutter, with a view to creating mobile apps.For anyone who doesn't know, Dart is a typed language, mainly designed with cross platform apps in mind. It can output to pretty much anything (iOS, Android, Linux desktop, Windows desktop is coming, web), and you don't need to mess about writing platform-specific code.After writing a couple of mobile apps to get some practise, I started looking into the possibility of using Dart on the web.I'd already started a game project using Web Audio, and it seems Dart has bindings, which make using web audio a doddle.If you haven't already checked out what Dart can do, I really recommend it.If you want to play with it with Web Audio, check out the side-scroller maker I'm currently working on.Please don't reply to this topic complaining the side-scroller maker doesn't do everything yet, it's still being worked on, submit an issue instead.If you're already playing with Dart, I hope you're enjoying it as much as I am.

URL: https://forum.audiogames.net/post/523998/#p523998




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


Re: Dart

2020-04-30 Thread AudioGames . net ForumDevelopers room : chrisnorman7 via Audiogames-reflector


  


Re: Dart

@8Honestly, doesn't surprise me. I learnt web stuff out of necessity, so I'm by no means an expert.I know you're not trying to talk me out of it, and honestly, it's interesting to get the opinion of someone like yourself.With the linter, I assume you're talking about eslint? It's good, although unless I'm missing something, I've not seen anything that runs full time and checks for filesystem changes like flutter analyze --watch does.@13No, the point wasn't to sell it, just to put it on the radar, and start a conversation (which I seem to have managed).Also, you're right about the bass stuff. I'm not sure how easy it is to get it (or fmod or any of the others) baked into another language, but WebAudio just works. I honestly wish I could use it without the browser (maybe with some kind of JSON API or something maybe), but for now, I'm happy with everything running in a browser.If people are sort of interested, but not really sure how good it is, is there interest in me making some kind of demo game? Maybe a walk through the park and tag all the animals type of thing, just to show how it can be done?

URL: https://forum.audiogames.net/post/524463/#p524463




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


Re: need a programmer for upcoming assessible mobil game

2020-04-29 Thread AudioGames . net ForumDevelopers room : chrisnorman7 via Audiogames-reflector


  


Re: need a programmer for upcoming assessible mobil game

If you send me an email with exactly what you need, I'll let you know how much I'll charge you to do it.

URL: https://forum.audiogames.net/post/524124/#p524124




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


Re: Dart

2020-04-29 Thread AudioGames . net ForumDevelopers room : chrisnorman7 via Audiogames-reflector


  


Re: Dart

@2: I have no idea. I've never used Golang, but looks like @Camlorn answered it anyways.@6: yes, Flutter is totally accessible as far as I can tell. In the current beta version (no idea which one, I just use it), you can wrap controls you want to treat like live regions in a Semantics widget, they also let you use alternate labels ETC.@3: Really interesting you're writing a GPS app with it. My first project was to convert my Talking Compass site into a flutter app. The code's here if anyone fancies giving it a try. I wanted an app that would work on Android that I could use to find my way out of the outback in Australia. Works a charm, apart from my Pixel's weird notion of what a compass is.@4: I would possibly disagree that it's not super useful, although honestly I've only been hacking on it for about a month or so. The fact that I've already got 3 fair-sized projects written shows it's got a fast learning cycle (seriously, I'm thick as when it comes to learning new things).There's some nice tooling (flutter analyze --watch is one of my favourites), and not having to change 

Re: what are data bases

2020-05-12 Thread AudioGames . net ForumDevelopers room : chrisnorman7 via Audiogames-reflector


  


Re: what are data bases

For a more "gamie" example, let's pretend you have a load of maps. They all have players on them, and some have a boss NPC that rattles around killing stuff.Your "boss" wants to find players, but it isn't interested in wounded players, because that's just mean. You could use something like the following:boss_location_id = select id from players where location_id = boss_location_id and health > 50 order by (health and function to figure out distance).That would have the boss heading towards the player with the most health, while applying some function to detect distance.BTW, I don't actually know SQL all that well, so please don't copy and paste that example haha. SQL is pretty human-readable though, so it's usually pretty obvious what's going on.If you're writing Python, I would really recommend using https://www.sqlalchemy.org/]SQLAlchemy.

URL: https://forum.audiogames.net/post/528566/#p528566




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


Re: Earwax

2020-08-29 Thread AudioGames . net ForumDevelopers room : chrisnorman7 via Audiogames-reflector


  


Re: Earwax

@16I like the look of this code!!Can I ask, what is wrong with tile editors? I mean, if I let you chuck a static ambiance at 5, 2 for example, or create a surface that runs from 0, 0 to 18, 2, why is that not a good thing?Not saying you're wrong BTW, just interested to see why you think having everything in code is better.Only advantage I can see - and it's a pretty big advantage - is you could do (extending your code):@town_square.on_enter
def event():
"""Make the town fool jump out in front of you."""
#...Are there other advantages I'm missing?I've not exactly got a wealth of level editing knowledge, so I'm interested in and open to all approaches.

URL: https://forum.audiogames.net/post/565565/#p565565




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


Re: Earwax

2020-08-30 Thread AudioGames . net ForumDevelopers room : chrisnorman7 via Audiogames-reflector


  


Re: Earwax

@22OK, I've started creating an implementation inside of Earwax, since that's the directory I'm working in ATM. Means I don't have to upload stuff to PyPi or `pip install -e .`.I'll see what happens when I build some maps with it, hopefully this afternoon, maybe upload a couple of examples.There'll still be a tile editor that people who don't want to use Python can use, but they'll have to compile that work into a Python file. That compilation will likely be one way, since I don't want to much about if people subclass `Box` or anything. Best of both worlds I reckon.Thanks for all your help.

URL: https://forum.audiogames.net/post/565634/#p565634




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


Re: Earwax

2020-08-30 Thread AudioGames . net ForumDevelopers room : chrisnorman7 via Audiogames-reflector


  


Re: Earwax

@19What piece is missing?@18I'd be lying if I said I understand your whole post. I'm going to read over it a few times to fully grasp the stuff you're on about (I've never heard of Cassowary for example), and I also think there is a big part of this that involves me analysing my own feelings.My instant response is "but a tile editor lets everyone make games and a solution that involves code raises the entry requirements in a way I'm not entirely comfortable with". I do stand by that, and my eventual solution was always going to be a rudimentary compiler of sorts: It'll take the objects created by the tile editor and turn them into code. In fact the whole of Earwax's building systems will work like that.You'll make your game and levels ETC, then the `build` command will turn them into:from earwax import Game, GameLevelgame = Game()
level_1 = GameLevel('Forest', game, id='asdf;lkj')
#...

levels = {
'asdf;lkj': level_1,
#...
}So there'll be no runtime parsing of anything. You'll just end up with a probably ugly - but hopefully working - python file you can run with `python game.py`.Also eventually a `compile` command that'll build, then run pyinstaller and pass it all the assets from the sounds folder ETC.Anyways, I'm digressing.I'll have a bash at your solution, if you don't mind me pinching the premise (crediting you of course)? I'll see how far I get, and hopefully by the time you want to create your MMO, most of the building system will be already written.What do you think of the idea of your Box class et al being put into a separate Python package? Maybe I'm not thinking through this enough, but it would seem if it's a system we both intend to use, it would be silly to write separate implementations. Plus, that gives you the advantage that - way down the line - people could use Earwax to build local versions of maps they chuck to your MMO for inclusion.With ambiances, do you have a suggested solution? I mean it would seem to be a problematic one, because the ambiance will have to either emit from all 4 corners of the box (might cause phasing issues), or you'd need to calculate the nearest coordinate on the ambiance grid to your player.

URL: https://forum.audiogames.net/post/565604/#p565604




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


Re: Earwax

2020-09-02 Thread AudioGames . net ForumDevelopers room : chrisnorman7 via Audiogames-reflector


  


Re: Earwax

OK people, I'm suggestion-hunting again!So I'm in the process of implementing doors ETC. I've got a setup where you can make any box a door, which can e open or closed. Only thing is, I'm not sure on the best way to let players open it.I could make them bump into the door, then press enter, or search all boxes for doors when they press enter, and open or close the first one. That presents a problem though, as if there's 3 doors right next to east other, say at (0, 1), (1, 1), and (2, 1). If your player is stood at (1, 0), it would open whichever door was adding first (or last depending), rather than necessarily the one they wanted.Any better ideas than them two?Thanks in advance.

URL: https://forum.audiogames.net/post/566517/#p566517




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


Re: Console file manager in Python

2020-09-01 Thread AudioGames . net ForumDevelopers room : chrisnorman7 via Audiogames-reflector


  


Re: Console file manager in Python

Hi,If it's console, then you don't need any libraries for reading anything. All the main screen readers will read terminal no problem (with the possible exception of everyone's favourite OS X screen sort-of reader VoiceOver).For Linux (and presumably mac), you can use ncurses. For everything else, there's Click.If that's not enough, then here's the article I found Click on.I never managed to do much useful with Click before, but I'm sure that's more on me than it.

URL: https://forum.audiogames.net/post/566108/#p566108




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


Re: Earwax

2020-09-02 Thread AudioGames . net ForumDevelopers room : chrisnorman7 via Audiogames-reflector


  


Re: Earwax

OK, so I figured out an option I'm happy with.There's a demo area which can be found here.Below is the code the area was generated with. Not bad for 133 lines of Python I don't reckon.If anyone has any suggestions for updating the API, or any other suggestions for that matter, I'd love to hear them.from pathlib import Path
from typing import Generator, List

from pyglet.window import Window, key, mouse

from earwax import (Ambiance, Box, BoxLevel, Door, Editor, FittedBox, Game,
Point, box_row, tts)
from earwax.cmd.constants import sounds_directory, surfaces_directory

wall_sounds = sounds_directory / 'walls'

boxes: List[Box] = [
Box(
Point(0, 0), Point(99, 2), name='Main Corridor',
surface_sound=surfaces_directory / 'gridwork'
),
Box(
Point(0, 3), Point(0, 12), wall=True, wall_sound=wall_sounds,
name='Western wall'
),
Box(
Point(0, -1), Point(100, -1), wall=True, wall_sound=wall_sounds,
name='Southern wall'
),
Box(
Point(100, 0), Point(100, 2), wall=True, wall_sound=wall_sounds,
name='Fill up the eastern wall'
)
]

door_sounds_directory: Path = sounds_directory / 'doors'
index: int
box: Box
for index, box in enumerate(box_row(Point(1, 4), 19, 9, 5, 2, 0)):
box.surface_sound = surfaces_directory / 'concrete'
box.name = f'Office {index + 1}'
boxes.append(box)
door_coordinates: Point = box.bottom_left + Point(1, -1)
door: Box = Box(
door_coordinates, door_coordinates, name='Office Entrance',
surface_sound=surfaces_directory / 'concrete', door=Door(
open=False, closed_sound=door_sounds_directory / 'closed.wav',
open_sound=door_sounds_directory / 'open.wav',
close_sound=door_sounds_directory / 'close.wav', close_after=3.0
)
)
boxes.append(door)

boxes.extend(
box_row(Point(20, 4), 1, 9, 5, 20, 0, wall=True, wall_sound=wall_sounds)
)

boxes.extend(
box_row(Point(1, 3), 100, 1, 2, 0, 10, wall=True, wall_sound=wall_sounds)
)

main_box: FittedBox = FittedBox(boxes, name='Error')


class DemoGame(Game):
def before_run(self) -> None:
super().before_run()
level.register_ambiance(
Ambiance(level, 41.5, 3, sounds_directory / 'exit.wav')
)


game: DemoGame = DemoGame()
window: Window = Window(caption='Map Demo')
level: BoxLevel = BoxLevel(game, main_box)

level.action(
'Walk forwards', symbol=key.W, mouse_button=mouse.RIGHT, interval=0.4
)(level.move())

level.action('Turn left 45 degrees', symbol=key.A)(level.turn(-45))
level.action('Turn right 45 degrees', symbol=key.D)(level.turn(45))
level.action('About turn', symbol=key.S)(level.turn(180))

level.action('Show facing', symbol=key.F)(level.show_facing())
level.action('Show coordinates', symbol=key.C)(level.show_coordinates)

level.action('Activate', symbol=key.RETURN)(level.activate)


@level.action('Quit', symbol=key.ESCAPE)
def do_quit() -> None:
"""Quit the game."""
window.dispatch_event('on_close')


@level.action('Goto', symbol=key.G)
def goto() -> Generator[None, None, None]:
"""Jump to some coordinates."""
dest: Point = Point(int(level.x), int(level.y))

def y_inner(value: str) -> None:
"""Set the y coordinate, and jump the player."""
try:
dest.y = int(value)
if dest.x == int(level.x) and dest.y == int(level.y):
tts.speak('Coordinates unchanged.')
return None
level.set_coordinates(dest.x, dest.y)
tts.speak('Moved.')
except ValueError:
tts.speak('Invalid coordinate.')
finally:
game.pop_level()

def x_inner(value: str) -> Generator[None, None, None]:
"""Set the x coordinate."""
try:
dest.x = int(value)
yield
game.replace_level(Editor(y_inner, game, text='%d' % level.y))
tts.speak('Y coordinate: %d' % level.y)
except ValueError:
tts.speak('Invalid coordinate.')
game.pop_level()

yield
game.push_level(Editor(x_inner, game, text='%d' % level.x))
tts.speak('X coordinate: %d' % level.x)


def main() -> None:
game.push_level(level)
game.run(window)


if __name__ == '__main__':
main()

URL: https://forum.audiogames.net/post/57/#p57




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


Re: Cytolk, cython extension over the tolk library

2020-09-09 Thread AudioGames . net ForumDevelopers room : chrisnorman7 via Audiogames-reflector


  


Re: Cytolk, cython extension over the tolk library

Semi agree with @35 and @36, except that using RTD is so easy (especially if you're using PBR for builds) that you might as well. Also, presumably you're already documenting your functions, so might as well include sphinx stuff in the docstrings.I've recently started my own documentation journey, so happy to help you if you need any sphinx help.I mean, it's so small I'll just write all the docs for you and do a PR if you want. I'm not busy getting ready for school haha.

URL: https://forum.audiogames.net/post/568883/#p568883




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


Re: a simple way to learn BGT

2020-09-10 Thread AudioGames . net ForumDevelopers room : chrisnorman7 via Audiogames-reflector


  


Re: a simple way to learn BGT

Firstly, presumably most of us here are blind, and many of us use Python (myself included), so please don't think being blind is a barrier to learning Python, because it's really not.Do yourself a favour, and learn Python. It's far more future proof, there's far more info out there on Google, and a staggeringly large community of Python coders. It's also about the easiest language out there, hence why it's being taught in schools ETC.

URL: https://forum.audiogames.net/post/569245/#p569245




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


Re: New project idea

2020-09-08 Thread AudioGames . net ForumDevelopers room : chrisnorman7 via Audiogames-reflector


  


Re: New project idea

@1I personally relaly like the ideas, and I'm a sucker for big ideas.More than happy to help you code such a thing. Feel free to email me if you want help.

URL: https://forum.audiogames.net/post/568415/#p568415




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


Re: Cytolk, cython extension over the tolk library

2020-09-08 Thread AudioGames . net ForumDevelopers room : chrisnorman7 via Audiogames-reflector


  


Re: Cytolk, cython extension over the tolk library

@32You still working on this?Just tried to update the package in my virtualenv to see if anything had changed, but no dice. 

URL: https://forum.audiogames.net/post/568657/#p568657




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


Re: Earwax

2020-09-12 Thread AudioGames . net ForumDevelopers room : chrisnorman7 via Audiogames-reflector


  


Re: Earwax

For anyone who's been trying to read the documentation for Earwax on Read the Docs, it has stopped building, and I'm still trying to figure out why.For the mean time, clone the git repo, and run python setup.py build_sphinx.Sorry for the inconvenience.

URL: https://forum.audiogames.net/post/570012/#p570012




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


Re: Pyglet help

2020-09-12 Thread AudioGames . net ForumDevelopers room : chrisnorman7 via Audiogames-reflector


  


Re: Pyglet help

There's also a pyglet users group on Google Groups somewhere that may help.

URL: https://forum.audiogames.net/post/570011/#p570011




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


Re: Earwax

2020-09-14 Thread AudioGames . net ForumDevelopers room : chrisnorman7 via Audiogames-reflector


  


Re: Earwax

@44Reading through the raycast algorithm I found, it seems like it's simply iterating out in a straight line from the player to find stuff that's blocking it. Is that right?Could I simply do:x, y = (4, 4)
heading = 0
distance = 1.0
while True:
x, y = coordinates_in_direction(distance, heading)
if object_at_coordinates(x, y) is not None:
# Return object.Is it really that simple? or am I missing something? I get that coordinates won't always be that simple, and I won't always have the luxury of the player facing absolutely north, but is this the general idea?Also, are there any specific articles or papers you'd recommend I read on this stuff? I don't expect you to go digging for me, I'd just rather not look at multiple sources on Google - not knowing whether what I'm looking at is good or not - if you have something you personally think is good and informative.

URL: https://forum.audiogames.net/post/570663/#p570663




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


Re: Earwax

2020-09-13 Thread AudioGames . net ForumDevelopers room : chrisnorman7 via Audiogames-reflector


  


Re: Earwax

@41Honestly mate, you're right. I've no idea what raycasting even is. I haven't read through your latest emails beyond skim reading BTW, so if there's something there I've missed, then I'll find it soon.Either way, I'm going to go and google the subject.@42I agree that AHC is lovely, and I'd really like Earwax to be able to do that. 

URL: https://forum.audiogames.net/post/570412/#p570412




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


Re: Earwax

2020-09-13 Thread AudioGames . net ForumDevelopers room : chrisnorman7 via Audiogames-reflector


  


Re: Earwax

@39Why do you say that XML is a bad idea? I actually quite like the idea of:
Zone Title
Chris Norman 
A quick zone I imagined for audiogames.net


Forest
A big, dark forest

2000
2000
100
footsteps/grass






footsteps/concrete




@35In addition to what the  others have said, I suspect they walled up certain parts of the zones, then moved you to another zone to get into a house for example. Either that, or they did some clever stuff to silence everything outside.Personally, in Earwax, I'd like to have it so you could specify a filter frequency for sounds outside of a specified box. That way you could still hear stuff that was going on outside the place you were hiding, so you could wait for soldiers, zombies, or the passing killer hen party. Of course that would depend on whether or not Camlorn puts filters into Synthizer.

URL: https://forum.audiogames.net/post/570386/#p570386




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


Re: Earwax

2020-09-13 Thread AudioGames . net ForumDevelopers room : chrisnorman7 via Audiogames-reflector


  


Re: Earwax

@44Does box2d do all the stuff I need? I'm looking into it, and apparently it has raycasting built in.I don't object to writing my own (although your points above are true, because I have no idea what I'm doing really), but if there's something out there I can lever, seems daft re-carving the wheel.

URL: https://forum.audiogames.net/post/570424/#p570424




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


Re: Require Tolk.py assistance

2020-10-02 Thread AudioGames . net ForumDevelopers room : chrisnorman7 via Audiogames-reflector


  


Re: Require Tolk.py assistance

@12Again, probably not, as you can't guarantee if I've typed python test.py, or python ..\..\test.py.Better to use os.path.dirname(os.path.abspath(__file__)) I think.

URL: https://forum.audiogames.net/post/576303/#p576303




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


Re: The Synthizer Thread

2020-10-02 Thread AudioGames . net ForumDevelopers room : chrisnorman7 via Audiogames-reflector


  


Re: The Synthizer Thread

Hey @Camlorn, is there currently a way to change the rate of a playing sound? Was going to try making something with engine fx for a bit of lighthearted relief, but I'm not sure it's possible yet.Cheers.

URL: https://forum.audiogames.net/post/576304/#p576304




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


Re: Earwax

2020-10-08 Thread AudioGames . net ForumDevelopers room : chrisnorman7 via Audiogames-reflector


  


Re: Earwax

@80 and @82Hopefully it won't be that limiting. I mean, the map editor doesn't actually exist in any meaningful way yet, so there's no telling how good or bad it'll be. @Camlorn is right, and I'll need physics stuff in there. I'm planning to just pay someone to do that for me if I can't get it done myself, since hopefully it's ot something that will change.Also, you've got access to all of Pyglet's internals, so Earwax is really just a nice wrapper of that much larger library, so I doubt it'll become too limiting.If there's any suggestions to make Earwax not be the new BGT, please let me know, because I don't want Earwax causing the controversy and horrendousness that BGT is now causing.

URL: https://forum.audiogames.net/post/578555/#p578555




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


Re: Earwax

2020-10-08 Thread AudioGames . net ForumDevelopers room : chrisnorman7 via Audiogames-reflector


  


Re: Earwax

@84That's a relief haha.

URL: https://forum.audiogames.net/post/578606/#p578606




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


Re: why do most people choose python?

2020-10-14 Thread AudioGames . net ForumDevelopers room : chrisnorman7 via Audiogames-reflector


  


Re: why do most people choose python?

@34, interesting. I assumed the learning curve was the same for everyone.@35There is an extension which gives you some of IndentNav's stuff:Name: Indentation Level Movement
Id: kaiwood.indentation-level-movement
Description: Fast and efficient vertical movement.
Version: 1.2.1
Publisher: Kai Wood
VS Marketplace Link: https://marketplace.visualstudio.com/items?itemName=kaiwood.indentation-level-movementYou can move between lines of the same indent level with control up and down arrow, and you can select up to the end / beginning of the block with control shift up and down arrows.I use a combination of both.

URL: https://forum.audiogames.net/post/580240/#p580240




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


Re: how to save errors in a file in python

2020-10-15 Thread AudioGames . net ForumDevelopers room : chrisnorman7 via Audiogames-reflector


  


Re: how to save errors in a file in python

@3That's probably not a great idea, since it'll break output redirection or whatever it's called when you do:python script.py > errors.log 2>&1A better solution would probably be to override sys.excepthook, and write your errors to a file, before letting the default sys.excepthook do it's thing:import sys
from traceback import format_exception

_excepthook = sys.excepthook
filename = 'errors.log'


def excepthook(type, value, traceback):
print(f'Writing exception to {filename}...')
try:
with open(filename, 'a') as f:
f.writelines(format_exception(type, value, traceback))
print('Error saved.')
except Exception as e:
print('Failed to save error:')
print('\n'.join(format_exception(type(e), e, e.__traceback__)))
return _excepthook(type, value, traceback)


sys.excepthook = excepthookI've tested this, and it works fine. Still possibly not recommended, since there's probably error cases I've not thought of.

URL: https://forum.audiogames.net/post/580376/#p580376




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


Re: Sharing My Music and Sound Effects - Over 2000 Tracks

2020-10-15 Thread AudioGames . net ForumDevelopers room : chrisnorman7 via Audiogames-reflector


  


Re: Sharing My Music and Sound Effects - Over 2000 Tracks

@258Completely forgot I'd posted on thsi topic.So I'm working on a quiz game, and so far all the music, and most of the sounds are yours. All attributions in place.Thanks again.

URL: https://forum.audiogames.net/post/580430/#p580430




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


Re: Pyglet help

2020-10-15 Thread AudioGames . net ForumDevelopers room : chrisnorman7 via Audiogames-reflector


  


Re: Pyglet help

@21Yeah, likely a syntax error there somewhere. It won't be generator specific, but me not including some bracket or other. I'll leave you to figure it out. I'm sure you can get the idea from what I wrote though.

URL: https://forum.audiogames.net/post/580521/#p580521




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


Re: Earwax

2020-10-15 Thread AudioGames . net ForumDevelopers room : chrisnorman7 via Audiogames-reflector


  


Re: Earwax

Hi all,I just wrote a new article on using Earwax. This time I give you MOO-style suspends with a new class, which I (rather horribly I'm afraid) call StaggeredPromise.You can find the article here.Have fun, and as usual, let me know if you have any problems or questions.

URL: https://forum.audiogames.net/post/580526/#p580526




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


Re: Earwax

2020-10-05 Thread AudioGames . net ForumDevelopers room : chrisnorman7 via Audiogames-reflector


  


Re: Earwax

@64I can't promise the the `BoxLevel` class won't change in the future, but by all means have a bash at a tile editor. I'd be very interested to see what you come up with.Maybe create an issue to keep track of what you're up to?Thanks for your interest, and in advance for your help.

URL: https://forum.audiogames.net/post/577530/#p577530




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


Re: Lucia - OpenSource AudioGame engine written in Python

2020-10-05 Thread AudioGames . net ForumDevelopers room : chrisnorman7 via Audiogames-reflector


  


Re: Lucia - OpenSource AudioGame engine written in Python

@329 and @333There's most definitely room for multiple libraries in the same space, and I don't for a second think my library is any better, simply different.There's enough people coming from BGT that'll want the familiarity of Lucia. Plus, right now, Lucia has more of a following than Earwax does. You just need to look at the number of messages on this thread for evidence of that. I only mentioned Earwax because (from my very cursory glance through posts) it looked as though Luca development was on the back burner, and there was at least one person looking for a project to contribute to. I sincerely apologise if that isn't the case. I'm not after poaching anyone.@330Absolutely right mate. Of course there's always that thing about competition being good for the market too. There's enough people using Pygame to prove that although I personally prefer Pyglet, it's not for everyone.

URL: https://forum.audiogames.net/post/577513/#p577513




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


Re: Earwax

2020-10-05 Thread AudioGames . net ForumDevelopers room : chrisnorman7 via Audiogames-reflector


  


Re: Earwax

Hi all,So I've just written an article on one of the new features of Earwax. Thought I'd post a link here for completeness.You can find the article on using BufferDirectory here.If you have any questions, please feel free to post them here.

URL: https://forum.audiogames.net/post/577524/#p577524




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


Re: Earwax

2020-10-06 Thread AudioGames . net ForumDevelopers room : chrisnorman7 via Audiogames-reflector


  


Re: Earwax

@67 and @68Thank you very much both. I'm glad you like it. I honestly hate reading code... Maybe that should be the tagline? Earwax: The audio game engine for those who hate reading code.I figure that you're going to do the same stuff over and over again, checking buttons and hats and mouse buttons. Why not make it all decoratable? And people can always override the events they find annoying. You could for example, push a key handler onto the game object, so that no matter what's going on, control s always saves the game.Event systems aren't impressive, so they should be provided as is I reckon. Nobody writes a GUI program and starts off by writing mouse controls haha.@66You could of course write your own, but I would like to at least provide a basic system that could be extended. How would you imagine such a system working? I'm happy to take any and all suggestions on board.

URL: https://forum.audiogames.net/post/577665/#p577665




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


Re: The Synthizer Thread

2020-10-04 Thread AudioGames . net ForumDevelopers room : chrisnorman7 via Audiogames-reflector


  


Re: The Synthizer Thread

@269Great, thanks for the change, but it does seem to be a little broken haha.It seems that values >= 1.002 and <= 0.991 start distorting. I haven't had chance to test it on my proper speakers yet, but I've never heard that on my laptop speakers before.BTW, is there any facility within Synthizer to record the output like there was on libaudioverse? Thinking it might be useful for you to be able to get direct recordings of our outputs. No worries if not, there's always alternative recording solutions.Thanks again for all your hard work.

URL: https://forum.audiogames.net/post/577059/#p577059




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


Re: synthizer error

2020-10-04 Thread AudioGames . net ForumDevelopers room : chrisnorman7 via Audiogames-reflector


  


Re: synthizer error

@9The code you posted looks like the example script from the Synthizer source tree. Where are the changes? That file works by default... or did, when I updated it haha.Back to your original question: You shouldn't be using sleep to play files no. There should be some kind of main game loop running, like pyglet.app.run, or whatever pygame uses these days.Not sure if that answers your question or not though.

URL: https://forum.audiogames.net/post/577062/#p577062




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


Re: synthizer error

2020-10-04 Thread AudioGames . net ForumDevelopers room : chrisnorman7 via Audiogames-reflector


  


Re: synthizer error

@11As has already been stated, the only problem is that you're not waiting for the sound to play.To wait for it, put something like:while True:
passat the end.Then, when your sound has finished, you can exit with control + c.

URL: https://forum.audiogames.net/post/577088/#p577088




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


Re: Earwax

2020-10-06 Thread AudioGames . net ForumDevelopers room : chrisnorman7 via Audiogames-reflector


  


Re: Earwax

@70Yes, that is correct. You could owever do something like the following:def handler():
...

for key in (key.A, key.B):
level.action('Something', symbol=key)(handler)Would you like another method of adding the same function to multiple keystrokes?

URL: https://forum.audiogames.net/post/577701/#p577701




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


Re: The Synthizer Thread

2020-10-04 Thread AudioGames . net ForumDevelopers room : chrisnorman7 via Audiogames-reflector


  


Re: The Synthizer Thread

@275OK, here's the link to download the wav file I was using. Sorry for the Dropbox transfer, but I wasn't sure how else to send it you.Secondly, here's the code I'm using:from time import sleep

from synthizer import (Buffer, BufferGenerator, Context, DirectSource,
   initialized)

with initialized():
c = Context()
s = DirectSource(c)
g = BufferGenerator(c)
b = Buffer.from_stream('file', 'Control1.wav')
s.add_generator(g)
g.looping = True
g.buffer = b
v = 1.0

def pb(diff):
global v
sleep(1.0)
v += diff
print('%.2f' % v)
g.pitch_bend = v

while v < 2.0:
pb(0.05)
while v > 0.1:
pb(-0.05)
while v < 1.0:
pb(0.05)
g.pitch_bend = 1.0
sleep(1.0)And finally, here's a recording of my results. I've let NVDA speak, so hopefully you can hear which values are causing problems.I'm actually thinking it's less about the value I'm using, and more about the specific part of the file.https://www.dropbox.com/t/iH9PqsGAkl1kVlVsI'm reasonably sure you'll be able to under my speech - I slowed it down - but if you can't, just let me know and I can write out the values where the horrible noise happens haha.This is the third file I've tried with this result BTW. It could absolutely be some problem with the file, but I've no idea what.Please let me know if you need any more information from me.

URL: https://forum.audiogames.net/post/577184/#p577184




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


Re: The Synthizer Thread

2020-10-04 Thread AudioGames . net ForumDevelopers room : chrisnorman7 via Audiogames-reflector


  


Re: The Synthizer Thread

@272OK, here's the link to download the wav file I was using. Sorry for the Dropbox transfer, but I wasn't sure how else to send it you.Secondly, here's the code I'm using:from time import sleep

from synthizer import (Buffer, BufferGenerator, Context, DirectSource,
   initialized)

with initialized():
c = Context()
s = DirectSource(c)
g = BufferGenerator(c)
b = Buffer.from_stream('file', 'Control1.wav')
s.add_generator(g)
g.looping = True
g.buffer = b
v = 1.0

def pb(diff):
global v
sleep(1.0)
v += diff
print('%.2f' % v)
g.pitch_bend = v

while v < 2.0:
pb(0.05)
while v > 0.1:
pb(-0.05)
while v < 1.0:
pb(0.05)
g.pitch_bend = 1.0
sleep(1.0)And finally, here's a recording of my results. I've let NVDA speak, so hopefully you can hear which values are causing problems.I'm actually thinking it's less about the value I'm using, and more about the specific part of the file.https://www.dropbox.com/t/iH9PqsGAkl1kVlVsI'm reasonably sure you'll be able to under my speech - I slowed it down - but if you can't, just let me know and I can write out the values where the horrible noise happens haha.This is the third file I've tried with this result BTW. It could absolutely be some problem with the file, but I've no idea what.Please let me know if you need any more information from me.

URL: https://forum.audiogames.net/post/577184/#p577184




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


Re: Earwax

2020-10-06 Thread AudioGames . net ForumDevelopers room : chrisnorman7 via Audiogames-reflector


  


Re: Earwax

@70Yes, that is correct. You could however do something like the following:def handler():
...

for key in (key.A, key.B):
level.action('Something', symbol=key)(handler)Would you like another method of adding the same function to multiple keystrokes?

URL: https://forum.audiogames.net/post/577701/#p577701




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


Re: Earwax

2020-10-06 Thread AudioGames . net ForumDevelopers room : chrisnorman7 via Audiogames-reflector


  


Re: Earwax

@72What you want to do is already sort of unintentionally implemented. You can use Pyglet's own event system, as the Game and Level classes both inherit from pyglet.event.EventDispatcher. The below code will hopefully show you how to do that, and also hopefully show you why it's not a great idea:from pyglet.event import EVENT_HANDLED, EVENT_UNHANDLED
from pyglet.window import Window, key

from earwax import ActionMenu, Game, Level, tts

keys = (
key._1, key._2, key._3, key._4, key._5, key._6, key._7, key._8, key._9,
key._0
)

game = Game()
window = Window(caption='Testing')

level = Level(game)


@game.event
def on_key_press(symbol, modifiers):
if symbol in keys and not modifiers:
tts.speak(f'Position {keys.index(symbol)}.')
return EVENT_HANDLED
elif symbol == key.ESCAPE and not modifiers and game.level is level:
window.dispatch_event('on_close')
else:
return EVENT_UNHANDLED


@level.action('Cause problems', symbol=key._0)
def problem():
raise RuntimeError('This should never happen.')


@level.action('Show help', symbol=key.SLASH, modifiers=key.MOD_SHIFT)
def get_help():
game.push_level(ActionMenu(game, 'Actions'))


if __name__ == '__main__':
game.run(window, initial_level=level)The custom keys don't show up in the actions list, and code like that would be extremely hard to maintain, in addition to being error prone.If you need something like a message reviewer where you press number keys to review the last 10 messages or whatever, you can do this more sensibly with a for loop.If you run this code, you'll see the entries find their way into the actions menu (unlike the previous code), and everything is more readable and easy to maintain.from pyglet.window import Window, key

from earwax import ActionMenu, Game, Level, tts

game = Game()

level = Level(game)

for i, x in enumerate(
(
key._1, key._2, key._3, key._4, key._5, key._6, key._7, key._8, key._9,
key._0
)
):
@level.action(f'Read message {i + 1}', symbol=x)
def speak(pos=i):
tts.speak(f'Position {pos}.')


@level.action('Show help', symbol=key.SLASH, modifiers=key.MOD_SHIFT)
def get_help():
game.push_level(ActionMenu(game, 'Actions'))


if __name__ == '__main__':
window = Window(caption='Testing')
game.run(window, initial_level=level)Thanks to your post, I've finally made a proper examples directory where I've put both of these scripts, and will continue to add stuff that I think is useful.Let me know if you've got any problems.

URL: https://forum.audiogames.net/post/577740/#p577740




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


Re: Lucia - OpenSource AudioGame engine written in Python

2020-10-06 Thread AudioGames . net ForumDevelopers room : chrisnorman7 via Audiogames-reflector


  


Re: Lucia - OpenSource AudioGame engine written in Python

@336I must admit, I don't. As far as I can tell, the way the two libraries work is completely different: I Lucia, you need t write your own main loop (unless I'm missing something), and it has all these useful utility commands like a file packer ETC. It supports multiple backends, and generally is more featureful than Earwax. Also, as I've said previously, people actually use it.There's room for people who want that kind of control and versatility, and for those of us who simply can't be bothered, and would rather get things done in a flask-like run of decorators.

URL: https://forum.audiogames.net/post/577727/#p577727




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


Re: python problem

2020-10-04 Thread AudioGames . net ForumDevelopers room : chrisnorman7 via Audiogames-reflector


  


Re: python problem

Also, depends what console you're using. I use cmd.exe and it works fine.

URL: https://forum.audiogames.net/post/577168/#p577168




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


Re: python problem

2020-10-04 Thread AudioGames . net ForumDevelopers room : chrisnorman7 via Audiogames-reflector


  


Re: python problem

@5Sure. Git Bash, cygwin, teraterm I think was another. There's loads of them.

URL: https://forum.audiogames.net/post/577185/#p577185




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


Re: The Synthizer Thread

2020-10-12 Thread AudioGames . net ForumDevelopers room : chrisnorman7 via Audiogames-reflector


  


Re: The Synthizer Thread

@285No worries mate, just keep on swimming. You're doing a great job, and we're all really grateful for your hard work... Or I am at least haha.

URL: https://forum.audiogames.net/post/579669/#p579669




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


Re: Earwax

2020-10-12 Thread AudioGames . net ForumDevelopers room : chrisnorman7 via Audiogames-reflector


  


Re: Earwax

Hi all,I've just finished a small article on using the new ThreadedPromise class I coded into Earwax yesterday. You can read it here.I hope you find it (and Earwax) useful.

URL: https://forum.audiogames.net/post/579678/#p579678




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


Re: Earwax

2020-10-16 Thread AudioGames . net ForumDevelopers room : chrisnorman7 via Audiogames-reflector


  


Re: Earwax

@91Good idea about the articles. I do really need to sort out the documentation story. Because Synthizer isn't available for Linux, automatic builds on Readthedocs fails, so the most up to date docs aren't there.As for Continuations (I didn't realise that's what it was called) being difficult, are there some articles I could read on why they're so bad? I thought as long as they weren't blocking they'd be fine, but I do appreciate your opinion.Thanks for your help with everything, I really appreciate all your input.

URL: https://forum.audiogames.net/post/580616/#p580616




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


Re: Earwax

2020-10-16 Thread AudioGames . net ForumDevelopers room : chrisnorman7 via Audiogames-reflector


  


Re: Earwax

@93OK, I absolutely take your point about the state problems. Currently, I'm only using it for outputting stuff in a quiz game:def promise():
play_win_or_lose_sound()
sleep 1.0
game.output('You were wrong / right')
sleep 2.0
load_next_question()Obviously that's not exactly how it's coded, but you get the idea. I would hope if people are using it, they kow how to check for state changes ETC.Also, I'm not even using coroutines, it's just a for loop that gets yielded floats, then calls pyglet.clock.schedule_once(same_func, yielded_delay).As for RTD, I spent some serious time today using the remote-ssh extension for VSCode, getting everything to run on a PI so you can at least import stuff. There's lots of:try:
from synthizer import BufferGenerator, Buffer, ...
except ModuleNotFoundError:
Buffer = None
BufferGenerator = None
...It's a little ugly, but works. Now my problem is that I've managed to bugger something up in RTD which I'll try and fix over the weekend, but it's heading in the right direction.

URL: https://forum.audiogames.net/post/580724/#p580724




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


Re: Earwax

2020-10-16 Thread AudioGames . net ForumDevelopers room : chrisnorman7 via Audiogames-reflector


  


Re: Earwax

OK, sorry for the double post, but I've finally fixed docs.Now they build automatically, and I'm as happy as a dog with two dinners.

URL: https://forum.audiogames.net/post/580729/#p580729




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


Re: Earwax

2020-10-16 Thread AudioGames . net ForumDevelopers room : chrisnorman7 via Audiogames-reflector


  


Re: Earwax

OK, sorry for the double post, but I've finally fixed docs.Now they build automatically, and I'm as happy as a dog with two dinners.Docs can once again be found here.

URL: https://forum.audiogames.net/post/580729/#p580729




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


Re: Python how to extract archive

2020-10-20 Thread AudioGames . net ForumDevelopers room : chrisnorman7 via Audiogames-reflector


  


Re: Python how to extract archive

@1Have you googled?

URL: https://forum.audiogames.net/post/581531/#p581531




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


Re: CMD how to list all files from a folder with one exception

2020-10-10 Thread AudioGames . net ForumDevelopers room : chrisnorman7 via Audiogames-reflector


  


Re: CMD how to list all files from a folder with one exception

I found this as the first result in a Google search.

URL: https://forum.audiogames.net/post/579095/#p579095




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


Re: Cytolk, cython extension over the tolk library

2020-10-11 Thread AudioGames . net ForumDevelopers room : chrisnorman7 via Audiogames-reflector


  


Re: Cytolk, cython extension over the tolk library

Hey Paul,Wanted to let you know I've just been playing with cytolk, and I'm loving it. Good job.Going to use it in Earwax, instead of AO2 going forward.Thanks for making this available.

URL: https://forum.audiogames.net/post/579323/#p579323




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


Re: Lucia - OpenSource AudioGame engine written in Python

2020-10-05 Thread AudioGames . net ForumDevelopers room : chrisnorman7 via Audiogames-reflector


  


Re: Lucia - OpenSource AudioGame engine written in Python

At the risk of threadjacking, I'd like to remind you all of Earwax, which is under active development, and (from what I've read) is somewhat more "pythonic".Could also benefit from contributors, and not just on the programming front. Documentation is always something that could use improvements.

URL: https://forum.audiogames.net/post/577418/#p577418




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


Re: The Synthizer Thread

2020-10-05 Thread AudioGames . net ForumDevelopers room : chrisnorman7 via Audiogames-reflector


  


Re: The Synthizer Thread

@278Yep, you fixed it. Legend. Thank you!

URL: https://forum.audiogames.net/post/577420/#p577420




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


Re: why do most people choose python?

2020-10-13 Thread AudioGames . net ForumDevelopers room : chrisnorman7 via Audiogames-reflector


  


Re: why do most people choose python?

@32Is it even a sighted-centric concept? I quite like indentation, especially when you use the Indentnav NVDA addon, or the VSCode extension that I can't remember the name of. It makes navigating code super quick. Dead handy with a braille display too.

URL: https://forum.audiogames.net/post/579913/#p579913




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


Re: Cytolk, cython extension over the tolk library

2020-10-11 Thread AudioGames . net ForumDevelopers room : chrisnorman7 via Audiogames-reflector


  


Re: Cytolk, cython extension over the tolk library

@47Not sure I see the point. I mean, the call to load() is obviously necessary, but not to unload. Nothing seems to happen if you don't unload, unless I'm missing something?

URL: https://forum.audiogames.net/post/579381/#p579381




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


Re: Cytolk, cython extension over the tolk library

2020-10-11 Thread AudioGames . net ForumDevelopers room : chrisnorman7 via Audiogames-reflector


  


Re: Cytolk, cython extension over the tolk library

Als sorry for the double posting.@46Glad you like Earwax too haha.My only problem is still this DLL thing. It just seems to break the whole pip install thing. I mean, accessible_output2 knew where all the DLLs were, is there no way you can tell Tolk where to find them too? I just spent ages trying to debug Earwax because I was running a project in a different directory, and I'd forgotten I needed to place the DLL.

URL: https://forum.audiogames.net/post/579383/#p579383




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


Re: Earwax

2020-10-19 Thread AudioGames . net ForumDevelopers room : chrisnorman7 via Audiogames-reflector


  


Re: Earwax

I've just updated the documentation.I have taken @Camlorn's suggestions on board, so there's now tutorials, as well as a whole load of other updated stuff.As usual, happy hacking.

URL: https://forum.audiogames.net/post/581468/#p581468




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


Re: My coding journey

2020-08-23 Thread AudioGames . net ForumDevelopers room : chrisnorman7 via Audiogames-reflector


  


Re: My coding journey

Hi mate,Glad you're enjoying Python, and it actually came as quite a surprise that you found one of my posts helpful haha.With the whole _javascript_ thing, it's actually not as bad as it might first appear. You can check if something's undefined with:if (obj.name === undefined) {
  console.log('You can think of console.log like print() in Python.')
}Also, you don't need to worry about semicolons in _javascript_, they're optional, and in fact ESLint bitches about them by default.Finally, glad I'm not the only one who learnt HTML and _javascript_ with a BrailleNote haha. I'd love to say I have fond memories, but I don't... I remember crashes, and incompatability.

URL: https://forum.audiogames.net/post/563835/#p563835




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


Re: sound designing, i'M now offerring my skills for those are inneed

2020-08-23 Thread AudioGames . net ForumDevelopers room : chrisnorman7 via Audiogames-reflector


  


Re: sound designing, i'M now offerring my skills for those are inneed

@1I really like your demo! Loving the sounds you've got going on there!If it wouldn't be too much trouble, I'd really like to hear what you can do with different genres: Maybe one for fantasy, one for sci fi, something in construction, post apocalyptic? For myself, I felt like there was too much in one file, and it didn't show off any one of the genres I'm sure you're great at.

URL: https://forum.audiogames.net/post/563838/#p563838




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


Re: Audio game jam - No Video Jam runs thru August 28

2020-08-28 Thread AudioGames . net ForumDevelopers room : chrisnorman7 via Audiogames-reflector


  


Re: Audio game jam - No Video Jam runs thru August 28

@104This is amazing!!! Loving it!Completely the first 5 levels without headphones, but I want to start from the beginning to appreciate all the lovely sound design.How did you create this? I see unity-like DLLs in the game folder. Did you use Unity?

URL: https://forum.audiogames.net/post/565119/#p565119




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


Re: Cytolk, cython extension over the tolk library

2020-08-28 Thread AudioGames . net ForumDevelopers room : chrisnorman7 via Audiogames-reflector


  


Re: Cytolk, cython extension over the tolk library

OK, nice work. Any chance detect_screen_reader could return None if there's no screen reader, rather than a string? Seems like it would make more sense.Also, if you can't include DLLs in your distribution, what do I need to have in mine? I'm not even sure where the NVDA DLL is (it's not in iwth all the other NVDA stuff that I can see). Do I need Jaws dlls? Liblouis for braille?I know there's not much to the library, but I wonder if you're consider adding documentation, with this sort of specific in it, so people don't have to look here?Loving what you're doing though. I'm probably going to switch over to cytolk for speech stuff, especially if you're actively maintaining this.

URL: https://forum.audiogames.net/post/565118/#p565118




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


Re: Audio game jam - No Video Jam runs thru August 28

2020-08-28 Thread AudioGames . net ForumDevelopers room : chrisnorman7 via Audiogames-reflector


  


Re: Audio game jam - No Video Jam runs thru August 28

@107Is the creator sighted? i was under the impression it was impossible to use Unity without seeing it, but happy to be proved wrong.

URL: https://forum.audiogames.net/post/565195/#p565195




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


Re: Cytolk, cython extension over the tolk library

2020-08-28 Thread AudioGames . net ForumDevelopers room : chrisnorman7 via Audiogames-reflector


  


Re: Cytolk, cython extension over the tolk library

@20RTD would be great, but whatever you know how to do. I only say RTD because it's the canonical way of doing things.

URL: https://forum.audiogames.net/post/565193/#p565193




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


Re: Does WSL2 support Linux audio?

2020-08-28 Thread AudioGames . net ForumDevelopers room : chrisnorman7 via Audiogames-reflector


  


Re: Does WSL2 support Linux audio?

Hi,According to this link, yes, with some work.

URL: https://forum.audiogames.net/post/565194/#p565194




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


Re: Does WSL2 support Linux audio?

2020-08-28 Thread AudioGames . net ForumDevelopers room : chrisnorman7 via Audiogames-reflector


  


Re: Does WSL2 support Linux audio?

@3You're welcome. 

URL: https://forum.audiogames.net/post/565224/#p565224




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


Re: Strange issue with Python

2020-08-29 Thread AudioGames . net ForumDevelopers room : chrisnorman7 via Audiogames-reflector


  


Re: Strange issue with Python

Also, if you start using mypy and type hints ASAP, it'll catch errors like this one for you.

URL: https://forum.audiogames.net/post/565438/#p565438




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


Re: Cytolk, cython extension over the tolk library

2020-08-29 Thread AudioGames . net ForumDevelopers room : chrisnorman7 via Audiogames-reflector


  


Re: Cytolk, cython extension over the tolk library

Hey paul,I'm keeping an eye on this topic. Mind letting us know when the docs are up? I'd love to use your stuff, but I feel like I need a fair amount of info about what DLLs I need to get from where, and where to put them before I can.Cheers again mate. Good job.

URL: https://forum.audiogames.net/post/565512/#p565512




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


Re: Earwax

2020-08-29 Thread AudioGames . net ForumDevelopers room : chrisnorman7 via Audiogames-reflector


  


Re: Earwax

Hey all,I'm starting on the game maker part of Earwax, and I'm hoping to get some input on what sort of interface people would like to see?I'm working on a command line interface currently, so the work flow would be something like:mkdir game
cd game
earwax init (initialises default files and directory structure)
earwax createmap "Scarry Forest" (creates a new map called Scarry Forest)
earwax maps (shows a list of maps with indices next to them)
earwax configuremap 1 --name "Scary Forest" (rename the first map because we spelled the name wrong)
earwax build 1 (open a GUI that allows you to use arrow keys to move around a map and place things from menus)
earwax surfaces (shows a list of added surfaces)Surfaces dictate what sound will be heard when moving around maps. There will be a default surface for the map (which could be silent), and each "area" of the map can have its own surface.You create them by dumping directories of sound files in the "sounds/surfaces" directory, which is created with `earwax init`. They should look like:sounds:    surfaces:        concrete:            concrete1.wav            concrete2.wav        sand:            sand.wavIt will eventually be possible to configure the "actions" that are available on a per-level basic, so for example you could have a city map that's 2d where you can turn, and walk, and run, followed by a side scroller sewer pipe level where you can only move sideways and jump.I'm thinking of making some kind of system where you can create variables with a command like `earwax global point int 0`, which - when coupled with a basic script builder - will allow you to do minimal coding in your games.For anything not covered by the basic system (likely a lot), you'll be able to write your own Python, and the system will pull it in when creating a final script with a command like `earwax build`.So there's my ideas so far. I'd love to hear what people think (the good and the bas), and as many suggestions as humanly possible.I'm sure there's better ways to do what I want to do, so please feel free to be critical.Thanks in advance for any and all feedback.

URL: https://forum.audiogames.net/post/565514/#p565514




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


  1   2   3   4   5   >