trAInsported

Show off your games, demos and other (playable) creations.
User avatar
substitute541
Party member
Posts: 484
Joined: Fri Aug 24, 2012 9:04 am
Location: Southern Leyte, Visayas, Philippines
Contact:

Re: trAInsported: Alpha testers needed

Post by substitute541 » Sat Mar 30, 2013 10:27 am

That's what ai.blocked is for.

Edit: Well Gusmanak was fast...
Currently designing themes for WordPress.

Sometimes lurks around the forum.

User avatar
whitewater
Prole
Posts: 14
Joined: Wed Jun 22, 2011 2:03 am

Re: trAInsported: Alpha testers needed

Post by whitewater » Sat Mar 30, 2013 7:42 pm

Germanunkol wrote:Well, you can use ai.blocked() to notice and resolve this solution.
The easiest way would be to return a random direction in ai.blocked() and then try to find a new way at the next junction. That's sort of what my test AI does.
Having done so, I can now reliably(?) cause a pileup of sorts by following these steps

Create a very large map so my script hits the timeout
Have a lot of trAIns.
Increase the speed to 90x

The trains will (hopefully(?)) group up into one part, lag will happen, and the deltatime as seen by the program will be higher than expected. They will literally jump off the tracks and just kind of stick there for upwards of an hour of ingame time.



Edit: Is it possible you need to fix your timestep?
Last edited by whitewater on Sun Mar 31, 2013 11:44 pm, edited 2 times in total.

Germanunkol
Party member
Posts: 706
Joined: Fri Jun 22, 2012 4:54 pm
Contact:

Re: trAInsported: Alpha testers needed

Post by Germanunkol » Sun Mar 31, 2013 2:01 pm

Hm... is it possible that you use the version where the maximum number of lines an AI can execute has not been reduced yet?

Please try the newest version from github (if you don't have git, just download it as a zip file and rename it to .love)
This one only allows 25% of the previous number of lines that you could use to execute your code.

This problem will probably never be resolved entirely. The thing is this: I need to stop people's code after a while, if it takes too long, otherwise the game will lag as you are experiencing. To do this, I have three options:
  • Stop the AI after a set amount of time. This works by checking the time after, say, 500 lines of code have been executed. Drawbacks: The game will allow more lines to run on faster PCs, it will no longer be "fair". Also, when the AI is uploaded, it will behave differently on the server, with no way for the players to tell why the AI is suddenly doing much worse than it had been doing offline.
  • Stop the AI after a certain amount of lines. This is what I currently do, but the main problem is that not all lines take the same amount of time, and not all lines really correspond to "one line" of code. print("") for example uses up quite a few lines of code and using some string reg-ex functions you can almost stall the program as they have lots of C-code lines internally but only count as one Lua line.
  • A mixture of both. This will have the drawback of both though...
So this might be a "won't fix" problem... :(

My server's currently down, it seems. I'll try to fix this...
Edit: It's back up. Seemed to be a problem with no-ip.com.

Edit2: I reduced the maximum number of trains on the server. That should at least speed the game up on the server, hopefully it's now fast enough to cope even with AIs that do a lot of computing.
On the client, you can still have twice as many trains on maps. So basically, if the map runs too slow, the best way is to reduce the map size, because the number of trains you can have is proportional to the mapsize and because pathfinding usually takes much longer on large maps.
Sorry, at this point, I think that's the most I can do...
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: 706
Joined: Fri Jun 22, 2012 4:54 pm
Contact:

Re: trAInsported: Alpha testers needed

Post by Germanunkol » Fri Apr 05, 2013 7:34 am

Just a short update:
There's been lots of activity on the website these past few weeks. It's amazing what all of you have come up with - the AIs are much better than what I had hoped for. Many players even uploaded AIs, let them play for a few days, checked out how they did, and then uploaded improved versions. I love how everyone has their slightly different approach and I love how the AIs each do differently well under different conditions and against different enemies. The outcome of a match is very often a surprise...

So thank you to all of you who have played! It's very rewarding for me to see the feedback and activity! :D

It'd be great if some of you could share the game with friends or write about it on blogs/in forums... since I still have not had any luck with trying to get indie news sites to mention the game.
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
frpnit
Prole
Posts: 21
Joined: Fri Oct 12, 2012 1:05 am
Location: Brazil
Contact:

Re: trAInsported: Alpha testers needed

Post by frpnit » Sat Apr 06, 2013 11:10 pm

Congratulations sir, i've seen that your game was spoted on Indiegames blog!

http://indiegames.com/2013/04/freeware_ ... ns_on.html
FRP
  • Graphic Designer
  • Hobbyst Programmer
[/color]

Germanunkol
Party member
Posts: 706
Joined: Fri Jun 22, 2012 4:54 pm
Contact:

Re: trAInsported: Alpha testers needed

Post by Germanunkol » Sun Apr 07, 2013 10:59 pm

Yeah, thanks! :D
Totally overwhelmed my webserver though :P
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
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: trAInsported: Alpha testers needed

Post by Robin » Mon Apr 08, 2013 2:07 pm

It also reached the top of /r/programming a few days ago.
Help us help you: attach a .love.

Germanunkol
Party member
Posts: 706
Joined: Fri Jun 22, 2012 4:54 pm
Contact:

Re: trAInsported: Alpha testers needed

Post by Germanunkol » Mon Apr 08, 2013 7:17 pm

That's probably why my server was overwhelmed, yes :D
Over all, I got a very nice, positive response from the public.
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: 1940
Joined: Tue Dec 06, 2011 7:11 pm
Location: Italy

Re: trAInsported: Alpha testers needed

Post by Nixola » Mon Apr 08, 2013 7:18 pm

Are you going to upgrade you server PC or lighten your server software?
lf = love.filesystem
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics

Germanunkol
Party member
Posts: 706
Joined: Fri Jun 22, 2012 4:54 pm
Contact:

Re: trAInsported: Alpha testers needed

Post by Germanunkol » Mon Apr 08, 2013 11:31 pm

I might need to buy a server instead of using a raspberry pi :(
But it was soooo cool!
Also, I don't make any money with this right now... so renting a server for a project that doesn't make any money seems... wrong. Especially because I don't just need storage place, I actually need to have full ssh access to it.

One of the users seems to have "stolen" someone elses AI and just uploaded it as his own... that's a little sad.
I could do a diff comparison on the files, but that might end up being a lot of diff calls when there's lots of AIs... any ideas?
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

Post Reply

Who is online

Users browsing this forum: No registered users and 19 guests