I assume you _really_ have to make everything in C++, otherwise you should seriously consider developing most of your code in another programming language. The way to make a crash free application is to use formal methods to prove it can't crash. That means specifying preconditions and postconditions for all methods and invariants for classes. There are no facilities in C++ for enforcing this kind of programming, but you can build your own based around the assert.h functionality. The other thing you want to do is to restrict yourself severely as to what parts of C++ you use. Use the STL library for everything, use smart_ptr and auto_ptr in place of raw pointers, use pass by reference as much as possible. Don't do anything fancy like multiple inheritance, operator overloading, advanced template programming or writing your own container classes. These things are better left for library writers. Build some sort of memory tracking facility so you will know about memory leaks (there shouldn't be any if you never use raw pointers, but you never know). Above all, make automated tests for all features you add.
I still play this arcade game almost daily with my colleagues at work -- we've been playing it for 10 years now, on and off. It started when we ported SS1 to Sega CD, then we played SS2 for ages - when I changed workplace later, some of the other people from Funcom put their money together and bought an arcade cabinet with a NeoGeo arcade unit in it. We've tried SS3, which has beautiful graphics - but the gameplay is just not quite as tight as in SS2. SS4 is a joke, bad graphics, bad gameplay.
The main reason we're still playing the game is simply that it's possible to get incredibly good at it. A beginner can never beat me, he would have to train for years. In fact, even after all this time we're finding new subtleties in the timing and priorities of the different moves. Another reason SS2 is the best 2D fighting game ever is that the characters are all different from each other and require a different way of playing to get the most out of. That also means you have to adapt your style to the character you're playing against. Almost all the characters are nicely balanced, so you can spend ages perfecting how to play each character.
All in all, Samurai Showdown gets a cool 11 out of 10 from me. But get the original, it doesn't play the same in MAME.
We've had this kind of system for years in Oslo, it's called www.trafikanten.no (also available in english) and gives you the quickest route from door to door using buses, trams, trains and by foot. Maybe Google should have a look at licensing the technology;-)
This kind of stereoscopic 3D imaging is nothing new -- in high end visualisation work it's been around for decades. However, I had the fortune(?) to attend this year's SEG (society of exploration geophysicists -- oil and gas exploration) conference where there were severel stands with 3D displays that did not require glasses. Most of them were stereoscopic displays with a special film on which makes the left and right eye see different images, given that your head is in exactly the right position.
I didn't find these displays very impressive, but there was one company (LightSpace Technologies) that was demonstrating a true 3D display where you could see behind things and around corners by moving your head. The image was flickering a bit, and everything appears a little transparent - but overall the effect is much better.
With modern compilers you should always use arrays. The reason is that for all but the most pathological cases of indexing, the compiler will do strength reduction and induction to turn the p[i*4] into *p,p+=4. The problem with using pointers is that if you have more than one of them, the compiler has no easy way of knowing if they point to the same place (this is known as pointer aliasing) so a bunch of useful optimizations have to be turned off. If you are doing a[i] = b[i] the compiler can much more easily find out that a and b are distinct memory locations than if you are doing *p = *q.
If you want to learn more about these kind of source level optimisations, look the AMD Athlon(TM) Processor x86 Code Optimization Guide is a good reference -- it includes a section on why you want to use array accesses instead of pointers, and also has a lot more up-to-date and useful advice on what compilers do to your code. It is available from AMD's website.
If you think blood or 'realistic' graphics makes a game more fun to play, it's time you grew up. I find games that focus on sex or violence to be mostly about the marketing and those devices serve to cover up for the missing gameplay...
How about you try to get some unix packages and compile them under Cygwin and see how well it works:-P OTOH, under OS X almost all unix software compiles without (or with minor) modifications... Cygwin is a horrible mess. I still use it occasionally when there is no other alternative, though.
Above all the important thing in a game is to make the player feel good about himself, give him or her rewards. It's easy to make a game challenging, but much harder to make it seem challenging but in fact be easy so the player gets that warm fuzzy feeling when he beats it.
I'll tell you a little story to give an example: While I was working on a boat racing game, me and the other main programmer studied a lot of racing games. I had a major realization when first I played V-Rally where a lot of the time your car ends up on the roof and has to be repositioned back on the track, or you end up turned around in the wrong direction. Sure it's not a bad game, it's challenging and it fulfils most of your criteria - but it's not really fun. Then we played Sega's Daytona in the arcade. It's a very fun game! After a while we started to realize why it was so much more fun than V-Rally. When you had a big crash the car was thrown spectacularly into the air. Just when you thought you were completely out of the race, somehow magically the car would _always_ land on the wheels with the nose pointing in the right direction along the track.
The game designer and the programmers of Daytona had found a way to make the game cheat in the players favour without the player even noticing. This lead directly to a feeling that 'yes, I can drive a car at 200 Mph around a twisty race track, no problem' and if you had an accident you were feeling 'wow, I'm lucky - still in the race', not looking for the Pause->Restart Race menu...
This is but one example, but you'll find that most games that are truly fun actually help the player a lot. Say in Zelda, when you're low on energy, the likelyhood that the enemy you beat will drop a heart increases. Little things like that.
I think it's a pretty sensible choice for a SSID - I'm not running some top secret operation, and if someone wants to hack my network maybe they'll feel more guilty when they know exactly who they're screwing over. Besides, it's a truly unique identifier so no chance the neighbour will come up with the same 'clever' SSID as me and screw up my networking. And if one of my good neighbours have a problem preventing them from accessing the internet, they know who to ask if they want to borrow mine. (And yes, I would also lend them a cup of sugar if they came over and asked...)
I don't have time to spend on getting everything 'just right' the way I like it, if you want to do that you should install Linux and make patches for your favourite open source software. I'm more than willing to take something that works well and adapt to the software's various ideosynchracies. The Apple software like Mail.app, Safari, iTunes, iCal, XCode, Terminal etc. more than works for me, combined with a rock solid WiFi implementation (far better than Windows XP which tends to randomly drop the connection for a few seconds every now and then) this makes OS X my favourite environment to get work done in.
Yes of course there are annoyances -- you've learned to do things one way and when you try to do them the same way on a mac it doesn't work, and a lot of the nice little details of the OS you just don't know about at first. To take two examples: when I first got a mac I was looking for the Add/Remove programs thing in the System Preferences (the equivalent of the control panel) because I wanted to uninstall a program. I couldn't find it, and grew frustrated until I realized that you can just drag applications to the trash. The second example is that just a few weeks ago (after over a year of using the iBook every day) I realized I can drag a file on top of the terminal window and it types the full path and name of the file - it's a very nice feature, integrating the finder and the terminal nicely. Of course there are also other annoyances which are _real_ annoyances unlike my first example. The software supplied with my digital camera didn't have an OS X version and although iPhoto is very nice, there are some advanced features of the camera that I can't use. Overall I'm extremely pleased with the mac, 99% of the time things just work and I can concentrate on the work I want to get done. I use quite a lot of unix applications which don't run well on windows (don't get me started on cygwin... it really is quite unpleasant), so for me it's a big gain -- YMMV
>Is this comment general for every computer players, or just Igowin?
It's for all computer players, I guess you could offset it a bit by playing different computer opponents since they have slightly different weak points. However, if you want to improve there is no other way than playing human opponents.
Playing on KGS is a good idea, since the software includes a 'review' mode and in general the players there are slightly more interested in teaching beginners than on the other go servers. However, online go is mainly (perhaps because of the ratings?) a competitive environment and the best way to learn the game is definitly to go to a club if one exists in your vicinity.
Igowin will just teach you bad habits - if you had played 1400 games with me you'd already be 1. dan (I can give igowin 5 stones handicap and still win, thus earning the rank of 'professional' which is just ridiculous...)
It seems the author of the article has decided to give it a sensationalist spin. PlanetLab is a platform intended for researchers to experiment with new protocols. It's a world wide network of computers dedicated to research, and a number of interesting research projects are using it.
http://www.intel.com/research/exploratory/planet la b.htm...
On a unix system every program stores it's configuration in it's own file and it's own format. There is no standard way of separating system wide and user configuration. There is no way of taking a snapshot of the current configuration for a user so you can put the same configuration on a new machine. There is no way to roll back changes to the configuration. How is this better than the functionality the registry provides???
There is a whole bunch of modal logics which are complete and very important in applications in computer science such as program verification. For example CTL, Computational Tree Logic or description logics such as SHIQ (which is an important part of the design of the OWL language for the semantic web). In fact, Gödel's work (and the subsequent advent of the computer) has completely transformed logic as a subject. Nowadays it is studied in a way where you want to know how adding different features to your logic will change it's decidability, completeness and computational complexity.
This is pretty standard practice in computer games, especially for consoles... On another note, I question the sanity of people who use C languages for something else than embedded systems, performance critical applications or kernel modules... (I worked in the games industry for 7 years)
Last year I found myself extending an automated theorem prover written in Haskell, and actually _enjoying_ it... Haskell is very good for solving complicated problems, most of the time you find that if you manage to write down what you're thinking it actually works right away (although writing it down can be pretty hard). Unfortunately, even with monads, I find it is a bad match for the kind of event model employed in most GUI's... Now if only it was a bit easier to link Haskell with programs written in other languages I could make the GUI in Visual Basic and the rest of the program in Haskell;-)
The most important thing to prevent bugs
on
Debugging
·
· Score: 2, Insightful
I have a lot of experience in finding and fixing difficult bugs. In my experience, the most important thing you can do is when you find a bug, stop and think how you could have caught this bug automatically. If you practice this policy, you end up with very solid code. Basically, in the debug build, no function should ever crash the program no matter what garbage you put in the parameters - it should report an error and stop.
I think writing solid code is all in the attitude of the programmers - I had one guy who had a memory overwrite bug that was corrupting some characters in his string table when he called a certain function. Do you know how he fixed it? He wrote some code that put the right characters back over the corrupted ones after the call to this function!!! If you have that attitude, things WILL blow up in your face...
I believe the ABI part means they are claiming copyright of the specific numbers assigned to each of these standard (API) defines. They can't claim copyright on the defined names since they are ANSI/ISO standardized, but the standards do not mandate which numbers are assigned so this is (or at least can be interpreted as) original work.
Since this is an autoconfiguration feature, why not have it on only for the first boot after installing the OS? This way the computer can autoconfigure and then when it is configured it turns the feature off again.
However, a lot of developers might want to move..
on
Mac OS X 10.3 vs. Linux
·
· Score: 3, Insightful
If you're like me and want to do some development for fun, the new developer tools that come with Panther are absolutely amazing. I think it beats anything available for free (fix and continue, need I say more...) and also beats Visual Studio (which is, to be fair, a pretty good product even if it is made by the evil empire) which certainly does not come for free with every compy of WinXP.
It is my opinion that an OS that makes developers comfortable is going to be a successful OS, so full credits to Apple on this one. I would really never have considered buying a mac before OSX (come on, they didn't even have a command line!) but now I have, and it just let's me get on with doing what I love, writing software...
I recently had to extend an automated theorem prover written in Haskell for a school project. While my background as a games programmer (asm, C, C++, some Java) means I find functional languages alien, I have to say that Haskell's type system is the best I ever met... I'd like to see someone make a type system this powerful for an imperative language... Maybe I'll have a go at it myself;-)
I assume you _really_ have to make everything in C++, otherwise you should seriously consider developing most of your code in another programming language. The way to make a crash free application is to use formal methods to prove it can't crash. That means specifying preconditions and postconditions for all methods and invariants for classes. There are no facilities in C++ for enforcing this kind of programming, but you can build your own based around the assert.h functionality. The other thing you want to do is to restrict yourself severely as to what parts of C++ you use. Use the STL library for everything, use smart_ptr and auto_ptr in place of raw pointers, use pass by reference as much as possible. Don't do anything fancy like multiple inheritance, operator overloading, advanced template programming or writing your own container classes. These things are better left for library writers. Build some sort of memory tracking facility so you will know about memory leaks (there shouldn't be any if you never use raw pointers, but you never know). Above all, make automated tests for all features you add.
I still play this arcade game almost daily with my colleagues at work -- we've been playing it for 10 years now, on and off. It started when we ported SS1 to Sega CD, then we played SS2 for ages - when I changed workplace later, some of the other people from Funcom put their money together and bought an arcade cabinet with a NeoGeo arcade unit in it. We've tried SS3, which has beautiful graphics - but the gameplay is just not quite as tight as in SS2. SS4 is a joke, bad graphics, bad gameplay.
The main reason we're still playing the game is simply that it's possible to get incredibly good at it. A beginner can never beat me, he would have to train for years. In fact, even after all this time we're finding new subtleties in the timing and priorities of the different moves. Another reason SS2 is the best 2D fighting game ever is that the characters are all different from each other and require a different way of playing to get the most out of. That also means you have to adapt your style to the character you're playing against. Almost all the characters are nicely balanced, so you can spend ages perfecting how to play each character.
All in all, Samurai Showdown gets a cool 11 out of 10 from me. But get the original, it doesn't play the same in MAME.
It would be more approriate to liken this to the Ku Klux Klan operating a radio station in the US -- do you think it would be accepted?
Stupid login reuqired to RTFA, feel free to use mine...
We've had this kind of system for years in Oslo, it's called www.trafikanten.no (also available in english) and gives you the quickest route from door to door using buses, trams, trains and by foot. Maybe Google should have a look at licensing the technology ;-)
This kind of stereoscopic 3D imaging is nothing new -- in high end visualisation work it's been around for decades. However, I had the fortune(?) to attend this year's SEG (society of exploration geophysicists -- oil and gas exploration) conference where there were severel stands with 3D displays that did not require glasses. Most of them were stereoscopic displays with a special film on which makes the left and right eye see different images, given that your head is in exactly the right position. I didn't find these displays very impressive, but there was one company (LightSpace Technologies) that was demonstrating a true 3D display where you could see behind things and around corners by moving your head. The image was flickering a bit, and everything appears a little transparent - but overall the effect is much better.
With modern compilers you should always use arrays. The reason is that for all but the most pathological cases of indexing, the compiler will do strength reduction and induction to turn the p[i*4] into *p,p+=4. The problem with using pointers is that if you have more than one of them, the compiler has no easy way of knowing if they point to the same place (this is known as pointer aliasing) so a bunch of useful optimizations have to be turned off. If you are doing a[i] = b[i] the compiler can much more easily find out that a and b are distinct memory locations than if you are doing *p = *q.
If you want to learn more about these kind of source level optimisations, look the AMD Athlon(TM) Processor x86 Code Optimization Guide is a good reference -- it includes a section on why you want to use array accesses instead of pointers, and also has a lot more up-to-date and useful advice on what compilers do to your code. It is available from AMD's website.
If you think blood or 'realistic' graphics makes a game more fun to play, it's time you grew up. I find games that focus on sex or violence to be mostly about the marketing and those devices serve to cover up for the missing gameplay...
How about you try to get some unix packages and compile them under Cygwin and see how well it works :-P OTOH, under OS X almost all unix software compiles without (or with minor) modifications... Cygwin is a horrible mess. I still use it occasionally when there is no other alternative, though.
Above all the important thing in a game is to make the player feel good about himself, give him or her rewards. It's easy to make a game challenging, but much harder to make it seem challenging but in fact be easy so the player gets that warm fuzzy feeling when he beats it.
I'll tell you a little story to give an example: While I was working on a boat racing game, me and the other main programmer studied a lot of racing games. I had a major realization when first I played V-Rally where a lot of the time your car ends up on the roof and has to be repositioned back on the track, or you end up turned around in the wrong direction. Sure it's not a bad game, it's challenging and it fulfils most of your criteria - but it's not really fun. Then we played Sega's Daytona in the arcade. It's a very fun game! After a while we started to realize why it was so much more fun than V-Rally. When you had a big crash the car was thrown spectacularly into the air. Just when you thought you were completely out of the race, somehow magically the car would _always_ land on the wheels with the nose pointing in the right direction along the track.
The game designer and the programmers of Daytona had found a way to make the game cheat in the players favour without the player even noticing. This lead directly to a feeling that 'yes, I can drive a car at 200 Mph around a twisty race track, no problem' and if you had an accident you were feeling 'wow, I'm lucky - still in the race', not looking for the Pause->Restart Race menu...
This is but one example, but you'll find that most games that are truly fun actually help the player a lot. Say in Zelda, when you're low on energy, the likelyhood that the enemy you beat will drop a heart increases. Little things like that.
I think it's a pretty sensible choice for a SSID - I'm not running some top secret operation, and if someone wants to hack my network maybe they'll feel more guilty when they know exactly who they're screwing over. Besides, it's a truly unique identifier so no chance the neighbour will come up with the same 'clever' SSID as me and screw up my networking. And if one of my good neighbours have a problem preventing them from accessing the internet, they know who to ask if they want to borrow mine. (And yes, I would also lend them a cup of sugar if they came over and asked...)
I don't have time to spend on getting everything 'just right' the way I like it, if you want to do that you should install Linux and make patches for your favourite open source software. I'm more than willing to take something that works well and adapt to the software's various ideosynchracies. The Apple software like Mail.app, Safari, iTunes, iCal, XCode, Terminal etc. more than works for me, combined with a rock solid WiFi implementation (far better than Windows XP which tends to randomly drop the connection for a few seconds every now and then) this makes OS X my favourite environment to get work done in.
Yes of course there are annoyances -- you've learned to do things one way and when you try to do them the same way on a mac it doesn't work, and a lot of the nice little details of the OS you just don't know about at first. To take two examples: when I first got a mac I was looking for the Add/Remove programs thing in the System Preferences (the equivalent of the control panel) because I wanted to uninstall a program. I couldn't find it, and grew frustrated until I realized that you can just drag applications to the trash. The second example is that just a few weeks ago (after over a year of using the iBook every day) I realized I can drag a file on top of the terminal window and it types the full path and name of the file - it's a very nice feature, integrating the finder and the terminal nicely. Of course there are also other annoyances which are _real_ annoyances unlike my first example. The software supplied with my digital camera didn't have an OS X version and although iPhoto is very nice, there are some advanced features of the camera that I can't use. Overall I'm extremely pleased with the mac, 99% of the time things just work and I can concentrate on the work I want to get done. I use quite a lot of unix applications which don't run well on windows (don't get me started on cygwin... it really is quite unpleasant), so for me it's a big gain -- YMMV
Step 1) Take the biggest digital picture in the world
Step 2) Post the link on Slashdot
Step 3) Profit ???
It's for all computer players, I guess you could offset it a bit by playing different computer opponents since they have slightly different weak points. However, if you want to improve there is no other way than playing human opponents.
Playing on KGS is a good idea, since the software includes a 'review' mode and in general the players there are slightly more interested in teaching beginners than on the other go servers. However, online go is mainly (perhaps because of the ratings?) a competitive environment and the best way to learn the game is definitly to go to a club if one exists in your vicinity.
Igowin will just teach you bad habits - if you had played 1400 games with me you'd already be 1. dan
(I can give igowin 5 stones handicap and still win, thus earning the rank of 'professional' which is just ridiculous...)
It seems the author of the article has decided to give it a sensationalist spin. PlanetLab is a platform intended for researchers to experiment with new protocols. It's a world wide network of computers dedicated to research, and a number of interesting research projects are using it.
t la b.htm ...
http://www.intel.com/research/exploratory/plane
On a unix system every program stores it's configuration in it's own file and it's own format. There is no standard way of separating system wide and user configuration. There is no way of taking a snapshot of the current configuration for a user so you can put the same configuration on a new machine. There is no way to roll back changes to the configuration. How is this better than the functionality the registry provides???
There is a whole bunch of modal logics which are complete and very important in applications in computer science such as program verification. For example CTL, Computational Tree Logic or description logics such as SHIQ (which is an important part of the design of the OWL language for the semantic web). In fact, Gödel's work (and the subsequent advent of the computer) has completely transformed logic as a subject. Nowadays it is studied in a way where you want to know how adding different features to your logic will change it's decidability, completeness and computational complexity.
This is pretty standard practice in computer games, especially for consoles... On another note, I question the sanity of people who use C languages for something else than embedded systems, performance critical applications or kernel modules... (I worked in the games industry for 7 years)
;-)
Last year I found myself extending an automated theorem prover written in Haskell, and actually _enjoying_ it... Haskell is very good for solving complicated problems, most of the time you find that if you manage to write down what you're thinking it actually works right away (although writing it down can be pretty hard). Unfortunately, even with monads, I find it is a bad match for the kind of event model employed in most GUI's... Now if only it was a bit easier to link Haskell with programs written in other languages I could make the GUI in Visual Basic and the rest of the program in Haskell
I have a lot of experience in finding and fixing difficult bugs. In my experience, the most important thing you can do is when you find a bug, stop and think how you could have caught this bug automatically. If you practice this policy, you end up with very solid code. Basically, in the debug build, no function should ever crash the program no matter what garbage you put in the parameters - it should report an error and stop.
I think writing solid code is all in the attitude of the programmers - I had one guy who had a memory overwrite bug that was corrupting some characters in his string table when he called a certain function. Do you know how he fixed it? He wrote some code that put the right characters back over the corrupted ones after the call to this function!!! If you have that attitude, things WILL blow up in your face...
I believe the ABI part means they are claiming copyright of the specific numbers assigned to each of these standard (API) defines. They can't claim copyright on the defined names since they are ANSI/ISO standardized, but the standards do not mandate which numbers are assigned so this is (or at least can be interpreted as) original work.
Since this is an autoconfiguration feature, why not have it on only for the first boot after installing the OS? This way the computer can autoconfigure and then when it is configured it turns the feature off again.
If you're like me and want to do some development for fun, the new developer tools that come with Panther are absolutely amazing. I think it beats anything available for free (fix and continue, need I say more...) and also beats Visual Studio (which is, to be fair, a pretty good product even if it is made by the evil empire) which certainly does not come for free with every compy of WinXP.
It is my opinion that an OS that makes developers comfortable is going to be a successful OS, so full credits to Apple on this one. I would really never have considered buying a mac before OSX (come on, they didn't even have a command line!) but now I have, and it just let's me get on with doing what I love, writing software...
I recently had to extend an automated theorem prover written in Haskell for a school project. While my background as a games programmer (asm, C, C++, some Java) means I find functional languages alien, I have to say that Haskell's type system is the best I ever met... I'd like to see someone make a type system this powerful for an imperative language... Maybe I'll have a go at it myself ;-)