Development news : AAO goes open-source NOW !
- Unas
- Admin / Site programmer
- Posts: 8850
- Joined: Tue Jul 10, 2007 4:43 pm
- Gender: Male
- Spoken languages: Français, English, Español
- Contact:
Re: Development news : AAO goes open-source NOW !
Well, I let you judge of what you consider a big development or not
The idea behind this sentence is : don't assume that your code will systematically be accepted. You should probably avoid spending a lot of time on something if I don't even agree on the principle
Now, hotkeys I have nothing against, on the contrary that's the kind of stuff I'd like to see added. But it can be tricky to integrate cleanly in the code ^^
You're welcome to give it a try
The idea behind this sentence is : don't assume that your code will systematically be accepted. You should probably avoid spending a lot of time on something if I don't even agree on the principle
Now, hotkeys I have nothing against, on the contrary that's the kind of stuff I'd like to see added. But it can be tricky to integrate cleanly in the code ^^
You're welcome to give it a try
- mercurialSK
- Posts: 297
- Joined: Sat Jan 11, 2014 9:26 am
- Spoken languages: English
- Location: foolishly fooling like a foolish fool
- Contact:
Re: Development news : AAO goes open-source NOW !
Well...I have this proof of concept?
I kind of tried to match your code quality...and I'm thinking just hotkeys for the most commonly used stuff or something (haven't worked anything out yet, just wanted to see if I could do it). I'm kinda unsure so feedback would be nice XD
Edit: Actually this feels a bit off topic should this stuff be PM'd or maybe some new thing for general questions made instead?
I kind of tried to match your code quality...and I'm thinking just hotkeys for the most commonly used stuff or something (haven't worked anything out yet, just wanted to see if I could do it). I'm kinda unsure so feedback would be nice XD
Edit: Actually this feels a bit off topic should this stuff be PM'd or maybe some new thing for general questions made instead?
Backlog: v6 Perceive generator, Apollo, everything else (My thread)
Someday, on AAO™: Chris Tenson: Ace Attorney & A Turnabout Called Justice (pt 2)
Someday, on AAO™: Chris Tenson: Ace Attorney & A Turnabout Called Justice (pt 2)
Re: Development news : AAO goes open-source NOW !
Finally we can do something about v6
Unas, I propose to create subforum dedicated to AAO development ;D
Unas, I propose to create subforum dedicated to AAO development ;D
- kwando1313
- Posts: 7684
- Joined: Tue Jul 22, 2008 6:33 pm
- Gender: Male
- Spoken languages: English, Français (un peu), Ancient Belkan
- Location: Uminari City
Re: Development news : AAO goes open-source NOW !
That was for the mocked install.
Avatar made by Rimuu~
"The Knight of the Iron Hammer, Vita, and the Steel Count, Graf Eisen. There's nothing in this world we can't destroy."
- Unas
- Admin / Site programmer
- Posts: 8850
- Joined: Tue Jul 10, 2007 4:43 pm
- Gender: Male
- Spoken languages: Français, English, Español
- Contact:
Re: Development news : AAO goes open-source NOW !
Well kwando, for the moment I don't see any problem with that on my end. :-/
I'm not sure how it can happen actually. Your message basically complains that variable $user is empty, but the $user object is instatiated explicitly in my common.php mock.
Unless the mock itself is not called, this is weird.
What page are you trying to access when you get this error ? The index page ?
Did you copy the /mocked_install/config.php to /trunk/config.php directly ? No other edit ?
If the issue persists, can you check the details of your php installation ?
You can create a PHP page containing just
And then navigate to it.
I'd be interested in knowing :
- Your PHP version (mine says "PHP Version 5.3.10-1ubuntu3.18" ; 5.3.10 is the relevant part here)
- Whether you have an "sqlite3" section in this page (you need to have one for the mocked db to work)
I guess I'll have to create (or not ! ) a new forum section about development.
Regarding your POC, it's pretty good, it's a clever way of adding this feature as a drop-in addon to the player without affecting the rest of the code too much.
I see a few problems with this approach though :
However, the first point is blocking : the hotkey system has to be able to know if hotkeys are safe to use at this point or not.
One way of fixing the issue could be to check the origin of the keydown event : if it originates from a form element or something of the kind, it shouldn't be interpreted as a hotkey...
Those are just my thoughts though, if you have other ideas...
I'm not sure how it can happen actually. Your message basically complains that variable $user is empty, but the $user object is instatiated explicitly in my common.php mock.
Unless the mock itself is not called, this is weird.
What page are you trying to access when you get this error ? The index page ?
Did you copy the /mocked_install/config.php to /trunk/config.php directly ? No other edit ?
If the issue persists, can you check the details of your php installation ?
You can create a PHP page containing just
Code: Select all
<?php phpinfo(); ?>
I'd be interested in knowing :
- Your PHP version (mine says "PHP Version 5.3.10-1ubuntu3.18" ; 5.3.10 is the relevant part here)
- Whether you have an "sqlite3" section in this page (you need to have one for the mocked db to work)
Certainly not PMs ! xDmercurialSK wrote:Well...I have this proof of concept?
I kind of tried to match your code quality...and I'm thinking just hotkeys for the most commonly used stuff or something (haven't worked anything out yet, just wanted to see if I could do it). I'm kinda unsure so feedback would be nice XD
Edit: Actually this feels a bit off topic should this stuff be PM'd or maybe some new thing for general questions made instead?
I guess I'll have to create (or not ! ) a new forum section about development.
Regarding your POC, it's pretty good, it's a clever way of adding this feature as a drop-in addon to the player without affecting the rest of the code too much.
I see a few problems with this approach though :
- There is one player action that requests that the user type in some text (that is then stored in a variable). If he types an s or a c, these hotkeys will be triggered as well. Here it wouldn't be dramatic thanks to your visibility check (the skip button hotkey would not be triggered because it's hidden at this point, and switching the CE does not have a big impact), but still, that's not good.
- If you want to create hotkeys for opening a piece of evidence, what will you do ? The evidence ID is not displayed on screen so you can't assign "hotkey 1 to block with evidence id 1", etc. You would have to think in a positional way (hotkey 1 to first evidence displayed, etc). It's more dynamic than just a fixed ID.
- You will absolutely not be able to extend this approach to hotkeys in the editor, if we decide do.
In the editor, buttons do not have a unique ID to map, since there are hundreds of identical buttons (as many as you have frames, etc.)
However, the first point is blocking : the hotkey system has to be able to know if hotkeys are safe to use at this point or not.
One way of fixing the issue could be to check the origin of the keydown event : if it originates from a form element or something of the kind, it shouldn't be interpreted as a hotkey...
Those are just my thoughts though, if you have other ideas...
- kwando1313
- Posts: 7684
- Joined: Tue Jul 22, 2008 6:33 pm
- Gender: Male
- Spoken languages: English, Français (un peu), Ancient Belkan
- Location: Uminari City
Re: Development news : AAO goes open-source NOW !
Yeah, it was the index page. And I did copy the config over. Was quite confused myself why that was happening...
EDIT: Now that I'm back on my computer, I have php 5.5.8. And I do have a sqlite3 section.
EDIT: Now that I'm back on my computer, I have php 5.5.8. And I do have a sqlite3 section.
Avatar made by Rimuu~
"The Knight of the Iron Hammer, Vita, and the Steel Count, Graf Eisen. There's nothing in this world we can't destroy."
- Unas
- Admin / Site programmer
- Posts: 8850
- Joined: Tue Jul 10, 2007 4:43 pm
- Gender: Male
- Spoken languages: Français, English, Español
- Contact:
Re: Development news : AAO goes open-source NOW !
Ah, you have a much more recent php version than me. IIRC, PHP 5.4 was a huge update, I wonder if they changed something about global variables handling in there. I'll have to check that, this could be the explanation.
- kwando1313
- Posts: 7684
- Joined: Tue Jul 22, 2008 6:33 pm
- Gender: Male
- Spoken languages: English, Français (un peu), Ancient Belkan
- Location: Uminari City
Re: Development news : AAO goes open-source NOW !
Ah, ok. I was wondering if that might have been the issue...
Should I downgrade my php for now? Or would it be better to wait for you to make an update first?
Should I downgrade my php for now? Or would it be better to wait for you to make an update first?
Avatar made by Rimuu~
"The Knight of the Iron Hammer, Vita, and the Steel Count, Graf Eisen. There's nothing in this world we can't destroy."
- Unas
- Admin / Site programmer
- Posts: 8850
- Joined: Tue Jul 10, 2007 4:43 pm
- Gender: Male
- Spoken languages: Français, English, Español
- Contact:
Re: Development news : AAO goes open-source NOW !
Actually, there is something you could try.
After reading up a little bit, I think there might be a mistake in the code of my mock, but which I did't notice because of a php bug in my version ^^
In / mocked_install / phpbb_files / common.php
You should add the keyword "global" before all of my global variable assignments.
Tell me if this fixes it
After reading up a little bit, I think there might be a mistake in the code of my mock, but which I did't notice because of a php bug in my version ^^
In / mocked_install / phpbb_files / common.php
You should add the keyword "global" before all of my global variable assignments.
Code: Select all
global $user = new user();
...
global $auth = new auth();
...
global $db = new db(__DIR__ . '/db.sqlite');
- kwando1313
- Posts: 7684
- Joined: Tue Jul 22, 2008 6:33 pm
- Gender: Male
- Spoken languages: English, Français (un peu), Ancient Belkan
- Location: Uminari City
Re: Development news : AAO goes open-source NOW !
Doing that gives me a new error.
Code: Select all
Parse error: syntax error, unexpected '=', expecting ',' or ';' in C:\Program Files (x86)\EasyPHP-DevServer-14.1VC11\data\localweb\aao-game-creation-engine\mocked_install\phpbb_files\common.php on line 45
Avatar made by Rimuu~
"The Knight of the Iron Hammer, Vita, and the Steel Count, Graf Eisen. There's nothing in this world we can't destroy."
- Unas
- Admin / Site programmer
- Posts: 8850
- Joined: Tue Jul 10, 2007 4:43 pm
- Gender: Male
- Spoken languages: Français, English, Español
- Contact:
Re: Development news : AAO goes open-source NOW !
My mistake, I work in Java every day so I forgot that in PHP you couldn't declare and assign in the same statement... ^^
Code: Select all
global $user;
$user = new user();
...
global $auth;
$auth = new auth();
...
global $db;
$db = new db(__DIR__ . '/db.sqlite');
- kwando1313
- Posts: 7684
- Joined: Tue Jul 22, 2008 6:33 pm
- Gender: Male
- Spoken languages: English, Français (un peu), Ancient Belkan
- Location: Uminari City
Re: Development news : AAO goes open-source NOW !
No worries. I use Python for work so all this php stuff is weird for me. xP
Unfortunately, same error shows up, though.
Unfortunately, same error shows up, though.
Code: Select all
<b>Notice</b>: Trying to get property of non-object in <b>C:\Program Files (x86)\EasyPHP-DevServer-14.1VC11\data\localweb\aao-game-creation-engine\trunk\includes\UserDataHandler.class.php</b> on line <b>47</b><br />
Avatar made by Rimuu~
"The Knight of the Iron Hammer, Vita, and the Steel Count, Graf Eisen. There's nothing in this world we can't destroy."
- Unas
- Admin / Site programmer
- Posts: 8850
- Joined: Tue Jul 10, 2007 4:43 pm
- Gender: Male
- Spoken languages: Français, English, Español
- Contact:
Re: Development news : AAO goes open-source NOW !
So, it's not so simple as I thought...
Well, I'll see later then, it's high time I went to sleep now.
In the mean time, if you want to keep trying out stuff, you can try the full integrated install : in theory, phpBB is thoroughly tested to work in most php environments, so even if there is a mistake in the way I did the mock, I guess this mistake isn't present in the real deal. It doesn't take that long, and I believe easyphp enables you to setup a mysql database easily
Well, I'll see later then, it's high time I went to sleep now.
In the mean time, if you want to keep trying out stuff, you can try the full integrated install : in theory, phpBB is thoroughly tested to work in most php environments, so even if there is a mistake in the way I did the mock, I guess this mistake isn't present in the real deal. It doesn't take that long, and I believe easyphp enables you to setup a mysql database easily
- kwando1313
- Posts: 7684
- Joined: Tue Jul 22, 2008 6:33 pm
- Gender: Male
- Spoken languages: English, Français (un peu), Ancient Belkan
- Location: Uminari City
Re: Development news : AAO goes open-source NOW !
Yeah, I might go do that...
I should be able to set up a full install on an easyphp server, right?
EDIT: Actually... You say to go through the installation process, but... What exactly should we be writing for the server info, anyways?
I should be able to set up a full install on an easyphp server, right?
EDIT: Actually... You say to go through the installation process, but... What exactly should we be writing for the server info, anyways?
Avatar made by Rimuu~
"The Knight of the Iron Hammer, Vita, and the Steel Count, Graf Eisen. There's nothing in this world we can't destroy."
- mercurialSK
- Posts: 297
- Joined: Sat Jan 11, 2014 9:26 am
- Spoken languages: English
- Location: foolishly fooling like a foolish fool
- Contact:
Re: Development news : AAO goes open-source NOW !
A forum section would be neat.
Actually I didn't think of any of those points, just wanted to get into the code XD And forgot the player did have a form. That wouldn't be hard to check for. Thanks for the feedback
About hotkeying evidence...that wasn't what I had in mind anywhere but it would be neat though hm.
Actually I didn't think of any of those points, just wanted to get into the code XD And forgot the player did have a form. That wouldn't be hard to check for. Thanks for the feedback
About hotkeying evidence...that wasn't what I had in mind anywhere but it would be neat though hm.
Backlog: v6 Perceive generator, Apollo, everything else (My thread)
Someday, on AAO™: Chris Tenson: Ace Attorney & A Turnabout Called Justice (pt 2)
Someday, on AAO™: Chris Tenson: Ace Attorney & A Turnabout Called Justice (pt 2)