trAInsported

Show off your games, demos and other (playable) creations.
User avatar
Roland_Yonaba
Inner party member
Posts: 1563
Joined: Tue Jun 21, 2011 6:08 pm
Location: Ouagadougou (Burkina Faso)
Contact:

Re: trAInsported: Alpha testers needed

Post 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!
Germanunkol
Party member
Posts: 712
Joined: Fri Jun 22, 2012 4:54 pm
Contact:

Re: trAInsported: Alpha testers needed

Post 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
trAInsported - Write AI to control your trains
Bandana (Dev blog) - Platformer featuring an awesome little ninja by Micha and me
GridCars - Our jam entry for LD31
Germanunkol.de
User avatar
Nixola
Inner party member
Posts: 1949
Joined: Tue Dec 06, 2011 7:11 pm
Location: Italy

Re: trAInsported: Alpha testers needed

Post by Nixola »

I think it would be better to sort them by the width, not by the area
lf = love.filesystem
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
User avatar
Roland_Yonaba
Inner party member
Posts: 1563
Joined: Tue Jun 21, 2011 6:08 pm
Location: Ouagadougou (Burkina Faso)
Contact:

Re: trAInsported: Alpha testers needed

Post by Roland_Yonaba »

Nixola wrote:I think it would be better to sort them by the width, not by the area
Agreed, Nixola.
Germanunkol
Party member
Posts: 712
Joined: Fri Jun 22, 2012 4:54 pm
Contact:

Re: trAInsported: Alpha testers needed

Post 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.
trAInsported - Write AI to control your trains
Bandana (Dev blog) - Platformer featuring an awesome little ninja by Micha and me
GridCars - Our jam entry for LD31
Germanunkol.de
Germanunkol
Party member
Posts: 712
Joined: Fri Jun 22, 2012 4:54 pm
Contact:

Re: trAInsported: Alpha testers needed

Post 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.
trAInsported - Write AI to control your trains
Bandana (Dev blog) - Platformer featuring an awesome little ninja by Micha and me
GridCars - Our jam entry for LD31
Germanunkol.de
Germanunkol
Party member
Posts: 712
Joined: Fri Jun 22, 2012 4:54 pm
Contact:

Re: trAInsported: Alpha testers needed

Post 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
trAInsported - Write AI to control your trains
Bandana (Dev blog) - Platformer featuring an awesome little ninja by Micha and me
GridCars - Our jam entry for LD31
Germanunkol.de
jonyzz
Prole
Posts: 48
Joined: Sun Sep 02, 2012 9:35 pm

Re: trAInsported: Alpha testers needed

Post 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 ^^.
Germanunkol
Party member
Posts: 712
Joined: Fri Jun 22, 2012 4:54 pm
Contact:

Re: trAInsported: Alpha testers needed

Post 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...
trAInsported - Write AI to control your trains
Bandana (Dev blog) - Platformer featuring an awesome little ninja by Micha and me
GridCars - Our jam entry for LD31
Germanunkol.de
LuaWeaver
Party member
Posts: 183
Joined: Wed Mar 02, 2011 11:15 pm
Location: Ohio, USA

Re: trAInsported: Alpha testers needed

Post 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?
"your actions cause me to infer your ego is the size of three houses" -finley
Post Reply

Who is online

Users browsing this forum: Amazon [Bot], Bing [Bot] and 8 guests