Page 4 of 22

Re: trAInsported: Alpha testers needed

Posted: Thu Feb 14, 2013 12:57 pm
by Roland_Yonaba
Resolution setting is working totally fine, and settings are saved and loaded back perfectly.
Too bad images are not scaled when resolution is changed though.

Actually, I'd like to suggest something. Instead of using hardcoded resolutions (in Script/globals.lua), why not display a list of availables graphics modes, so that the user would pick the one that suits the best to his screen ? For instance, mine is 1366x768, and I can't find it in the settings.

So maybe something like this would be better ? That's just an idea thrown on the table, i'll let you judge.

Code: Select all

RESOLUTIONS = love.graphics.getModes() -- get the list of available modes
-- sort them by size
table.sort(RESOLUTIONS, function(modeA, modeB)
  -- This is just in order not to break the code, as it seems you're using x as width, and y as height
  modeA.x, modeA.y = modeA.width, modeA.height
  modeB.x, modeB.y = modeB.width, modeB.height
  -- Sort routine
  return (modeA.width*modeA.height < modeB.width*modeB.height)
end)
Anyway, that concept (I mean, the game itself) is awesome. I löve it!

Re: trAInsported: Alpha testers needed

Posted: Thu Feb 14, 2013 1:04 pm
by Germanunkol
Thanks again for the kind words!

I did not know about love.graphics.getModes. Will implement this - awesome idea, thanks! And thanks a lot for the code as well :D

Re: trAInsported: Alpha testers needed

Posted: Thu Feb 14, 2013 1:36 pm
by Nixola
I think it would be better to sort them by the width, not by the area

Re: trAInsported: Alpha testers needed

Posted: Thu Feb 14, 2013 2:30 pm
by Roland_Yonaba
Nixola wrote:I think it would be better to sort them by the width, not by the area
Agreed, Nixola.

Re: trAInsported: Alpha testers needed

Posted: Thu Feb 14, 2013 6:05 pm
by Germanunkol
Added. I made it a mixture of hard-coded resolutions and the resolutions that getModes() returns.
I am not adding fullscreen, because the game is usually played with a text editor opened on the side... so I don't think that would make sense.

Will be in the next update... I don't think this small change justifies another update.

Re: trAInsported: Alpha testers needed

Posted: Sat Feb 16, 2013 2:18 pm
by Germanunkol
I'm having troubles with the ip-forwarding of the URL at no-ip.com...
The router does not always tell no-ip.com its new IP adress. Anyone got any experience with this?

It's working right now... but every few days, the new IP just won't be sent to the no-ip service.
I have a "speedlink" router.

Re: trAInsported: Alpha testers needed

Posted: Sun Feb 17, 2013 10:34 am
by Germanunkol
@jonyzz, I see you've found the Documentation :D

Well done, your AI is doing very well:
http://trainsportedgame.no-ip.org/scores.php

Re: trAInsported: Alpha testers needed

Posted: Sun Feb 17, 2013 12:01 pm
by jonyzz
Germanunkol wrote:@jonyzz, I see you've found the Documentation :D

Well done, your AI is doing very well:
http://trainsportedgame.no-ip.org/scores.php
Thanks, I'm quite surprised it works so well :). Some issues I had during development of AI:

1) Some things in documentation are a little bit outdated, so I took me a while before finding out source of errors during debugging. For example:
  • function ai.chooseDirection(train, possibleDirections) – train.tileX and train.tileY should be train.x, train.y.
  • function ai.foundPassengers(train, passengers) – should not return passenger's name but the passenger object.
From documentation isn't also clear if the ai.chooseDirection is called before or after train enters a junction.

2) When AI crashes the game, only error message with current line number and function is printed. It might be useful to print whole stacktrace, if it is possible.

3) The print function is quite useless for debugging, because when the game crashes (blue LOVE error screen) I can't see any messages. It might be a good idea to output these messages also to the console.

Anyway, the game is great and it was quit fun ^^.

Re: trAInsported: Alpha testers needed

Posted: Sun Feb 17, 2013 7:25 pm
by Germanunkol
@taz:
taz wrote: 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).
2.: Done
3.: Done
4.: I can't do that, because buyTrain doesn't actually buy a train, it just adds a new "buy" command to the queue, which doesnt't necessarily execute immediately, depending on the game's state. However, I added a "ai.newTrain" function which gets the newly created train passed as an argument when the train has been created.
5. Done :D

@ jonyzz:
jonyzz wrote: 1) Some things in documentation are a little bit outdated, so I took me a while before finding out source of errors during debugging. For example:
  • function ai.chooseDirection(train, possibleDirections) – train.tileX and train.tileY should be train.x, train.y.
  • function ai.foundPassengers(train, passengers) – should not return passenger's name but the passenger object.
From documentation isn't also clear if the ai.chooseDirection is called before or after train enters a junction.
Ah, sorry about that, I have just recently changed those and had not updated it. I changed everything you mentioned (and a little more) in the documentation.
jonyzz wrote: 2) When AI crashes the game, only error message with current line number and function is printed. It might be useful to print whole stacktrace, if it is possible.
Image
There you go! :D
jonyzz wrote: 3) The print function is quite useless for debugging, because when the game crashes (blue LOVE error screen) I can't see any messages. It might be a good idea to output these messages also to the console.
Good idea... I actually had this implemented before. Don't know why I removed it. I put it back in.
jonyzz wrote: Thanks, I'm quite surprised it works so well :).
You're kicking everyone's A** ! :D Right now you're at almost 80% wins...

Re: trAInsported: Alpha testers needed

Posted: Mon Feb 18, 2013 6:46 am
by LuaWeaver
I seem to have an issue... the tutorial does not seem to be working. I go in and modify TutorialAI1.lua to "print("Hello trAIns!"). I've tried adding whitespace and all, but it just doesn't seem to want to work... I've removed the comments, kept them, reloaded the tutorial, restarted the game, and redownloaded and restarted the game, but it does not want to work.

Is the tutorial a WiP thing, or is it buggy, or is it just me doing something dumb? I'm on W7 x64 running LOVE x32. I am running the latest update of your game. Is there any explanation for this or should I go poking around in the code?