2019-10-14 19:22:13 (edited by JessicaGG 2020-04-12 12:40:53)

Update, Lucia 2.0 and Discord server

As part of the effort for version 2.0 of lucia (which will mostly be a rewrite of the entire thing), I have created a discord server, where interested people can follow along, give more direct feedback and have general discussions about Lucia.
I really hope to see as many interested people there.

To join simply click here.

PS: Please note, that this is not a general purpose python support server, other communities exists for that. This is mainly intended for lucia interested people.

update 20-11-2019: Documentation are now available at https://LuciaSoftware.github.io/lucia

lucia

LuciaSoftware brings you today, an audio game engine written in python.

https://github.com/LuciaSoftware/lucia.git


Goals:

The goal of lucia is to change the audio game creation method from the now old and no longer maintained bgt, to python.
Lucia should not act as a starting game, but as a base, that a high quality game can be build upon.
In addition lucia should be cross platform, At Least on windows and mac.

Features
  • Support for OpenAL and BASS as audio backends, with options for writing custom ones.

  • Support for encryption and storage of game assets in a secure format.

  • Support for a way to output text through speech and braille on common screen readers (NVDA, Jaws, SAPI, VoceOver, eSpeak)

  • Support for three dimensional rotation (for games that need it).

  • Has varius commonly used UI elements, such as different types of menus and inputs build in.

  • Cross platform.

  • And more.


Installing lucia

Lucia is a module for python 3x, so you'll need that first.
There's the to default ways to install lucia.
Through pip

pip install lucia

Or the manual way (to get latest features, do note that it could be unstable).

git clone [url]https://github.com/LuciaSoftware/lucia.git[/url]
cd lucia
python setup.py install
Contributing

Everyone is welcome to help improve Lucia, to start look at the opened issues, and go from there.
Remember to follow our contribution guidelines, they can be found at https://github.com/luciasoftware/lucia/ … ibuting.md
If you feel lucia is missing something, do open an issue and we'll take it from there.
Do note, that if you modify / improve lucia, you are required to give back your contributions to LuciaSoftware (per it's GNU Lesser General Public License, see below).

License and credits:

Copyright (C) 2019  LuciaSoftware and it's contributors.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, version 3 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this program.  If not, see https://github.com/LuciaSoftware/lucia/ … r/LICENSE.

People from this forum, that has helped make lucia possible.

  • NicklasMCHD

  • Cartertemm

  • pauliyobo

  • X0 (Colton)

  • Kianoosh

  • visualstudio

  • ivan_soto


Known games to use Lucia
  • WhoWantsToBeAMillionaire By Accessiware

  • Perilous Marathon By IMS Productions

Do let us know, if you want your game added to the list.

If you like what I do, Feel free to check me out on GitHub, or follow me on Twitter

2019-10-14 19:49:53

Nice work, I'll have to check it out. I hope there's some documentation, as I'm not great at figuring out python stuff without it.

Facts with Tom MacDonald, Adam Calhoun, and Dax
End racism
End division
Become united

2019-10-14 19:50:25

There is documentation for everything tongue

If you like what I do, Feel free to check me out on GitHub, or follow me on Twitter

2019-10-14 19:52:16

Hi.
I haven't dug in to the docs yet, but it may be worth mentioning to people that want to create shareware/payed games that bass requires a license for each platform.

Much less active on this forum than in the past.

Check out my live streams: http://lerven.me
follow me on Twitter: http://twitter.com/liamerven

2019-10-14 19:54:31

Hey!
Thank you for releasing this, I am not gonna lie, I was a bit skeptical if you would or not.
Right off the bat, couple of questions.
1: Can we use parts of Lucia in our own projects, meaning that if I only want to use, say, rotation, am I allowed to take it out of the engine as long as I say exactly what I've used?
2: What attribution do you all expect? A mention in the credits? Open sourcing the project with any part of Lucia in it?
Thank you and again, I appreciate you releasing this, even though I may not use all of this do to me getting into a habit of accomplishing things a certain way.

2019-10-14 20:12:24 (edited by JessicaGG 2019-10-14 20:13:58)

Hi @amerikranian
To answer your questions.
1: Can we use parts of Lucia in our own projects, meaning that if I only want to use, say, rotation, am I allowed to take it out of the engine as long as I say exactly what I've used?
- By default no, but you can do something like the below (with any util class)
from lucia.utils import rotation
# use rotation functions here.

2: What attribution do you all expect? A mention in the credits? Open sourcing the project with any part of Lucia in it?
- not necessarily. If you modify lucia, you are required to give those modifications back.
To quote choosealicense.com:
However, a larger work using the licensed work through interfaces provided by the licensed work may be distributed under different terms and without source code for the larger work.
Which essentially mean, that you are allowed to create closed source software / games / whatever with lucia but if you change / modify lucia itself, you are required to give those modifications back.
Hope that answered your questions.

hey @Liam
Yes, that could be a good idea hehe tongue I'll put it in.

If you like what I do, Feel free to check me out on GitHub, or follow me on Twitter

2019-10-14 20:19:54

hi,
if you are planning to make a payed game and you don't want to pay for bass, use OpenAL instead.
also, feature requests are welcomed in the
issues page.

2019-10-14 20:21:14 (edited by amerikranian 2019-10-14 20:21:38)

I see. Thank you. I will hopefully have more of a chance to sit down and mess with this some time soon.
A note: When running make.bat the generated documentation was pretty sparse. Is it because some things are missing and you guys are working on them?
An example with open al would be nice as well.

2019-10-14 20:53:03

at ironcross. You can find some documentation about the functions/variables that are not documented in lucia docs. I think menu2 Is one of them that you can get a lot of info by looking at its code.

---
Co-founder of Sonorous Arts.
Check out Sonorous Arts on github: https://github.com/sonorous-arts/
my Discord: kianoosh.shakeri2#2988

2019-10-14 21:14:41

Could you all provide open al example? I got a traceback saying that a class was unable to be instantiated, but I think I'm just doing it wrong

2019-10-14 21:53:34 (edited by amerikranian 2019-10-14 22:03:24)

Double posting time:
How easy would it be to convert the rotation values to normal? East being 0 and north being 90 screws royally with my head.

2019-10-14 22:16:04

I'm just curious, how are you supposed to pronounce Lucia? Eloquence says it like Loosha. Is it supposed to be Looseea? I know why there's confusion. If you play A Hero's Call, there's a character named Lucian, and different people in the game pronounce his name different ways. The guy at the mine entrance calls him Looseean, whereas at least one of the other guards calls him Looshan. Note: Eloquence pronounces the phonetic spellings in this post as intended.

2019-10-14 22:19:57

@12, it's lucia, that is to say, the way eloquence says it.

2019-10-14 22:33:17

I don't think the 3dpackfile example works correctly...
If I start out facing east, 0 degrees, the sound should be on my left. Yet, when I run the example, the sound is to my right.
My implementation of the sound pool was designed with north, east, south, and west equaling 0, 90, 180, and 270 degrees respectively, so maybe that's the issue here?

2019-10-14 22:51:00 (edited by Ethin 2019-10-14 22:51:39)

Not sure why you guys have the rotational values wrong. They're the same across all metric systems -- 0/360, 90, 180, 270.

"On two occasions I have been asked [by members of Parliament!]: 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out ?' I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question."    — Charles Babbage.
My Github

2019-10-14 22:57:42

@Ethin and others
That's because OpenAL uses a left handed coordinate system while bass uses a right handed one (well, or the other way around).

If you like what I do, Feel free to check me out on GitHub, or follow me on Twitter

2019-10-14 23:21:49

I just did pip install lucia. Where are the docs? Just wondering.

2019-10-14 23:28:43

So this means that bass and open al aren't compatible. How do we get around that issue?
Also if somebody could provide an open al example with lucia that'd be nice...

2019-10-14 23:28:48 (edited by Ethin 2019-10-14 23:41:24)

@16, that does not facilitate the alteration of direction rotations. The only difference between a left-handed coordinate systemand a right-handed coordinate system (as I remember explaining on this forum multiple times) is the Z-coordinate. In a right-handed coordinate system, the positive X and Y axes point right and up, and the negative Z axis points forward. In a left-handed coordinate system, the positive X, Y, and Z axes point right, up, and forward respectively. As an example, OpenGL uses a right-handed coordinate system. I believe OpenAL does too. All you need do is negate the Z axis when working with right-handed coordinate systems and you will be fine. (FMOD uses a left-handed system by default, though this can be altered to use a right-handed coordinate system for compatibility if your using OpenGL. BASS uses a left-handed coordinate system only with no option to alter that setting.) A function in Python to set coordinates might look like so:

def set_coords(x: int, y: int, z: int):
    self.x = x
    self.y = y
    if self.righthanded_coordinate_system:
        if z < 0: # We're going backwards
            self.z = math.abs(z)
        else: # Forwards
            self.z = -z
    else:
        self.z = z

All you would then need to do is keep that in mind when updating 3D positions. You could even abstract this into a module:

import math

def calc_coords(x: int, y: int, z: int, use_right_handed: bool)->(int, int, int):
    if use_right_handed:
        if z < 0: # We're going backwards
            return (x, y, abs(z))
        else: # Forwards
            return (x, y, -z)
    else:
        return (x, y, z)
"On two occasions I have been asked [by members of Parliament!]: 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out ?' I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question."    — Charles Babbage.
My Github

2019-10-15 00:42:10

Yeh so, after messing with this some more, here are my thoughts.
I like the engine overall. You do have a rather interesting way of gathering input, I found something different online, but your way works, too.
I would perhaps add an option to the virtual input class to change the "hidden" message to the user's liking, though that is just me.
I would also expand the input class to support the ability to add typing sounds.
A minor convenience would be to alert the user of entering a capital char, either via a sound or by saying cap (I don't know if you can control the pitch of NVDA, though that can certainly be an option).
Add the ability to hold down keys in the input box, such as aaaaaaaaaaaa, right now it accepts only one letter at a time, which is also fine.
Add the ability to hit escape and close the input box (should be available at user discretion).
Overall, I am digging this. Except the open al/bass conflicts, I am all for using the engine in my future projects.
I do think that open al and bass issue needs to be resolved first, though. Right now I can't use lucia and my working sound pool as sound_lib throws errors about it being initialized already.

2019-10-15 00:49:51 (edited by Ethin 2019-10-15 00:50:40)

The OpenAL issues can be resolved by using the code I wrote in #19. Don't go messing with angles in some false notion that by doing so you will resolve a conflict between two ways of representing 3D coordinates. Cardinal directions will be the same no matter what system you use. (Plus, 3D coordinates are different from rotation.)

"On two occasions I have been asked [by members of Parliament!]: 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out ?' I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question."    — Charles Babbage.
My Github

2019-10-15 02:35:26

The rotation system being that way isn't the fault of any handed coordinates, it's because the trig functions work on that assumption of the unit circle. If I knew a reliable method to convert bearing to trig I would have used that, but one goes clockwise while the other doesn't, and they have different starting points. Either the sound pool or the backend's position function takes care of handed coordinate systems so you can use positive x is right, positive y is forward, positive z is up. Not sure what handed you'd call that. The cardinal directions are very set, but unfortunately sine and cosine don't operate on the cardinal directions, nor do they operate on degrees, and arc tangent is a mess either way. An update can be made if we have an implementation to convert at will between the two rotation systems to imply bearing and convert under the hood.

----------
An anomaly in the matrix. An error in existence. A being who cannot get inside the goddamn box! A.K.A. Me.

2019-10-15 02:37:44

@22, the coordinate system your talking about is the Cartesian coordinate system. Its definitely not the coordinate system that audio or graphics libraries use to my knowledge.

"On two occasions I have been asked [by members of Parliament!]: 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out ?' I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question."    — Charles Babbage.
My Github

2019-10-15 04:48:31 (edited by amerikranian 2019-10-15 04:50:14)

My current version of the sound pool, I do still need to update the official topic, has worked successfully with the BGT port of the rotation script.  That script has East equaling 90, so I don’t understand why if mine works, yours does not. That being said, my sound pool also requires you to calculate theta with degrees, convert them to radians.

2019-10-15 08:57:55

Hi and thanks so much for the engine. i am deffinately going to check it out right now!

best regards
never give up on what ever you are doing.