Gamestudio Links
Zorro Links
Newest Posts
Blobsculptor tools and objects download here
by NeoDumont. 03/28/24 03:01
Issue with Multi-Core WFO Training
by aliswee. 03/24/24 20:20
Why Zorro supports up to 72 cores?
by Edgar_Herrera. 03/23/24 21:41
Zorro Trader GPT
by TipmyPip. 03/06/24 09:27
VSCode instead of SED
by 3run. 03/01/24 19:06
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AndrewAMD, Imhotep), 567 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
sakolin, rajesh7827, juergen_wue, NITRO_FOREVER, jack0roses
19043 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
'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 Offline OP
Expert
Germanunkol  Offline 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=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.]

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 Offline
Serious User
txesmi  Offline
Serious User

Joined: Jun 2007
Posts: 1,337
Hiporope and its pain
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!

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
M
muffel Offline
Member
muffel  Offline
Member
M

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: muffel] #418534
02/26/13 15:12
02/26/13 15:12
Joined: Jun 2007
Posts: 1,337
Hiporope and its pain
txesmi Offline
Serious User
txesmi  Offline
Serious User

Joined: Jun 2007
Posts: 1,337
Hiporope and its pain
Originally Posted By: muffel
EDIT: thanks to the hint to the wiki in the last tutorial a little bit late

laugh

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 Offline OP
Expert
Germanunkol  Offline 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 grin
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: Germanunkol] #418565
02/26/13 19:41
02/26/13 19:41
Joined: Apr 2007
Posts: 3,751
Canada
WretchedSid Offline
Expert
WretchedSid  Offline
Expert

Joined: Apr 2007
Posts: 3,751
Canada
Doesn't work on OS X 10.8.2
Error message: http://cl.widerwille.com/NBud


Shitlord by trade and passion. Graphics programmer at Laminar Research.
I write blog posts at feresignum.com
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 Offline OP
Expert
Germanunkol  Offline 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: WretchedSid] #418574
02/26/13 20:42
02/26/13 20:42
Joined: Jun 2007
Posts: 1,337
Hiporope and its pain
txesmi Offline
Serious User
txesmi  Offline
Serious User

Joined: Jun 2007
Posts: 1,337
Hiporope and its pain
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!

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 Offline OP
Expert
Germanunkol  Offline 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 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.

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 Offline
Expert
WretchedSid  Offline
Expert

Joined: Apr 2007
Posts: 3,751
Canada
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"


Shitlord by trade and passion. Graphics programmer at Laminar Research.
I write blog posts at feresignum.com
Page 1 of 2 1 2

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1