<< Back to Programming Forum   Search

Posts 1 - 30 of 49   1  2  Next >>   
New to programming?: 12/11/2012 16:09:42

Fizzer 
Level 58

Warzone Creator
Report
You may have just seen the CLOT announcement on the blog here: http://blog.warlight.net/index.php/2012/12/announcing-custom-ladderstournaments-framework-clot/

Some of you will be thinking "Boy, that sure sounds cool, but it's too bad I don't know how to code." Well, you play WarLight, so you're already good at logical thinking - you should learn!

I wanted to take this opportunity to plug Khan Academy since they rock, and they have a great series on learning Python from scratch for new programmers. Python is the same language that CLOT uses. You can watch it here: http://www.khanacademy.org/science/computer-science

I won't lie - there's a lot to learn, so it won't be a quick process. But if you're the kind of person that uses computers a lot, you won't regret it. You'll find all sorts of uses for writing programs for the rest of your life.

In fact, writing extensions to games is what fueled a lot of my learning to program in my teen years. Fire up the videos above and give it a shot!
New to programming?: 12/11/2012 19:00:28


I∂ƒ∂oggY 
Level 46
Report
Khan Academy - absolutely a great source for pretty much anything. This is really interesting.
New to programming?: 12/11/2012 19:03:44


ps 
Level 60
Report
nice! lots of potential for cool stuff in there.
wish i can find some free time to try out some ideas. :)
New to programming?: 12/11/2012 21:21:17


Moros 
Level 50
Report
Too bad I can't figure out how to install Python and PyScripter. I downloaded the first, and it gave me a .zip file with lots of files in it. And it says you can't download the second before you download Python itself. Help?
New to programming?: 12/11/2012 22:21:55


Turing
Level 46
Report
You need to unzip the .zip file. There are various different tools for unzipping availiable for download online for free.
New to programming?: 12/12/2012 12:14:03


Moros 
Level 50
Report
I know, but if I do that, I get a lot of different files.
New to programming?: 12/12/2012 12:19:11

Fizzer 
Level 58

Warzone Creator
Report
Moros, you should use the Python installer instead of the zip package. Assuming you're using Windows (since you didn't specify otherwise), just go to http://www.python.org/download/ and click Python 2.7.3 Windows Installer
New to programming?: 12/12/2012 13:08:07


Moros 
Level 50
Report
"Python could not be properly initialized. We must quit."

It says that when I want to open Pyscripter.
And I'm on Windows 7.
New to programming?: 12/12/2012 14:28:43


ps 
Level 60
Report
it's not installed properly then. did you run the installer Fizzer pointed to?
you might have installed python 3.3 and pyscripter be looking for 2.7
New to programming?: 12/12/2012 14:30:09


ps 
Level 60
Report
or you're running the downloaded and not installed pyscripter instead of the one bundled in the installer.
New to programming?: 12/12/2012 14:59:05


ps 
Level 60
Report
if you already know how to program but haven't touched python recently, this will put you up to speed in a jiffy:
http://docs.python.org/2/tutorial/index.html
New to programming?: 12/13/2012 04:55:25


dodo comander 
Level 57
Report
Thanks for the links fizzer,
I have no programming knowledge but all hopefully grab the concept of python.

Maybe ones I am done watching all the videos and doing all the exercises all take crack at the CLOT.

Great update, Thanks again.
New to programming?: 12/13/2012 06:22:58


Clifford The Big Red Dog 
Level 37
Report
So i went to khanacademy and started watching videos, but i have no idea what its talking about, do you need to watch them in order?
New to programming?: 12/13/2012 06:31:49


Clifford The Big Red Dog 
Level 37
Report
never mind that last post, it makes much more sense now, but where can i download python, do i have to pay for python?
New to programming?: 12/13/2012 06:36:56


Clifford The Big Red Dog 
Level 37
Report
forgot to mention im using a mac
New to programming?: 12/13/2012 06:42:27


Clifford The Big Red Dog 
Level 37
Report
sorry for the quadruple post, but once again i figured it out
New to programming?: 12/14/2012 07:17:16


sasha grey
Level 54
Report
"i have no idea what its talking about, do you need to watch them in order?"
hahahahahhahaahah
New to programming?: 12/14/2012 19:51:56


Wally Balls 
Level 58
Report
Cool thread.

Udacity.com is another great way to learn Python - and MIT gives away their Intro to Computer Science class (which teaches Python) for free online @ http://ocw.mit.edu
New to programming?: 12/14/2012 23:02:24


Clifford The Big Red Dog 
Level 37
Report
So i have started the videos on khan academy, and i am having trouble because on the program he is using there is 2 areas one at the top that is just blank and then one on the bottom that starts each line with >>>. I cant seem to do some of the things he is doing, is there a program like this for the mac because mine only has the >>> . if there is please provide a link for the download
New to programming?: 12/14/2012 23:20:45


Wally Balls 
Level 58
Report
New to programming?: 12/14/2012 23:51:37


Clifford The Big Red Dog 
Level 37
Report
i was able to download python and i have it working on iterm, but i was looking for a better program to run it on
New to programming?: 12/15/2012 02:27:25


Wally Balls 
Level 58
Report
Google 'python IDE' there are lots of them
New to programming?: 12/15/2012 12:29:52

Grzechooo 
Level 30
Report
I think he means terminal emulator, not IDEs.
New to programming?: 12/18/2012 12:04:15

unknownsoldier 
Level 57
Report
So, has anyone got this working and created a tournament/ladder/league or whatever?

I was considering giving it a go (since I know some python and maybe have some spare time soon) but would like to know how/if others have got on already.

Thankyou.
New to programming?: 12/18/2012 12:54:56


ps 
Level 60
Report
unknownsoldier: only took a look at the code and ran fizzer's example on localhost. decided not to venture further until i have a couple of days open and 3 or 4 fake accounts to test things with. if i do anything i'll dump it on my github and post about it here for reference sake. would be nice if others experimenting with it did the same. a documented process tutorial / guide / reference / whatever would sure shave off some time.
New to programming?: 12/18/2012 17:11:22


Ironheart
Level 53
Report
A teammate roulette will make a great Clot tourny.
New to programming?: 12/18/2012 18:01:37

unknownsoldier 
Level 57
Report
@ps: thanks for that. I have done about the same (except I'm not sure how to test on my own machine - I create multiple accounts, and use several different browsers?).

Anyway, I ploughed right on (let's see everything runs Fizzer's basic case first, then modify it) to put it on the google app engine ...
I had error from tabs present in cron.yaml, no big deal to change.
But now, my fine webpage (warlight001.appspot.com) fails with:

"
ViewDoesNotExist at /
Could not import home. Error was: No module named json
...
/base/python_runtime/python_lib/versions/third_party/django-0.96/django/core/urlresolvers.py in _get_callback
...


Not sure why django cannot find json, seems unrelated to Fizzer's code.
Probably I have done something wrong (this is usually the case). I'm using linux, so some things are different from Fizzer's description. Now I am reduced to actually reading the documentation on google apps :/

Anyone else got this working? Fizzer, I presume you have? :)
New to programming?: 12/18/2012 18:46:43

Fizzer 
Level 58

Warzone Creator
Report
Could not import home. Error was: No module named json


Thanks for reporting this. It looks like I imported json wrong. Just change all coinsurances of "import json" to "from django.utils import simplejson as json"

Or just download the latest from github - I just checked in that change.
New to programming?: 12/18/2012 22:46:13

unknownsoldier 
Level 57
Report
Ok, that works now, thanks.

Fizzer - is it worth updating your test.yaml file also, to replace the tabs with spaces? (Mine failed, complaining about "\t" until I did this).

Here is the tournament page: https://warlight001.appspot.com/
I am just messing about at the moment. Will produce something 'useful' sometime soon.

---------------

Fizzer, a few questions/observations/comments ...

(1) Do you intend to work on this more? Naturally I would like to stay close to your code, because then I benefit from your improvements... or should I stick my code somewhere like github, to share the things I add?

(2) Seems I can only make 1 tournament at a time. And new tournaments delete the old ones? (or, you have to make more instances of your google apps pages, of which you have a limited number).

(3) How do I invite people, and also stop others from joining? Can't anyone visit my webpage and generate an invitation? Or do I just get that impression because all my dummy players come from the same computer?

(4) When I first start the webpage, and am faced by the 'start tournament' /start page - could another person jump in ahead of me and make that tournament?

(5) You prefer tabs over spaces for python indentation? :/

(5) Seems I need to know a bit of html also - in order to eg sort the players by rank, etc. - not a bit deal, but it isn't (quite) all in python (doesn't bother me, but it might be tough for the hordes of enthusiastic people learning python... :)


(finally) Nice that you have made this stuff, thanks. My comments are meant to be constructive, not critical :)
New to programming?: 12/18/2012 23:18:04

Fizzer 
Level 58

Warzone Creator
Report
Cool, glad to see you're working on it.

(0) Hmm, where did you see the yaml error? On upload? or in a log? I didn't see an error, but I'm willing to change the tabs anyway just in case.

(1) There are things I can think that would be useful to add, but I'm not working on it at the moment. Right now my top priority is the iOS/Android clients. Please do feel free to share code back into github if you make something useful or clean up the code.

The idea is that the main github repro should be a starter package. You should submit code to here that would be applicable to any CLOT that someone could make.

You shouldn't submit code that's specific to a single type (like elimination tournaments or ladders). However, it would be great if you made your own github fork with examples of these things so other people can learn from it or fork it.

(2) To support multiple tournaments, add a "Tournament" table, then add a TournamentID to the Game table, so each game belongs to a single tournament.

(3) Right now the invites are pretty open. This has positives and negatives. The positives are that it's easy to set up tournaments as you can invite your friends in a jiff, set up clan matches, etc. The negatives are that someone could invite someone else unwillingly. This could be improved in the future if it becomes a problem.

(4) They could if they knew the URL. But you still control the database, so all you need to do is log into your Google App Engine page and delete the data they entered. I don't think this will be a problem, but if you're worried about it you could easily modify the page to ask for a password that only you know.

(5) It doesn't really matter, but tabs are more flexible since each person can control via their IDE settings how big of an indent they like to see, instead of having it forced upon them by the code writer.
Posts 1 - 30 of 49   1  2  Next >>