13 ms·
Notch, WebGL, Dart, and ramping up quickly
- HeyChinaski 13y agoNow I feel bad for slowing up my current pet project by getting bogged down writing polygon collision detection when axis aligned bounding boxes would have done for prototyping. (I'm not as quick as Notch!)
- xhrpost 13y agoInteresting. I've recently set aside a ThreeJS project. I'm not a math wiz but even with Three, you still need some idea about matricies, vectors and even quaternions. The way you're "supposed" to do collision detection with Three is with raycasting, so more fun with vectors and matricies. I thought I had scaled down enough other things for prototyping but perhaps there was more room than what I thought.
- daredevildave 13y agoYou might want to take a look at our product, PlayCanvas. We've tried to do all the maths for you, so you don't have to. :-)
- VikingCoder 13y agoTo be fair, Notch did just spend a few years of his life thinking entirely in terms of axis-aligned boxes. ;-)
- Djehngo 13y agoMy understanding is that usually you want both because AABB is good for broad-phase because it's so quick then true polygon collision can be done in a narrow phase.
- HeyChinaski 13y agoAbsolutely.
- bluedino 13y ago>> (I'm not as quick as Notch!) You probably haven't been writing games as long, or written as many, or entered as many game contests/competitions as he has. It'd probably take him a while to write a database or word processor since he likely doesn't have the domain knowledge and experience.
- yoklov 13y agoWell, this can actually have a pretty significant effect on the feel of the game so depending on what kind of game you were prototyping, it might be worth it (though, your better off hardcoding a few cases of SAT than trying to get it working completely generally in a prototype).
- HeyChinaski 13y agoHow would one hard code SAT cases? Just curious I've got the general code working now.
- dicroce 13y agoI agree with his main point, but to be honest, on most of the games I've worked on I've had something playable very fast (1 or 2 weeks)... Its all the details beyond basic gameplay that take all the time and really make delivering a game hard.
- RyanZAG 13y agoAgree completely. Basic little 3D engine is easy to do because it's been done so many times before. Any of the complexities are well known and it's not like Notch hasn't made a similar block based 3d engine before. The author talks about not making an engine and just making a game.. but there's no game here yet? The hard part is always the details and the new stuff.
- Xdes 13y agoAll that stuff sounds so cool, but I have no idea of how I would implement it in code. One of these days I'll learn 3D graphics programming.
- agentultra 13y agoI recommend http://www.amazon.com/Math-Primer-Graphics-Development-Edition/dp/1568817231/ref=sr_1_1?ie=UTF8&qid=1386098622&sr=8-1&keywords=3d+math+primer http://www.amazon.com/Math-Primer-Graphics-Development-Editi... when you're ready
- detritus 13y agoahha, thanks for this! I'm really pleased to see Notch doing what I always thought he did best - messing around with wee projects and coming out with joyous little playthings. Minecraft just got a little bigger than I imagine he was interested in playing with.
- discreteevent 13y agoI don't want to criticise the blub essay too much because there were some valid points in there. But in fairness as soon as I read it I thought of John Carmack. He uses C++. Given that the perspective of the essay is Lisp then if C++ isn't a blub I don't know what is. But John Carmack is really productive. Also he doesn't use vi or emacs. He uses an IDE! He used it even before it had any bells or whistles at all. (He also uses Windows!) So is it because he's a genius and he does it in spite of using blub? Or is it because: "Peter Norvig here. [....] In terms of programming-in-the-large, at Google and elsewhere, I think that language choice is not as important as all the other choices: if you have the right overall architecture, the right team of programmers, the right development process that allows for rapid development with continuous improvement, then many languages will work for you; if you don't have those things you're in trouble regardless of your language choice." As for Notch. He uses Java and wait for it.. Eclipse!
- bcjordan 13y agoFor the confused, blub is the hypothetical language from pg's essay Beating the Averages: http://www.paulgraham.com/avg.html http://www.paulgraham.com/avg.html
- coldtea 13y agoWell, it's just an essay. Not something even remotely proven. A computer SCIENTIST should scorn the use of the "blub" notion as something that holds a priori.
- peterashford 13y agoNot to mention that it's a very opinionated, elitist, offensive essay. How calling people "Blub developers" can be taken serious and not as elitist posturing is beyond me.
- klrr 13y agoSo you claim he learnt a language and a new technology quickly, solely because he uses an IDE? I doubt so... The Norvig quote sounds more reasonable.
- jdonaldson 13y agoUltima Underworld continues to blow my mind. Happy 22nd birthday.
- xradionut 13y agoI don't know why the blog poster is impressed. This is Notch's domain, writing code of this ilk. He's probably got over a decade or more dealing with games and graphics, the hard part is dealing with a API that's unfamiliar. (I have ported familiar code from a Python script to a C# desktop application in similar time, the hard part was dealing with various .NET quirks.)
- kleiba 13y agoNow, I haven't seen one line of Notch's code. I have no idea if it's well structured or spaghetti. I would make an educated guess and say that there's a lot of the basics in this project that have been ported over from the Minecraft or 0x10c code. This last point is rather unlikely I think. I spent more than one or two weeks worth of time watching the various screencasts you can find on twitch.tv of Notch coding (I find it highly relaxing). He usually writes everything from scratch. He doesn't copy & paste from other projects because he's experienced enough to pretty much to just write down the code he wants. He also hardly ever looks up documentation (besides using autocomplete for library methods). Also, he practically doesn't write any code comments in these toy projects. He's extremely productive in my opinion, and can easily spend hours at a time coding. He does a lot of play testing and small gameplay fixes, even at early stages. I've learned a whole lot just watching these videos. For instance that we don't have the same taste in music :-) But thank god for twitch.tv.
- Sir_Cmpwn 13y agoI've also spent time examining Notch's coding habits. He is a terrible, terrible coder. Minecraft was (and still is) an unoptimized, poorly designed piece of crap when he handed it off to the rest of Mojang. The DCPU-16 he designed had many flaws and his assembler for it threw out assembly convention. He makes very basic mistakes very frequently and his core designs are flawed. I say this as someone who has spent a considerable amount of my life [1][2][3] figuring out this terrible crap and working around it. Notch is a very bad programmer, and people only revere him because he made Minecraft. To reply to you all at once: regardless of his ability to create or ship a game, which is not in question, his ability to write good code should not be idolized. His failures have tangible reprecussions that have long plagued the Minecraft hacking community and Mojang itself. [1] https://github.com/SirCmpwn/Craft.Net https://github.com/SirCmpwn/Craft.Net [2] https://github.com/SirCmpwn/Tomato https://github.com/SirCmpwn/Tomato [3] https://github.com/SirCmpwn/organic https://github.com/SirCmpwn/organic
- drawkbox 13y agoYes good code can be commended, but initially it was his small project he worked up to be his golden ticket, never expecting it to be such a huge success. I'd say he did enough good to get it shipped, in the end that is the metric. But in terms of maintenance and clean code, I am a big proponent of it and good architecture. I can't say that this makes a project successful or not but it does make it easier to deal with after it is successful and sometimes largely determines how far it can go. There is always a battle between shipping and quality and here Notch was just shipping, in terms of the end product he is a good coder and a product shipper.
- missing_cipher 13y agoWhere would a noob to this kind of stuff start? I'd like to draw a rectangle to the screen. :)
- copx 13y agoHere: Rectangle(100, 100, 400, 400) That or something very similar [1] draws a rectangle from pixel position (100,100) to (400,400) in many high level 2D graphics environments. Just posting this to point out that you do not have to make things more complicated than necessary. OpenGL is a standard for hardware accelerated 3D graphics and it is inherently complex because of that. If you just want to do 2D do not bother with it. [1] http://love2d.org/wiki/love.graphics.rectangle http://love2d.org/wiki/love.graphics.rectangle
- habith 13y agoI found NeHe's tutorials to be easy to follow especially since code that's ready to compile is provided at the end of each lesson: http://nehe.gamedev.net/ http://nehe.gamedev.net/ Most of them focus on OpenGL for windows. I just searched and found this WebGL tutorial which says it's based on NeHe's so it's hopefully good: http://learningwebgl.com/blog/?p=28 http://learningwebgl.com/blog/?p=28 Disclaimer: I'm not a game developer and I barely dabble in the 3D world, so take my links with a huge grain of salt :)
- Pxtl 13y agoMy understanding is that the NeHe tutorials are archaic and do not properly reflect modern OpenGL usage. Iirc the legacy constructs used in NeHe have been dropped in mobile implementations of OGL.
- exDM69 13y agoStay away from NeHe tutorials, they are badly written and really old. Pretty much everything they cover is deprecated and done in otherwise old fashioned ways. This is a big problem with OpenGL tutorials in general, a lot of them cover old stuff that shouldn't be used any more. The entire OpenGL fixed function pipeline is deprecated, replaced by programmable shader pipeline. It's a lot more work to get simple stuff done with shaders but it pays off in the end. If you're looking to write a game (and not an engine) it may be a good idea to get an engine and not write "raw" OpenGL at all.
- krapp 13y ago>Don't build an engine that you will someday build a game on top of, because you will never get past step one. I have several still-unfinished Game Maker apps which more or less died because I got so bogged down on the "engine". So yeah.
- aidenn0 13y agoIn this case, I see an analogy with the whole "Do it manually with a few customers" advice for startups that pops up from time-to-time. You write the damn code from scratch and see what gameplay is interesting, then you can write tools within that domain.
- krapp 13y agoNow that html5 is a thing that would definitely be doable.
- Fr0styMatt 13y agoI've thought about that a lot as I also have the same tendency. What I've concluded (for me at least) is that it's just EASIER to get started writing an engine than to write a good game, so you end up working on the engine out of intellectual curiosity and because it's the path of least resistance. (I've never really gotten far writing a 'from-scratch' engine here but I'm also thinking of things like integrating a scripting system into an existing engine, which is something I've done before). With an engine, you don't start with such a nebulous spec. You know, for example, the various pieces that your engine will need and it's easy to get started. You can say "well I need an asset importer", "I need to integrate a scripting system for gameplay", "I need some kind of rendering pipeline", etc. These are generally well-defined things. With a game, well, what is there? You start off with the question "what is a fun game idea?" but in comparison it's so free-range. The ideas of where to head next just don't come as easily. Not to mention a lot of the non-programmer things that need doing - drawing the graphics, writing the music, writing the dialog if appropriate, etc. These can be intimidating things to attempt to do.
- barrkel 13y agoThis is less a matter of only writing what's needed, than having written the same thing in lots of different variations, until you know the essence of the problem, and which are the most elegant paths to take. A beginner in any discipline can't accomplish so much with so little effort. And it's wrong for a beginner to start out trying to do so, IMO; it's too easy to get discouraged if you think from the start that you should be able to do it with so little effort. Writing your first game loop is a bit clunky, trying to fit it in with whatever framework / language / API is hosting you, and the sequencing / setup of everything. The tenth time, you know exactly what you want from an API, and have a good idea of what bits you need to build to get the effect you need. The hundredth time, you can look at a new API / framework and see the what it enables you to build most efficiently, and you can let that inform the design of what you create. Then, very little effort is needed. But that's only because you've already done the "really complicated system for loading meshes and shaders" or some equivalent in the past. It's hard to get really efficient without having done things the inefficient way to begin with, if not earlier in the current project, then in previous projects.
- cromwellian 13y agoDart syntax is very similar to Java in many respects, but simpler, so is it really any surprise that Notch would try out Dart, given his history with Java? People like what's familiar. One of the reasons Java took off is because of it's similarity to other ALGOL type languages. C/C++ programmers could learn Java quickly for example.
- deleted 13y ago[deleted]
- ntide 13y agoYou know, I read Hacker News less and less precisely because the posts are so damn negative. For those debating whether Notch is good or bad, I suggest reading every article from programming in the 21st century.[1] [1] http://prog21.dadgum.com/archives.html http://prog21.dadgum.com/archives.html
- ps4fanboy 13y ago"Just saw a nerd flamewar debating if I'm a bad programmer. I'm self-taught, prefer working along, and program for fun. Don't learn from me." https://twitter.com/notch/status/408011329237049344 https://twitter.com/notch/status/408011329237049344 Gotta feel sorry for him, he didnt ask to be or not to be an idol, must be disconcerting to have a bunch of random strangers talking about how good you are.