Page 3 of 22

Re: trAInsported: Alpha testers needed

Posted: Tue Feb 12, 2013 1:23 pm
by Germanunkol
That is weird. I use imageData:encode to save the image. Could you check if the trAInsported folder is created in the save dir? Should be:
C:\Users\user\AppData\Roaming\LOVE\trAInsported or %appdata%\LOVE\trAInsported
Is there anything in that folder after starting the game? Cause that's where all the images should be placed...


On a side note: Ochros' AI is fighting its list up the ranks. He seems to be better than my test Ai - well done!
His score is tracked here:
http://trainsportedgame.no-ip.org/
Seems like he implemented a simple A* pathfinding algorithm.

Edit: Ochros, if you're a member on this forum, could you post a bit of feedback? For example, you seem to use tricks to make the pathfinding faster - is the number of lines I allow the AI to execute not enough?

Re: trAInsported: Alpha testers needed

Posted: Tue Feb 12, 2013 1:32 pm
by jonyzz
The game looks great :) ! I've got the following error on Linux (LOVE 0.8 + LuaJIT). I think somebody already reported it.

Code: Select all

Error: Scripts/tutorialBox.lua:22: attempt to index a nil value
stack traceback:
	Scripts/tutorialBox.lua:22: in function 'new'
	Tutorials/Tutorial1.lua:117: in function 'mapRenderingDoneCallback'
	Scripts/map.lua:155: in function 'runMap'
	main.lua:546: in function 'update'
	[string "boot.lua"]:407: in function <[string "boot.lua"]:373>
	[C]: in function 'xpcall'
The problem is that you are trying to access variable number of function arguments with the arg variable. Since Lua 5.1, you should use the "..." keyword instead.

Code: Select all

function tutorialBox.new(x, y, msg, ... )
    local arg = { ... } -- Just declare your own arg variable

Re: trAInsported: Alpha testers needed

Posted: Tue Feb 12, 2013 1:38 pm
by Germanunkol
Thanks a lot for the fix! Will implement this ASAP - Yes, it has been reported but I did not experience the error myself, so I had no idea where it came from.

Does it work on your machine when you changed it?

Also, thanks a lot for the nice words :D
I was actually going to work on the graphics some more... there's supposed to be different settings (urban, rural etc) with different gameplay styles (urban generates way more passengers, for example) - but this might still take a while.

Re: trAInsported: Alpha testers needed

Posted: Tue Feb 12, 2013 2:51 pm
by jonyzz
Germanunkol wrote:Does it work on your machine when you changed it?
I've also made the same change in msgBox:new and it works fine now.

Is there an API documentation for all ai callback functions? I'm too lazy to go through turorials again :) .

Re: trAInsported: Alpha testers needed

Posted: Tue Feb 12, 2013 3:07 pm
by Germanunkol
There is a Documentation.html in the .zip file (or a Documentation.md, if you prefer).

Or check it out on github: https://github.com/Germanunkol/trAInspo ... ntation.md (prettier formatting).

I have edited the source code also (the "args" problem happened in multiple files). Get the new version from here:
download/file.php?id=6921 or the first post in the thread.


Update: I fixed the problem that would occur when online map and tutorial map were rendered at the same time. I simply made a seperate menu entry for the live matches. This way the two maps can never be rendered at the same time.
I'll wait a little longer for another uploaded version though - I'll make some more changes and wait for more bug-reports first. Thank you all for reporting!

In the meantime, Ochrod's AI has the best rating... he's managed to beat all my test AIs! :D Yay!

Re: trAInsported: Alpha testers needed

Posted: Wed Feb 13, 2013 6:47 pm
by Taz
I've now tested trAInsprted for several days (Im Ochros ^^ ) and some things cames in my mind while working on the ai:

1.Implement the require function from lua so we are able to expand the code into more files.
2.Make a function to clear the console.
3.Maybe give the functions more time to run throught it, because for example A* fails at larger maps. In my ai "Test_AstarTrain" it stops at (18x18).
4.It would be nice when the function "buyTrain" would return the train e.g a table or id so it get easiert to handle all trains.
5.Make it possible on your website to have a Username with 3 letters so I can use my real username (just kidding :P).

I hope some of these suggestions will make it's way into your game and good luck with the further development on it. In the meantime I write a new ai and see how good this one will be :)

Edit:I've found a bug that can occur when the ai didn't load up in my case an case error and after I've fixed it, this error popped up

Re: trAInsported: Alpha testers needed

Posted: Wed Feb 13, 2013 9:59 pm
by Germanunkol
Update:
Can now be played by simply double-clicking! AI folder has been moved to Savedir. Should run on windows as well (though I'd love to have some confirmation on that still.
download/file.php?id=6931

Rough Changelog:
  • Moved AI folder to the save directory. This should be safer, cleaner, and more cross-platformy.
  • Added screen resolution setting (settings menu). Gets saved and reloaded at next game start as well!
  • Fixed map-rendering bug that occured when tutorial and live-match were loaded.
  • Added a way of connecting to the server in-game. No longer need to use the --host option!
  • Added a sound.
  • Fixed the nil pointer problem
  • Changed input to use unicode characters to allow + and - to work on other keyboards.
  • Increased the number of lines an AI can execute before getting cut off.
Edit: Taz - you beat me to it. I will try to implement most of your changes - they all sound reasonable! Thanks a lot for the feedback!
The "require" function might get complicated when it gets to uploading the files. I'll see.

Re: trAInsported: Alpha testers needed

Posted: Wed Feb 13, 2013 10:24 pm
by Darky
That's weird.. I got this error during the rendering of the live map
Image
But it seems to work now.. edit : still buggy

Re: trAInsported: Alpha testers needed

Posted: Thu Feb 14, 2013 10:35 am
by Roland_Yonaba
Hi Germanukol, I finally got it working.
That's totally strange. I'm running on Windows 8, x64. Well, trAInsported runs fine with love0.8.0 x86 executable.
But it crashes with love0.8.0 x64 executable on my computer.
Going back to the game :)

Re: trAInsported: Alpha testers needed

Posted: Thu Feb 14, 2013 11:20 am
by Germanunkol
Darky wrote:That's weird.. I got this error during the rendering of the live map
But it seems to work now.. edit : still buggy
I restarted the server - does it work now?
I believe it has to do with a synchronization problem. It's a known bug, but I could not recreate it so far - I only had it happen to me once. Was there anything special you did? I think it is not sending all the data correctly. That's why I get the nil error message. Until I find the problem, I believe I'll just make it catch the error and abort the connection if this happens...
If it happens again, could you give me the last 20 to 50 lines of your console's output?
Roland_Yonaba wrote: That's totally strange. I'm running on Windows 8, x64. Well, trAInsported runs fine with love0.8.0 x86 executable.
But it crashes with love0.8.0 x64 executable on my computer.
Uh oh, Windows 8...
That's a totally new area for me :P
Can anyone else test with windows 8? I don't actually know anyone who has windows 8, come to think of it...
Good thing you got it working. Thanks for not loosing patience!

Edit: Does the screen resolution setup work for everyone? Can you change the resolution and does it remember it for the next time you start the game?