'trAInsported ' - A New game I made! Now ready for alpha testers

Posted By: Germanunkol

'trAInsported ' - A New game I made! Now ready for alpha testers - 02/25/13 20:32

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=yFKZd8nEQyA

Get the game:
http://trainsportedgame.no-ip.org/download.php



Programmer of the best AI might get a cookie from me grin

[Note: This game is made in the Löve2D Engine. It will run on windows, linux and mac.]
Posted By: txesmi

Re: 'trAInsported ' - A New game I made! Now ready for alpha testers - 02/26/13 14:01

Cool game idea! I wanted to give it more than a try grin

I started with the tutorials and found a problem into third. When I tryed the example code for printing the passenger name

Code:
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).

Code:
print ( train.passenger )





Adding '.name' to the passenger address prints the correct passenger name.
Code:
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. frown

Salud!
Posted By: muffel

Re: 'trAInsported ' - A New game I made! Now ready for alpha testers - 02/26/13 14:30

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
Posted By: txesmi

Re: 'trAInsported ' - A New game I made! Now ready for alpha testers - 02/26/13 15:12

Originally Posted By: muffel
EDIT: thanks to the hint to the wiki in the last tutorial a little bit late

laugh
Posted By: Germanunkol

Re: 'trAInsported ' - A New game I made! Now ready for alpha testers - 02/26/13 16:10

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 grin
http://trainsportedgame.no-ip.org/
http://trainsportedgame.no-ip.org/results.svg
Posted By: WretchedSid

Re: 'trAInsported ' - A New game I made! Now ready for alpha testers - 02/26/13 19:41

Doesn't work on OS X 10.8.2
Error message: http://cl.widerwille.com/NBud
Posted By: Germanunkol

Re: 'trAInsported ' - A New game I made! Now ready for alpha testers - 02/26/13 20:26

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.
Posted By: txesmi

Re: 'trAInsported ' - A New game I made! Now ready for alpha testers - 02/26/13 20:42

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!
Posted By: Germanunkol

Re: 'trAInsported ' - A New game I made! Now ready for alpha testers - 02/26/13 21:36

Update: JustSid, please try this updated version. This should work. There was an error in the Löve2d Wiki frown
https://www.dropbox.com/s/lc63906os89qyby/trAInsported.love
Note 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.

Originally Posted By: txesmi
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.
Posted By: WretchedSid

Re: 'trAInsported ' - A New game I made! Now ready for alpha testers - 02/27/13 12:05

Originally Posted By: Germanunkol
Update: JustSid, please try this updated version. This should work. There was an error in the Löve2d Wiki frown
https://www.dropbox.com/s/lc63906os89qyby/trAInsported.love
Note 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"
Posted By: Germanunkol

Re: 'trAInsported ' - A New game I made! Now ready for alpha testers - 02/27/13 13:36

Originally Posted By: JustSid

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"

Awesome, thanks for that, I'll look into it!
As long as I don't have to install anything else, that's great.


For everyone on windows: There's now a win executable (no more need to install the Löve Engine): http://trainsportedgame.no-ip.org/download.php
I added quite a bit of info to the wiki as well:
http://trainsportedgame.no-ip.org/wiki
Posted By: Germanunkol

Re: 'trAInsported ' - A New game I made! Now ready for alpha testers - 03/01/13 19:22

@JustSid, could you do me a favor?
https://www.dropbox.com/s/lc63906os89qyby/trAInsported.love
Run this version and tell me if it detects the number of cores correctly?
When it starts, it prints out "OS Detected:" and "Cores detected:", just tell me if you see the right output there?
I don't have a mac lying around.

Thanks!
Posted By: WretchedSid

Re: 'trAInsported ' - A New game I made! Now ready for alpha testers - 03/01/13 21:58

I'm afraid I don't see the right output, it fails with "cores.txt doesn't exist".
http://cl.widerwille.com/NFqJ
Posted By: Germanunkol

Re: 'trAInsported ' - A New game I made! Now ready for alpha testers - 03/02/13 01:04

My bad, sorry. Can you try this one?
https://www.dropbox.com/s/lc63906os89qyby/trAInsported.love
Posted By: WretchedSid

Re: 'trAInsported ' - A New game I made! Now ready for alpha testers - 03/02/13 04:09

It doesn't show the CPU cores or anything, but it starts within a split second as opposed to almost a minute that the previous version did, so I guess it is working now laugh
Posted By: Germanunkol

Re: 'trAInsported ' - A New game I made! Now ready for alpha testers - 03/02/13 08:56

Well, that's because it's already rendered the images...
Are you starting it from the console?
Like this:
/path/to/love /path/to/trAInsported.love

It should then print into the console.
Posted By: Germanunkol

Re: 'trAInsported ' - A New game I made! Now ready for alpha testers - 04/08/13 12:35

YAY!
Indiegames.com featured trAInsported!
My website's traffic exploded since then, but it's working well again now...
Posted By: Germanunkol

Re: 'trAInsported ' - A New game I made! Now ready for alpha testers - 04/23/13 22:36

Famous German Magazine c't wrote about the game in their online presence: http://www.heise.de/newsticker/meldung/Freeware-Spieletipps-zur-Wochenmitte-1844179.html
Posted By: lemming

Re: 'trAInsported ' - A New game I made! Now ready for alpha testers - 04/24/13 14:31

Originally Posted By: Germanunkol
Famous German Magazine c't wrote about the game in their online presence: http://www.heise.de/newsticker/meldung/Freeware-Spieletipps-zur-Wochenmitte-1844179.html


It's also in the actual printed c't.
Posted By: Germanunkol

Re: 'trAInsported ' - A New game I made! Now ready for alpha testers - 04/25/13 12:51

O.o Are you serious?!
That rocks!
What copy? Need to get it! grin
© 2024 lite-C Forums