|
It's "done". It's... pretty much not fun at all. You can play it here and view the source code here. I had fun, learned some Javascript and a bit about the process of making a game. I sort of want to go ahead and actually make a "real" game now. One where I can actually plan and maybe even have make something fun. e: drat, new page. To apologise for this having to be at the top of the page for a while, check out this commit I made. I've had the flu most of this week and dozed off while watching presentations by Douglas Crockford a couple times. For some reason I got it in my head that the += operator was unsafe and I was purposely not using it. I'm a dumbass. Xik fucked around with this message at 16:03 on Mar 15, 2014 |
# ? Mar 15, 2014 15:55 |
|
|
# ? May 18, 2024 03:22 |
|
munce posted:I think its because it takes a huge amount of effort to make the graphics look any good. There's dozens of frames for each character, plus the backgrounds. Even just taking the pre-made graphics out of xcom and putting it into this was a fair amount of work. If you were drawing everything from scratch you would need a really good artist (or art team) that are prepared to work for a long haul. I'm no artist, hence my use of art from someone else's game. Also nostalgia.
|
# ? Mar 15, 2014 16:13 |
|
Xik posted:
hey, did ya know that in javascript, you can also use ++?
|
# ? Mar 15, 2014 17:46 |
|
kayakyakr posted:hey, did ya know that in javascript, you can also use ++? I only use "the good parts" of Javascript as defined by Crockford and run the code through jslint. Using ++ would result in an error. This is why I was confused about +=, for some reason I thought I had read not to use it, something about string concatenating.
|
# ? Mar 16, 2014 01:11 |
|
Crockford's rationale against ++ is "if I use it, I'm tempted to merge everything into one line". It's not unsafe or dangerous in any way, it's just Crockford applying his anecdata thinking that avoiding it will somehow make people write better code.
|
# ? Mar 16, 2014 01:59 |
|
Most of what is in jslint has pretty good reasons for being there, but I'm aware some of the "rules" are just opinions. I'm an amateur, and having an opinionated tool made by an expert that goes through my code line by line is pretty much invaluable. In the best case scenario it catches some error I would have spent ages debugging in the browser, at worst it just keeps the code to a consistent style.
|
# ? Mar 16, 2014 02:28 |
|
crockford is a crock. don't pollute the global namespace, don't make spaghetti code, keep things reasonably object oriented and you're doing better than 90% of javascript programmers.
|
# ? Mar 16, 2014 02:47 |
|
I don't think being better then 90% of Javscript programmers is much of an achievement. Why even bother setting the bar at all if you're setting it so low? If you're an experienced developer and know Javascript really well that's awesome. I'm not. Until I am, and know JS more intimately to know when to break the rules, I'll just follow them. I'm not arrogant enough to think that I know more after a week then someone who has been using it for over a decade. e: pokeyman posted:You're conflating one man's opinion with "rules". Just remember that you're tying your own straitjacket, is all. Yep, I totally understand that. But the actual "rules" (the official standard) for Javascript is horrible and/or broken. I'm also not working within a team so have no personal mentors to guide me. If this was any other modern, popular language I could just read the official docs/api and just be fine. Xik fucked around with this message at 03:51 on Mar 16, 2014 |
# ? Mar 16, 2014 03:18 |
|
Xik posted:If you're an experienced developer and know Javascript really well that's awesome. I'm not. Until I am, and know JS more intimately to know when to break the rules, I'll just follow them. I'm not arrogant enough to think that I know more after a week then someone who has been using it for over a decade. You're conflating one man's opinion with "rules". Just remember that you're tying your own straitjacket, is all.
|
# ? Mar 16, 2014 03:35 |
|
Xik posted:Yep, I totally understand that. But the actual "rules" (the official standard) for Javascript is horrible and/or broken. I'm also not working within a team so have no personal mentors to guide me. If this was any other modern, popular language I could just read the official docs/api and just be fine. If that's your opinion of Javascript (it's the correct opinion to have too!), then perhaps Javascript is not the ideal language for you to gain experience in? As penance for language-chat, here are some pics from an old project that I'm starting to update to C++11:
|
# ? Mar 16, 2014 04:09 |
|
Suspicious Dish posted:Crockford's rationale against ++ is "if I use it, I'm tempted to merge everything into one line". Yes it is unsafe. Why do you think Crockford has this opinion? Why do you think it only works on its own line in Go? Its use passed through some refactoring caused a security bug in Tarsnap. You're the problem, willfully using things you find "convenient" like some scrub. But wait does Crockford seriously use += 1 in for loops or on its own line? shrughes fucked around with this message at 12:11 on Mar 16, 2014 |
# ? Mar 16, 2014 12:09 |
|
shrughes posted:Yes it is unsafe. Why do you think Crockford has this opinion? Why do you think it only works on its own line in Go? Its use passed through some refactoring caused a security bug in Tarsnap. You're the problem, willfully using things you find "convenient" like some scrub. I pretty much only use ++ on its own line. My issue isn't the operator, it's that he's basing a gigantic rule to the language on his own gut and opinion, rather than actual data. It might be that ++ is actually horrible, so I'd love to see some data. Got a link to the Tarsnap bug? shrughes posted:But wait does Crockford seriously use += 1 in for loops or on its own line? Yes. And jslint enforces that. No ++, ever.
|
# ? Mar 16, 2014 15:03 |
|
Suspicious Dish posted:Got a link to the Tarsnap bug? http://www.daemonology.net/blog/2011-01-18-tarsnap-critical-security-bug.html ?
|
# ? Mar 16, 2014 15:09 |
|
Sorry if my comment came off as attacking, I meant it more as self parody or a recording of my natural reaction to such a post. The best thing about the CTR bug was how on HN tptacek had warned cperciva of this very thing in multiple arguments about what chaining modes to recommend.
|
# ? Mar 16, 2014 15:33 |
|
Thanks for the link.
|
# ? Mar 16, 2014 15:46 |
|
kayakyakr posted:crockford is a crock. don't pollute the global namespace, don't make spaghetti code, keep things reasonably object oriented and you're doing better than 90% of javascript programmers. You have to be super careful when flinging terms like "object oriented" around with javascript - it has a lot of features that simulate those you'd find in an object oriented language, but the combination of dynamic typing, lack of "interface" construct and poor exception handling make it a poor choice for large scale projects. Stuff like Dart, Typescript and the Google Closure compiler make an attempt at mitigating these issues, but the language inherently is weak for OOP.
|
# ? Mar 16, 2014 18:23 |
|
Bruegels Fuckbooks posted:You have to be super careful when flinging terms like "object oriented" around with javascript - it has a lot of features that simulate those you'd find in an object oriented language, but the combination of dynamic typing, lack of "interface" construct and poor exception handling make it a poor choice for large scale projects. Stuff like Dart, Typescript and the Google Closure compiler make an attempt at mitigating these issues, but the language inherently is weak for OOP. Which is why I say, "reasonably object oriented". There are a bunch of ways you can do this from attaching things to objects to node-style module exports. Personally, I like doing prototypal objects inside closure scopes. You and I probably wouldn't agree when it came to attributing an importance to some of these features or lack thereof. For example, I'm on the side of liking dynamic typing for the most part. But you hit it on the head when you mention large-scale projects. JS is good for client side stuff and good for small webservers, but it's certainly not appropriate for much beyond that.
|
# ? Mar 16, 2014 18:47 |
|
Playing with A* Pathfinding. I've been messing with pathfinding for the last few weeks, but this is the first time I add a visual component to it outside of printing to the console. Source Runnable JAR
|
# ? Mar 16, 2014 21:21 |
|
Suspicious Dish posted:Yes. And jslint enforces that. No ++, ever. It's all about JSHint anyway. A little more balanced of an approach (See attached)
|
# ? Mar 16, 2014 22:51 |
|
Yep. Don't use JSLint, it's bad. Xik would probably be better off hearing that, though.
|
# ? Mar 16, 2014 23:05 |
|
Lurchington posted:It's all about JSHint anyway. A little more balanced of an approach (See attached) I see it has some plugins for Sublime Text 3, my job atm is pretty much 100% javascript. How worthwhile would picking this up / learning this be?
|
# ? Mar 16, 2014 23:17 |
|
I thought I'd learn a little Emacs Lisp and port Dark Souls to it https://www.youtube.com/watch?v=Sv1OS7bOrIQ
|
# ? Mar 16, 2014 23:33 |
|
Bruegels Fuckbooks posted:You have to be super careful when flinging terms like "object oriented" around with javascript - it has a lot of features that simulate those you'd find in an object oriented language, but the combination of dynamic typing, lack of "interface" construct and poor exception handling make it a poor choice for large scale projects.
|
# ? Mar 17, 2014 00:07 |
|
Tres Burritos posted:I see it has some plugins for Sublime Text 3, my job atm is pretty much 100% javascript. How worthwhile would picking this up / learning this be? In my opinion, there are two places where it's worth taking the time setting up a "linter" (a generic term for something that enforces coding style best practices by failing the build): - your office has a continuous integration and build environment where multiple developers are checking things in, and want the agreed-upon style enforced - you personally want to make sure you're using best practices and you're the only one who touches stuff if this applies to you, I think it's worth setting up something like jshint and fixing the things it tells you to do.
|
# ? Mar 17, 2014 00:07 |
|
Lurchington posted:
This, via Grunt, with Bower + NPM + Travis/Jenkins, is a special kind of bliss. Add SASS + AngularJS + some kind of AMD into the mix and suddenly developing JS webapps is almost sane.
|
# ? Mar 17, 2014 03:35 |
|
I've been working on my duplicate file detector/scanner application for a while now and I was designing the UI around Java's Nimbus look and feel. But it was rubbing me the wrong way and the UI wasn't intuitive or user-friendly at all, so I've been working on some custom Swing components that complement Java's default Metal look and feel pretty well. I guess my components could be considered a skin for Metal, so I've named it Oxide because whatever. Anyway, I'm in the progress of migrating and implementing my Oxide components. So far it looks like this: The goal is for cross-platform compatibility which I hope to accomplish by reaching some aesthetic compatibility with Java's native look and feel. edit: In the progress window the yellow progress indicator icon is actually animated like this: . My goal when designing the progress indicators was to match the Oxide/Metal aesthetic with respect to their minimalism. Woodsy Owl fucked around with this message at 04:36 on Mar 17, 2014 |
# ? Mar 17, 2014 04:33 |
|
Video sunday? I always miss screenshot saturday. But hey, videos! Finally got video of the new Franky AI. It's surprisingly fun to play with, and the Creepy Watson teleporting both fits the theme and is an awesome in-joke/reference. https://www.youtube.com/watch?v=WlR6kjPk9qA ... and here's the final ammo and ammo box and all that art. The gum drop rounds and the catnip rounds are especially cool. https://www.youtube.com/watch?v=CHJ8ztqe_38 Also, we're finally in production mode, so I can start showing off actual levels. I'm really happy with how the drawbridge and torches worked out. It's all graybox, but you get the idea. https://www.youtube.com/watch?v=MXQBYUZIT78
|
# ? Mar 17, 2014 05:54 |
|
Is there a reason you load individual bullets rather than just selecting a weapon? Will there be puzzles that involve loading the correct sequence? It just seems it might get old kinda quickly.
|
# ? Mar 17, 2014 18:33 |
|
Programmer Humor posted:Is there a reason you load individual bullets rather than just selecting a weapon? Will there be puzzles that involve loading the correct sequence? It just seems it might get old kinda quickly. As for the why - because hey, why not? I've played a ton of games where you find the freeze gun and the burn gun and the (etc), but I've never played a game that lets you customize and then rapid-fire a combo of all of the above. That, and the revolver angle fits noir well. EDIT: The revolver was actually the very first element we built around, the whole game grew out of an experimental gun system that I threw some shadow'y lights and a fedora into for funsies. As far as the reload being annoying, we'll probably add a quick-reload that keeps your currently load intact / just refreshes the bullets. That'll be nice for traversals et al that just need a lot of the same thing. Shalinor fucked around with this message at 18:53 on Mar 17, 2014 |
# ? Mar 17, 2014 18:49 |
|
Still not as interesting as the voxel generators and such posted here regularly, but here goes: My first shot at an Android app. I've already made this app in C#/Windows Forms, but I really wanted to try my hand at something mobile. It has been...interesting. I'll say this, doing this app in C#/Visual Studio were WAY easier than Java/Android Studio. It took me a whole of 30 minutes to get everything working more or less, whereas this has taken me a few days. Part of that is learning the file structure of Android's projects, which is easy enough, but I get this sense that the slightest mistake when editing file X in arbitrary location Y permanently messes up your project, but that's likely just a lot of user error on my part. Also C#'s number generation is cooler because it lets you set a lower and upper bound, whereas Java only lets you set an upper bound. Really I just wanted to have something I could point to and say "see, I've done this thing, please don't throw my resume away immediately". This is just the start of that. Lots of work to go.
|
# ? Mar 18, 2014 07:26 |
|
That looks great, congrats!
|
# ? Mar 18, 2014 15:45 |
|
Literally Elvis posted:
How smart are the fake answers? E.g. 4-12 could include -16, 8, -8, 4 or something to be trickier.
|
# ? Mar 18, 2014 16:33 |
|
Dren posted:How smart are the fake answers? E.g. 4-12 could include -16, 8, -8, 4 or something to be trickier. They're not very smart. If the actual solution to the problem is less than X, then the random numbers generated for possible answers can't be higher than X + 10, IIRC. I need to come up with a better solution than that, but that was all I could think of in a jiff to make sure the proposed answers for 2 + 2 weren't something like 4, 88, 92, and 61. After X, the max changes to X + (1/2)X. That seems to work well enough for higher numbers, but they don't come up that often anyway, and I wasn't entirely sure I wanted the quiz to be hard, per se. There are, however, basic checks against division (and modulo!*) by zero, and when the answer is negative, all possible answers are made negative so that nothing is obviously not that answer. Now that I think of it, I could have some additional code that gives a chance of one or both operands being negative. That would create some interesting problems. I also intend to add statistics (time taken per answer, percentage correct, etc.) *coding this taught me that Z % 0 in Java throws the division by zero exception, which makes sense but wasn't something I had ever thought of.
|
# ? Mar 18, 2014 17:43 |
|
Literally Elvis posted:They're not very smart. To be tricker, you could weight answers to be mostly even if the answer is even and mostly odd if the answer is odd. If 5 is an operand, the answers should all end in 0 or 5. Basically code in the math tricks to make the answers more than just a process of elimination.
|
# ? Mar 18, 2014 18:10 |
|
kayakyakr posted:If 5 is an operand, the answers should all end in 0 or 5. Why would this make it harder? 5 + 2 = 7, which does not end in either 0 or 5. That is only true for multiplication.
|
# ? Mar 18, 2014 21:39 |
|
A bit of rework on the BeagleSNES front-end GUI to make its XML a bit more flexible and modular, and suddenly things like this start popping up: What? "GBA Title 1"? Yes.
|
# ? Mar 18, 2014 22:41 |
|
bgreman posted:Why would this make it harder? 5 + 2 = 7, which does not end in either 0 or 5. That is only true for multiplication. Sorry, I meant when 5 is an operand in multiplication.
|
# ? Mar 19, 2014 00:17 |
|
You can see it live over here, be sure to check out the rainbow one! Here is the Javascript source. Feel free to criticise it. Doing stuff in the browser is growing on me. I might change my mind once I attempt to tackle a project that is even marginally complicated though.
|
# ? Mar 19, 2014 14:42 |
|
Bruegels Fuckbooks posted:You have to be super careful when flinging terms like "object oriented" around with javascript - it has a lot of features that simulate those you'd find in an object oriented language, but the combination of dynamic typing, lack of "interface" construct and poor exception handling make it a poor choice for large scale projects. Stuff like Dart, Typescript and the Google Closure compiler make an attempt at mitigating these issues, but the language inherently is weak for OOP. What? Prototype based programming IS object oriented programming, and a lack of exceptions/static typing/interfaces doesn't change that (though I agree that it does make large projects harder). I think prototypical inheritance is kinda neat. It has a certain endearing simplicity (I guess by virtue of eliminating the distinction between class and object) and allows some "cool" things to be done, particularly when combined with dynamic typing. Its main obstacle is organization of objects and code using the objects - there was some research started on this in the 90s but no one really cared and it stopped.
|
# ? Mar 19, 2014 20:33 |
|
|
# ? May 18, 2024 03:22 |
|
Let me explain to you how there is one true programming language/style/purpose/need and all others are wrong and evil. I wish my work had pretty screenshots to it yet, instead merging data doesn't really make for pretty pics.
|
# ? Mar 19, 2014 20:49 |