News for hackers. Stuff that matters.
Re:CivClicker by bshimmin on Sunday June 15, 2014 @02:02PM (#7895827)
The source [0] is kind of an incredible copy and paste achievement. Clearly the author doesn't suffer from the "Last Line effect". [1]

Still, it was sort of fun for a minute or two.

[0]: http://dhmholley.co.uk/civclicker.js [1]: https://news.ycombinator.com/item?id=7858612

Re:CivClicker by dhmholley on Sunday June 15, 2014 @05:59PM (#7896479)
I hope the source isn't too horrible. I was basically a complete javascript novice when I started coding the game. If I were to write it again I'd probably do it very differently, though I still have a lot to learn.
Re:CivClicker by reitzensteinm on Sunday June 15, 2014 @07:12PM (#7896664)
You finished it, which is by far the most important thing. Without that, it doesn't matter what the code looks like because you'd have achieved nothing.

My first Flash game that I wrote in two weeks had some god awful copy pasted code that made me embarrassed to show anyone. But it made six figures over the years and launched what turned out to be a viable career in game development (I've never had a real job).

Code quality is important to work on, but it's just there to help you with the primary goal: shipping something cool.

You got there, so fuck the code. Great job.

Re:CivClicker by makmanalp on Sunday June 15, 2014 @06:50PM (#7896610)
The trick is to reduce parts where you duplicate a lot of code by using generalized functions to abstract things out.
Re:CivClicker by Gigablah on Sunday June 15, 2014 @11:15PM (#7897230)
You got me stuck on your game for two days. I think I might just start coding an incremental game of my own. Cheers!
Re:CivClicker by espadrine on Sunday June 15, 2014 @03:09PM (#7895990)
> * Clearly the author doesn't suffer from the "Last Line effect".*

Actually, he failed to put a comma after the `gold = {…}` expression.

Re:CivClicker by jiggy2011 on Sunday June 15, 2014 @03:58PM (#7896116)
That is nearly 7k lines, what's the chance that it could be re-factored to < 1k with angular/ember?
Re:CivClicker by untog on Sunday June 15, 2014 @04:24PM (#7896199)
Not sure what Angular/Ember would have to do with it. There's just a lot of duplication in there that could be removed without adding the extra bloat of a framework.
Re:CivClicker by jiggy2011 on Sunday June 15, 2014 @04:27PM (#7896206)
Reducing the amount of UI code mostly.
Re:CivClicker by lukasm on Sunday June 15, 2014 @02:05PM (#7895833)
Great! Yesterday I wasted a few hours on this http://adarkroom.doublespeakgames.com

Do you pine the days of Knights and Merchants? Age of Empires? I wish someone would make game like that. No need for fancy graphics. No MMO. No in-app purchase. Same experience like the old ones have.

Re:CivClicker by ChikkaChiChi on Sunday June 15, 2014 @03:10PM (#7895994)
I too felt this way. I would spend too much time in Dwarf Fortress learning when I could be coding, so that was out.

Stronghold looks like the next thing I'll try. Plenty of old games on gog.com right now that are on sale that work on Mac.

Re:CivClicker by endgame on Sunday June 15, 2014 @05:42PM (#7896437)
Someone (or several dedicated someones) reimplemented KaM: http://www.kamremake.com/about/
Re:CivClicker by edwintorok on Monday June 16, 2014 @09:07AM (#7898805)
"0 A.D. originally began as a comprehensive total conversion mod concept for Age of Empires II [...]the team soon turned to trying to create a full independent game based on their ideas"

https://en.wikipedia.org/wiki/0_A.D._%28video_game%29

Re:CivClicker by lukasm on Tuesday June 17, 2014 @08:52AM (#7904070)
Tried that. Performance is bad and gameplay needs tweaking
Re:CivClicker by halflings on Sunday June 15, 2014 @02:43PM (#7895921)
The Civilization series is still pretty good :) The next one will even be a revival of Alpha Centauri.
Re:CivClicker by cmdkeen on Sunday June 15, 2014 @01:42PM (#7895777)
My finger hurts. Good inspiration on how you can put something together fairly quickly. I've been playing with a medieval simulator for a while now - and this has galvanised me to get back into it. Cheers!
Re:CivClicker by vanilla on Sunday June 15, 2014 @02:54PM (#7895944)
don't stress your fingers !

setInterval(function(){increment(food);increment(wood);increment(stone)},50);

Re:CivClicker by stusmall on Sunday June 15, 2014 @03:42PM (#7896077)
or call ruinFun()
Re:CivClicker by digdigdag on Sunday June 15, 2014 @03:10PM (#7895995)
Well where's the fun in that?
Re:CivClicker by boobsbr on Tuesday June 17, 2014 @09:31AM (#7904278)
Some people like to play the game, some like to play with the code behind the game.
Re:CivClicker by myhf on Sunday June 15, 2014 @04:26PM (#7896201)
You can't get the minimum-clicks achievement that way.
Re:CivClicker by kennywinker on Sunday June 15, 2014 @03:21PM (#7896028)
I just played through A Dark Room on iOS, and it's probably one of the best phone games I've ever played. Looks similar to this, but used as a storytelling platform in a way that it doesn't look like this (or the web version of a dark room) is to the same extent.
Re:CivClicker by makmanalp on Sunday June 15, 2014 @06:52PM (#7896617)
Addicting! One thing is that I have tons of barracks and stables but can't seem to be able to create soliders and cavalry for some reason ...
Re:CivClicker by MrBlue on Sunday June 15, 2014 @06:56PM (#7896620)
You need metal for soldiers
Re:CivClicker by makmanalp on Monday June 16, 2014 @05:23PM (#7901556)
I already have metal :(
Re:CivClicker by DanBC on Sunday June 15, 2014 @06:02PM (#7896491)
I am gently worried that I'll play an incremental game that is also mining some kind of crypto coin simultaneously.

That sounds unlikely but look at the reddit group for cookie clicker collector - people do leave it running for days.

Re:CivClicker by Freeboots on Sunday June 15, 2014 @06:55PM (#7896618)
You can tell if its mining, your machine, laptops especially, will let you know something is up.

I do think its an interesting area for development though. I would be ok with a low mining instead of ads.

Re:CivClicker by sroerick on Sunday June 15, 2014 @11:39PM (#7897294)
Would you play a game that used that as its business model?
Re:CivClicker by DanBC on Tuesday June 17, 2014 @05:14PM (#7907037)
If they were upfront about it I might. It'd be better than having to remove via IAPs some totally artificial timer.
Re:CivClicker by RTesla on Monday June 16, 2014 @12:13AM (#7897379)
Really nice man! I've been playing it for an hour now.
Re:CivClicker by RTesla on Monday June 16, 2014 @02:52PM (#7900758)
Still playing it. I seem to be stuck with no ore, but needing ore to get miners to collect ore?