2 registered members (VoroneTZ, TipmyPip),
1,333
guests, and 0
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
'trAInsported ' - A New game I made! Now ready for alpha testers
#418507
02/25/13 20:32
02/25/13 20:32
|
Joined: Jun 2006
Posts: 2,640 Earth
Germanunkol
OP
Expert
|
OP
Expert
Joined: Jun 2006
Posts: 2,640
Earth
|
Hi guys, I've been busy creating a new game which is now ready for playing: Introducing: TrAInsported!Because playing the game requires coding, I need some people who can code to test it out... and thought this community might be a good start! Game Idea:Program the best AI to pickup and transport the most passengers in the shortest time. Compete against your friend's AIs. Once ready, upload the AI to the website and watch it bash other AIs in live, online matches! Follow your AI's progress on the trAInsported website. More details:Video:https://www.youtube.com/watch?v=yFKZd8nEQyAGet the game:http://trainsportedgame.no-ip.org/download.php Programmer of the best AI might get a cookie from me [Note: This game is made in the Löve2D Engine. It will run on windows, linux and mac.]
Last edited by Germanunkol; 02/25/13 20:33.
~"I never let school interfere with my education"~ -Mark Twain
|
|
|
Re: 'trAInsported ' - A New game I made! Now ready for alpha testers
[Re: Germanunkol]
#418524
02/26/13 14:01
02/26/13 14:01
|
Joined: Jun 2007
Posts: 1,337 Hiporope and its pain
txesmi
Serious User
|
Serious User
Joined: Jun 2007
Posts: 1,337
Hiporope and its pain
|
Cool game idea! I wanted to give it more than a try I started with the tutorials and found a problem into third. When I tryed the example code for printing the passenger name
print ( train.name .. " carries " .. train.passenger )
it returns an error. I tryed printing just the passenger name, and it tells that it was a table address (I guess).
print ( train.passenger )
Adding '.name' to the passenger address prints the correct passenger name.
print ( train.name .. " carries " .. train.passenger.name )
I continued with the tutorial and when tryed to insert the if/then stament of 'ai.chooseDirection' function, it returns another error. Something to do with strings concatenation that i did not fully understand. I tryed printing all the values involved in the expresion and it looks that the 'train.passengerX' component is empty. I could not find where is the problem and could not continue playing. Salud!
|
|
|
Re: 'trAInsported ' - A New game I made! Now ready for alpha testers
[Re: txesmi]
#418527
02/26/13 14:30
02/26/13 14:30
|
Joined: Oct 2009
Posts: 149 Germany
muffel
Member
|
Member
Joined: Oct 2009
Posts: 149
Germany
|
it seems so that the passenger has the members name destX and destY so the if line should be if train.passenger.destX < train.x then. By the way is there some sort of documentation for the members. I digged in your code files to find the correct variable for the tutorial.
EDIT: thanks to the hint to the wiki in the last tutorial a little bit late
and a bug if you change ( i tested smaller )resulution the screen gets smaller but not the ui.
muffel
Last edited by muffel; 02/26/13 15:12.
|
|
|
Re: 'trAInsported ' - A New game I made! Now ready for alpha testers
[Re: txesmi]
#418548
02/26/13 16:10
02/26/13 16:10
|
Joined: Jun 2006
Posts: 2,640 Earth
Germanunkol
OP
Expert
|
OP
Expert
Joined: Jun 2006
Posts: 2,640
Earth
|
Oh gosh, my bad! I changed the ai interface and forgot to update the tutorials. Shame on me, and thanks to you both for pointing it out! New version is now online on the website (should be fixed). If you notice any other problems, please let me know! On a side note: There's now animated .svgs automatically generated at the end of each match on the server, which are shown on the website. Check it out http://trainsportedgame.no-ip.org/http://trainsportedgame.no-ip.org/results.svg
Last edited by Germanunkol; 02/26/13 17:24.
~"I never let school interfere with my education"~ -Mark Twain
|
|
|
Re: 'trAInsported ' - A New game I made! Now ready for alpha testers
[Re: WretchedSid]
#418572
02/26/13 20:26
02/26/13 20:26
|
Joined: Jun 2006
Posts: 2,640 Earth
Germanunkol
OP
Expert
|
OP
Expert
Joined: Jun 2006
Posts: 2,640
Earth
|
Uh oh. Thanks for trying. And here I was thinking lua was cross-platform and all...
After a short reading up on it, it seems popen is supported on mac, but only if it's compiled into your lua (or in this case, Löve engine). You're using löve 0.8.0? If so they just forgot to compile it in? I'm trying to think of a workaround... I can workaround this specific error, but later on I do need popen to list all files in a directory.
~"I never let school interfere with my education"~ -Mark Twain
|
|
|
Re: 'trAInsported ' - A New game I made! Now ready for alpha testers
[Re: txesmi]
#418581
02/26/13 21:36
02/26/13 21:36
|
Joined: Jun 2006
Posts: 2,640 Earth
Germanunkol
OP
Expert
|
OP
Expert
Joined: Jun 2006
Posts: 2,640
Earth
|
Update: JustSid, please try this updated version. This should work. There was an error in the Löve2d Wiki https://www.dropbox.com/s/lc63906os89qyby/trAInsported.loveNote though that this will take a long time to load, because it can't find out the number of CPUs and will only use one thread because of it. I have a question. Witch AI will pick up the first passenger in the case that two AIs create their first train beside it?
I mean, there might be a rule to solve the preference. Something like the win percent from low to high rates.
Salud! I thought long about these kind of issues -> right now, there is no determinism in the game. What AI starts and is executed first is random at this point. However, the ai.foundPassengers is only executed when the train comes to a new tile. So if you create the train ON the tile where the passenger is sitting, then he/she won't be picked up. Also, if you try to create a second train on the same tile, this second tile will wait until the tile is free.
Last edited by Germanunkol; 02/26/13 21:42.
~"I never let school interfere with my education"~ -Mark Twain
|
|
|
Re: 'trAInsported ' - A New game I made! Now ready for alpha testers
[Re: Germanunkol]
#418612
02/27/13 12:05
02/27/13 12:05
|
Joined: Apr 2007
Posts: 3,751 Canada
WretchedSid
Expert
|
Expert
Joined: Apr 2007
Posts: 3,751
Canada
|
Update: JustSid, please try this updated version. This should work. There was an error in the Löve2d Wiki https://www.dropbox.com/s/lc63906os89qyby/trAInsported.loveNote though that this will take a long time to load, because it can't find out the number of CPUs and will only use one thread because of it. It does, thanks a lot for the fix! I'll try the game later today! About the CPU cores, I guess you can invoke C code, so to get the number of CPUs on Mac OS X you can call sysctlbyname() with "machdep.cpu.core_count". Or, if you want to know how much concurrency is available, use "machdep.cpu.thread_count"
Shitlord by trade and passion. Graphics programmer at Laminar Research. I write blog posts at feresignum.com
|
|
|
|