[QUOTE=Guru-guru;18310725]Iso-World Super Update
[img]http://davidjokinen.com/GameAlpha10.png[/img][/QUOTE]
That's coming along good. I'm gonna play around with it later and see if I can find any bugs.
[img]http://i36.tinypic.com/foumh.png[/img]
Sidebar is becoming slightly more useful, yay.
[QUOTE=iPope;18298613]Yes python and pygame, theme gets announced on friday.
But your banned so that kind of ruins that :([/QUOTE]
I'm still available to work, paper pending.
It's not possible to disable the GIL - pypy was looking into taking it out, and it's quite a complicated thing to do. Python does include a multiprocessing module, which has a very similar API to threading, but runs workers in separate processes. I'm not sure about the overhead that each thread brings, but it's always best to have the same number of threads as you have cores anyway - the idea of a thread pool is great for this.
And, if you're using python, chances are you're not going for computational speed anyway (if you are going for speed, why the hell are you using python!), and switching to a language like C++ would be more beneficial anyway. Or you can write the base program in python, and use something like cython or boost::python to pull in compiled modules.
Also, a few comments on your code (I assumed you posted it wanting constructive criticism, so please don't take this too harshly!).
If you can do without global variables do. Even if you have like a game object with a gBall member, and you create one of those object, it's better. Also, if you must have global variables, define them ALL at the top of the file.
New Ball should really be a classmethod I think, but that's REALLY nitpicking.
Your threading logic has the most pointless lock ever. It's not even visible outside of that method: locks are for securing access to a resource that many threads have to use, that might fuck up if accessed by more than one thread, like a log file.
If you want logging, use the logging module: I find it useful to have access to the stderr on the console, but each to their own.
I also thought that pygame had a more game suitable clock, but it's a long time since I used it.
Finally (for now! ;) ) the is a python style guide, PEP 8. Look it up, read it through (twice!) and try to follow it! I know it's not strictly necessary, but seeing non PEP 8 code is a bit weird, I don't know why.
You dudes talking about multithreading in python should take a look at: [url]http://en.wikipedia.org/wiki/Stackless_Python[/url]
True it has microthreads not proper threads but it still gives you a fairly effective way to parallel process in python.
[QUOTE=TheBoff;18313583]And, if you're using python, chances are you're not going for computational speed anyway (if you are going for speed, why the hell are you using python!), and switching to a language like C++ would be more beneficial anyway. Or you can write the base program in python, and use something like cython or boost::python to pull in compiled modules.[/QUOTE]
I knoww. I'm too lazy to get off my ass and learn C/C++, SDL, etc. Are there any frameworks like PyGame for C/C++ which aren't too condescending?
[QUOTE]New Ball should really be a classmethod I think, but that's REALLY nitpicking.[/QUOTE]
It probably should be, but I had it out of the class because it was appending objects to a global list, and. I dunno.
[QUOTE]Your threading logic has the most pointless lock ever. It's not even visible outside of that method: locks are for securing access to a resource that many threads have to use, that might fuck up if accessed by more than one thread, like a log file.[/QUOTE]
The lock is there to allow the thread run or something. I was following someone else's instructions in the old 'what are you working on' thread. It can be replaced with sleep but I had it locking instead because then it's not sleeping for extra cycles.
[QUOTE]If you want logging, use the logging module: I find it useful to have access to the stderr on the console, but each to their own.[/QUOTE]
I had it log to a text file because I released it as an exe which wouldn't necessarily be running from a command prompt ;p
[QUOTE]I also thought that pygame had a more game suitable clock, but it's a long time since I used it.[/QUOTE]
time.clock() is apparently the most accurate clock you can get in Python; on Windows it's the equivalent of calling QueryPerformanceCounter, so it's good for games.
C/C++ are similar to PHP [B]in syntax[/B].
[QUOTE=DrTaxi;18315263]C/C++ are similar to PHP [B]in syntax[/B].[/QUOTE]
That's what I was going for. :v: But drop it, people just will bitch about it.
[QUOTE=DrTaxi;18315263]C/C++ are similar to PHP [B]in syntax[/B].[/QUOTE]
They both have really ugly syntax, agreed.
[QUOTE=Chandler;18311890]I'm still available to work, paper pending.[/QUOTE]
Right on, PM me your email or something (do you have MSN?).
I had a good Idea today, generate a 500x500 height map and take a random slither from the height map and use it to generate the above ground terrain. Now to go find out how to generate height maps :D
I just ordered Accelerated C++, hopefully it'll arrive at friday or atleast early next week.
Only knowing basic C++ syntax, do you guys think I'll be having a hard time understanding it?
[QUOTE=klukk;18316953]I just ordered Accelerated C++, hopefully it'll arrive at friday or atleast early next week.
Only knowing basic C++ syntax, do you guys think I'll be having a hard time understanding it?[/QUOTE]
Don't think so, it's not really that hard to understand you just need to practice enough.
[QUOTE=Guru-guru;18310725]Iso-World Super Update
[img]http://davidjokinen.com/GameAlpha10.png[/img]
Update:
-Added the building mine
-Added bear
==They run when they are going to attack
==They cant get killed yet(next update :P)
-Added blood/gore system
-Improved loading screen
-Improved options
-Added new buttons for new content
-Improved AI
== Killing cows or other human
== Mining
== Random fixes
-improved user control
==Tell a person what to kill
==Mouse can not move screen UNLESS it is changed in options
==Moving the screen with the arrow keys ave been greatly improved
Yep tell me what you think. And I sense there will be lots of bugs...
And here is the link to play it: [url=http://www.playisoworld.com/play.php]http://www.playisoworld.com/play.php[/url][/QUOTE]
If you click on a bear nothing shows in the box. If you click on the roads thing while having a person selected the road selection doesn't come up. Also change it so you can't place road or path on a tree.
I just programmed a numerical solution of the timeless Schrödinger-Equotation for a particle between infeinitly high potential barriers at x=+-1 in Fortran with the Runge-Kutta procedure.
And it looks like it works.
[img]http://filesmelt.com/downloader/aufg2phivonx.png[/img]
The sine is correct and the points (+-1,0) are too!
By the way this is for the quantum number n=5 with the energy
being
1/2*(Pi/2)^2 *(n+1)^2
Ported my minimal 2D engine to work as applet and managed to embed it in HTML:
[url]http://5.latest.testbotrobert.appspot.com/[/url]
DoomCat, SFML is as nice as I've been able to find. And C# obviously has XNA.
Updated the GWEN unit test.. quite a lot of stuff done.. a number of new tests, some fixes etc
[url]http://gwen.facepunchstudios.com/files[/url]
On menu strip it will only log at the bottom once you clicked another item
Like, if you click 'new' it wont log "menu selected: whatever" until you click another item
Yeah that's a bug with the listview control, that's top of my list tomorrow!
[QUOTE=DrTaxi;18315263]C/C++ are similar to PHP [B]in syntax[/B].[/QUOTE]
O! Forgot in C you can do.
$var = 'lol';
[QUOTE=garry;18323374]Updated the GWEN unit test.. quite a lot of stuff done.. a number of new tests, some fixes etc
[url]http://gwen.facepunchstudios.com/files[/url][/QUOTE]
The slider behavior seems weird. The snapping action is offset from the cursor, maybe that's it.
[QUOTE=high6;18324676]O! Forgot in C you can do.
$var = 'lol';[/QUOTE]
Because the way variables are labelled totally defines the entire syntax of a programming language :downs:
I'm starting to learn Objective-C/Cocoa at the moment, gonna try Mac/iPhone app development.
[QUOTE=Jallen;18324894]Because the way variables are labelled totally defines the entire syntax of a programming language :downs:[/QUOTE]
[quote]<BLaNK> Well one is compiled, one is interpreted, one has managed memory the other not, one is fast, one is terribly slow, they both do classes and have kinda similar syntax. So as far as any OO programming language looks like any other, they are similar, otherwise not.[/quote]
Although even then phps OO is complete shit.
[QUOTE=high6;18324991]Although even then phps OO is complete shit.[/QUOTE]
I like PHPs Object Oriented Programming.
$class->function();
Easy.
[QUOTE=Ortzinator;18324816]The slider behavior seems weird. The snapping action is offset from the cursor, maybe that's it.[/QUOTE]
Also the sliders look the same when you hover or click them.
[QUOTE=nullsquared;18326116]??
C++:
inst->function();
Easy?[/QUOTE]
??
who said C++ OO was hard?
[QUOTE=andersonmat;18325241]I like PHPs Object Oriented Programming.
$class->function();
Easy.[/QUOTE]
So being easy makes it not suck?
You know, this is all relative and we will all think one method is better than another because we all have personal programming styles and biases. There are positives and negatives for each language. So, why don't we stop bickering about what language is better and why a language is shitty? Let's get some content in here? :dance:
Sorry, you need to Log In to post a reply to this thread.