• What Are You Working On? April 2015
    1,741 replies, posted
[QUOTE=Ac!dL3ak;47433436]Ug, fucking Antelope: [t]http://i.imgur.com/Ir1KXjI.png[/t] right is the source file, left is the generated files.[/QUOTE] It's a parser generator! It generates easy-to-use parsers relatively simplely: [code] %generator "null" %require "~> 0.3" %terminal NUMBER %terminal IDENTIFIER %terminal PLUS "+" %terminal MINUS "-" %terminal MULTIPLY "*" %terminal DIVIDE "/" %terminal EXPONENTIATE "^" %terminal EQUALS "=" %right EXPONENTIATE %left MULTIPLY DIVIDE %left ADD SUBTRACT %% expression: expression PLUS expression | expression MINUS expression | expression DIVIDE expression | expression MULTIPLY expression | NUMBER | IDENTIFIER | IDENTIFIER EQUALS expression %% [/code] Handles all basic maths.
[url=https://scrap.tf]April Fools[/url] day [url=https://scrap.tf/announcement/399]pranks[/url] are [url=https://scrap.tf/forum/12]fun[/url]
[QUOTE=geel9;47433619][url=https://scrap.tf]April Fools[/url] day [url=https://scrap.tf/announcement/399]pranks[/url] are [url=https://scrap.tf/forum/12]fun[/url][/QUOTE] Nice.. [t]http://i.imgur.com/t52N428.png[/t]
So I'm pretty new to programming and I've been working on a simple game using Python and Pygame. I'm having trouble getting the camera to follow my player. I'm using the following guide: [URL]http://stackoverflow.com/questions/14354171/add-scrolling-to-a-platformer-in-pygame[/URL] The particular section I'm having trouble with is the complex_camera function. [code]def complex_camera(camera, target_rect): l, t, _, _ = target_rect _, _, w, h = camera l, t, _, _ = -l+(display_width * .5), -t+(display_height * .5), w, h l = min(0, 1) l = max(-(camera.width-display_width), l) t = max(-(camera.height-display_height), t) t = min(0, t) return Rect(l, t, w, h)[/code] I keep getting this: [code]line 64, in complex_camera l, t, _, _ = target_rect TypeError: 'int' object is not iterable[/code] The only difference between my method and the one posted on stackoverflow is that I'm not using target.rect in the camera.update function, but rather declaring the variable manually.
Update finally released [url=https://play.google.com/store/apps/details?id=com.app.bassdrive]for my Android app[/url] Can some of you test it and see if it works? Thanks! And yes, I'm aware it looks like complete butt-hole and doesn't look like the screenshots at all. I'm in the process of redoing it.
[QUOTE=Tamschi;47433572]I had typed out a long and passionate post but then my browser crashed and I don't have Lazarus installed yet so here's the gist: - From a software design standpoint half of the stuff on those websites is superficial crap. - Most of the other half is subpar compared to an Ikea shelf with half the boards missing. - The reason for that are their extremely low utility value (in terms of convenience) and information accessibility. - Your work is usually an exception, but [I]if[/I] you fail at something it's usually utility too (the aspect ratio/resolution box order debate, your website doesn't work whatsoever without JS, Vertex Adbenture...). - Works can appeal to many people even if some of their parts are (extremely) subpar (Twilight, Touhou, When They Cry, GMod...) as long as they get some basic timeless appeal right. - Truly great works [URL="http://gdcvault.com/play/1022031/GuiltyGearXrd-s-Art-Style-The"]combine utilitarian design decisions with artistic ability[/URL] to create [URL="https://www.youtube.com/watch?v=xUXpM-ag7c0"]their own style that's both beautiful and independent of trends[/URL], and [URL="https://www.youtube.com/watch?v=doaQC-S8de8"]this has been the case[/URL] (<- at least I've heard of a few of these films and I know practically nothing about cinema) [URL="http://sciencenetlinks.com/science-news/science-updates/mona-lisas-smile/"]for a long time[/URL] (art spoilers?) [URL="https://en.wikipedia.org/wiki/The_Magic_Flute"]in any medium[/URL] (I don't have an analysis handy, so you'll just have to trust me that there's [I]a ton[/I] of stuff that's not just or not at all aesthetically pleasing in there). [editline]1st April 2015[/editline] Last time I was in the highlights it was with a code snippet too (but for an entirely different reason...)[/QUOTE] I 110% sympathize with you, but hear me out: people at dribbble, Behance, Tavern, etc. are lacking in overall application design. These are works that come from people that do not completely understand usability, or functionality, or the integration and implementation thereof. It's all smoke, mirrors, and 31 flavors of weather apps all around. But that's exactly what people in this thread need. You guys all (for the most part) already know how to write software with rich features and meaningful functionality. But my God when someone posts an interface in here and I look at the typeface selection it makes me think I stepped into whatever the Internet equivalent of South <insert your hometown here> is. I question whether or not the rims on my web browser will be stolen, and quickly hide my Starbucks and put away my designer sunglasses so none of the residence will know I'm from North <insert your hometown here>. I scroll as quickly down the thread as possible and then resume drinking my Double Ristretto Venti Half-Soy Nonfat Decaf Organic Chocolate Brownie Iced Vanilla Double-Shot Gingerbread Frappuccino Extra Hot With Foam Whipped Cream Upside Down Double Blended, One Sweet'N Low and One Nutrasweet, and Ice and think to myself: [quote]Wow, it wouldn't take a day to choose a typeface for that interface if you knew a thing or two about typography.[/quote] But I digress. The real point is that if you already know software, you have to branch out. Enough suckers can write software. There aren't a lot of people who can design on top of it, and you're in a much better place if you're a developer who wants to be a designer, too, than if you're a designer and want to write code to make your visions come to life. So take that time to observe other people's work, step outside of your comfort zone, breathe in the whitespace. Take in the elegant usage of subtle gradients and catching hues. Feel the way the glyphs of that Avenir weight choice fit the UI in a way that make you [i]want[/i] to click buttons and [i]want[/i] to mouse over one more time because you're not sure if you just saw that button transition beautifully or you were under hypnosis from the rest of the layout you were eyeballing. You can learn a lot from these designer folks who are obsessed with creating [url=http://visualidiot.com/articles/weather-app]YAWA (yet another weather app).[/url] I mean, heaven forbid you grow more as a developer. ;)
[QUOTE=Ott;47432640][/QUOTE] Oh my god I made the highlights I'm gonna cry <3 [editline]31st March 2015[/editline] [QUOTE=BackwardSpy;47433230]But... my OP? :( Oh well, there's always next month I guess.[/QUOTE] The sacrifices your hand made was in vain, I am so sorry. [editline]31st March 2015[/editline] [QUOTE=sarge997;47433012]Oh gosh, Washed Ashore is highlighted..[/QUOTE] Bookmarks... [img]http://i.imgur.com/EnAKaYS.png[/img] :(
[QUOTE=andrewmcwatters;47434471] So take that time to observe other people's work, step outside of your comfort zone, breathe in the whitespace. Take in the elegant usage of subtle gradients and catching hues. Feel the way the glyphs of that Avenir weight choice fit the UI in a way that make you [i]want[/i] to click buttons and [i]want[/i] to mouse over one more time because you're not sure if you just saw that button transition beautifully or you were under hypnosis from the rest of the layout you were eyeballing. [/QUOTE] This almost makes me feel bad because I realize how much time and effort people put into design but so frequently I'll be in a rush to glean information off the site or I'll be there purely because I know exactly what I want and so I wont appreciate the subtle parts of the design. I can't say I've ever stopped to examine the font of a site or taken a moment to appreciate a button. Kind of like a lorry driving straight over a landscaped roundabout rather than around it
That's perfectly fine, though. For the most part, you're just suppose to subconsciously associate quality with the software through the design. Everything else is for show. Hence the post^
[QUOTE=andrewmcwatters;47434471][...] But that's exactly what people in this thread need. You guys all (for the most part) already know how to write software with rich features and meaningful functionality. [...][/QUOTE] Fair enough. However it would be a lot more helpful if I had more resources unrolling this stuff from a theoretical point of view (like that Xrd talk does in part). When I look at those examples I can barely tell what's what (in part because they are very "noisy" in terms of what they portray, and in part because I'm absolutely not good at this stuff so I can't pick it apart well). Another issue is that I really don't have much talent for visual art, so it's one of those areas I don't automatically pick up just by being around it or trying to practise. Like with sport, a good book [I]about[/I] it would probably help me a lot more with these things. I've read some stuff about visual aspects of comics and watched some things about film, but those were also very on the utility/meta aspect which is the part I'm at least not terrible at anyway, so they weren't really much help... Actually, maybe I should get some "how to draw" books to fill in the missing pieces... or maybe I can watch art streams. That's probably actually a really great idea since I should be able to pick it up more easily when I see how the person doing it moves the brush/cursor. Thanks for pointing this out!
[QUOTE=helifreak;47433687]Nice.. [t]http://i.imgur.com/t52N428.png[/t][/QUOTE] That's intentional.
More shit on the game I was making. I'm enjoying this. [vid]http://a.pomf.se/uevunj.mp4[/vid]
Working on UI elements for my themebase again (C# Winform) [IMG]https://dl.dropboxusercontent.com/u/10798900/staging/store/push/2015-04-01_16-42-48.gif[/IMG] [IMG]https://dl.dropboxusercontent.com/u/10798900/staging/store/push/2015-04-01_16-44-36.png[/IMG]
I decided to revive an old project of mine, the [URL="https://github.com/TheBerkin/Stringes"]Stringes[/URL] library. It's a tool for getting useful data from substrings and writing lexers like this one: [code]using System; using System.Text.RegularExpressions; using Stringes; namespace LexerExample { class Program { // Lexer private static readonly Lexer<M> lexer = new Lexer<M> { {"+", M.Plus}, {"-", M.Minus}, {"*", M.Asterisk}, {"/", M.Slash}, {"^", M.Caret}, {"(", M.LeftParen}, {")", M.RightParen}, {new Regex(@"-?\d+(\.\d+)?"), M.Number}, {new Regex(@"\s+"), M.Whitespace} }.Ignore(M.Whitespace); // Token types enum M { Plus, Minus, Asterisk, Slash, Caret, LeftParen, RightParen, Number, Whitespace } static void Main(string[] args) { Console.Title = "Stringes Lexer Example"; var origText = "2 * 3 / (5 + 1) ^ 2"; Console.WriteLine("ORIGINAL:\n"); Console.WriteLine(origText); Console.WriteLine("\nTOKENS:\n"); foreach (var token in lexer.Tokenize(origText)) { Console.WriteLine(token); } Console.ReadKey(); } } } [/code] Output: [img]http://i.imgur.com/oH8V1Qt.png[/img] If you love tokenizing things as much as I do, feel free to give it a whirl and let me know what you think.
Do you guys think that informative coding-process posts are valuable in a thread like this? We all know that in the end, showing off a product is more interesting than what's behind the product. Unless it's some insane high-level coding or something.
[QUOTE=war_man333;47435550]Do you guys think that informative coding-process posts are valuable in a thread like this? We all know that in the end, showing off a product is more interesting than what's behind the product. Unless it's some insane high-level coding or something.[/QUOTE] yeah sounds fine to me, I don't see why not [editline]1st April 2015[/editline] i think it's actually great when people post the "behind the scenes" for their project
If I post something like that I would love to get criticism because I'm always unsure if I'm doing it the 'correct' way. People have told me 'just code something till it works' But sometimes you code stuff that isn't extensible at all, because you don't know how, you know? I think that hits hard on my personal projects, because I just quit when it becomes too spaghetti or too complicated to implement new things... so I carefully code things now. Or at least I try to.
The alpha version of Pushjet is almost done! I just have a few bugs to hammer out and then I'll release it. This will be the following, the language used is in brackets: - Android app (Java, pre-alpha [url=http://shodan.me]here[/url]) - Api (Python) - Websocket API (Golang) - UDP/TCP support (Golang, almost done just fighting with the demo libraries right now), with a demo C++/golang/C# library The "push" part of the application is fully modular and will allow you to write your own protocols and use custom stuff like socket.io if you want. [editline]asd[/editline] Some feedback on the current state of the app would be nice tho
[QUOTE=war_man333;47435640]If I post something like that I would love to get criticism because I'm always unsure if I'm doing it the 'correct' way. People have told me 'just code something till it works' But sometimes you code stuff that isn't extensible at all, because you don't know how, you know? I think that hits hard on my personal projects, because I just quit when it becomes too spaghetti or too complicated to implement new things... so I carefully code things now. Or at least I try to.[/QUOTE] Here are three tips that probably fix 95% of all OO spaghetti code. Avoid inheritance. Really. Situations where you can actually say something meaningful about every subnode in some hierarchy tree are extremely rare. Sometimes people say that the world is object-oriented but it really isn't. We just want it to be. Use interfaces instead of superclasses because they almost force you to write modular code. The less you know about the objects you're working with, the better. Try to have a linear order in your project. It means that you can sort your classes/interfaces in such a way that every class only knows about the ones before it, and not the ones after it. This prevents cycles and cycles are usually a bad thing. Lastly, use a component-based system. Try to encapsulate every behavior in such a way that you know exactly what properties an object must have to be able to perform it. Then make those properties inputs to your behavior (via an interface, for example). What you get is a chunk of code that you can stick to anything that has the correct outputs.
[img]http://puu.sh/gXCob/a08726d57e.png[/img] :D
I have a dissertation to write and I can never be bothered working, so I made a countdown utility that sits in the OS X status bar to panic me into working. My first time using Swift/Cocoa. [t]http://i.imgur.com/PDQb7VR.png[/t] [url]https://github.com/bbrks/osx-statusbar-countdown[/url]
[QUOTE=elevate;47433060]What are some good examples of Linux GUI?[/QUOTE] [url]http://en.wikipedia.org/wiki/Tu_quoque[/url]
[QUOTE=COBRAa;47436522][url]http://en.wikipedia.org/wiki/Tu_quoque[/url][/QUOTE] So what you're saying is there are no good UIs?
[QUOTE=andrewmcwatters;47434668]That's perfectly fine, though. For the most part, you're just suppose to subconsciously associate quality with the software through the design. Everything else is for show. Hence the post^[/QUOTE] Reiterating with gusto from my post yesterday: To give you an example of what I'm talking about, [url=http://www.andrewmcwatters.com/]the front page of my website[/url] has over a dozen individual transitions that occur within a fraction of a second, and they all collectively work together to create an overall flow and feeling. I guarantee you won't even notice a good fraction of them. That's intentional. The level of detail I put into some works, mostly commercial ones, is at an overload level. Most people don't need that, though. I tell you that to give you perspective. I didn't do that work so you could refresh the page a dozen times to see every individual transform, transition, and ease approach. I did that, and most designers do that sort of thing, to make you think to yourself, even if subconsciously, that there is an exceedingly great attention to detail being applied that informs you of the level of expertise being engrained into my work. That site was a gateway for me to work with very large clients. You know what looks good, even if you can't recreate it. Anyone can associate style with quality. Once you start getting into more elaborate design circles, it becomes fuzzy, but you can always quickly associate what is perceived as effort put into a work, or deferred effort that focuses on functionality.
I have something to confess: I feel as if i threw away the last ~11 years of my life by playing games whenever i had free time, instead of doing something useful :( [url]http://facepunch.com/showthread.php?t=1458764[/url] ^ They are like 13, barely know any basic english grammar, but know how to mod the fuck out of battlefield, and i'm just sitting here, turning 25 this year, happy that i *finally* got an apprenticeship as an IT-specialist. ughh. All my C++ programs have been shitty console applications so far... I wish i could find the motivation to *learn* C++ and reverse engineering, instead of just messing around a few minutes here and there whenever i feel like it :( I'm so jealous of everyone in this thread :C
[QUOTE=andrewmcwatters;47437317]Reiterating with gusto from my post yesterday: To give you an example of what I'm talking about, [URL="http://www.andrewmcwatters.com/"]the front page of my website[/URL] has over a dozen individual transitions that occur within a fraction of a second, and they all collectively work together to create an overall flow and feeling. I guarantee you won't even notice a good fraction of them. That's intentional. The level of detail I put into some works, mostly commercial ones, is at an overload level. Most people don't need that, though. I tell you that to give you perspective. I didn't do that work so you could refresh the page a dozen times to see every individual transform, transition, and ease approach. I did that, and most designers do that sort of thing, to make you think to yourself, even if subconsciously, that there is an exceedingly great attention to detail being applied that informs you of the level of expertise being engrained into my work. That site was a gateway for me to work with very large clients. You know what looks good, even if you can't recreate it. Anyone can associate style with quality. Once you start getting into more elaborate design circles, it becomes fuzzy, but you can always quickly associate what is perceived as effort put into a work, or deferred effort that focuses on functionality.[/QUOTE] I liked the 5 second white to grid to website transition the best. Must have taken a lot of effort.
Not much programming on the game this time. Testing a few animation sequences for a next pet. This pet is actually father/mother and child at the same time, the texture might be wip. [vid]http://zippy.gfycat.com/BetterGrippingCanadagoose.webm[/vid]
[QUOTE=Philly c;47437619]I liked the 5 second white to grid to website transition the best. Must have taken a lot of effort.[/QUOTE] A lot of designers' sites ignore the advice of "decrease perceived load time." You end up being completely at the whim of race conditions when you want to perform elaborate introduction sequences otherwise. When you figure out how to simultaneously load all of the required assets needed to display those elaborate sequences, and display everything as soon as possible, please get back to me on that, along with 90%+ of designers' portfolios, and large companies you know and love who do the same for iconic product releases and their respective landing pages. [editline]1st April 2015[/editline] Imagine setting the stage of a play. If you want to make an introduction, would you rather see the staff put together the scene's props in front of you piece by piece and and the actors stand there waiting for the staff to leave the stage, or would you rather have the curtains pulled back [i]after[/i] everything is set. Agencies take different approaches depending on what is more important to them.
[QUOTE=DrogenViech;47437610]I have something to confess: I feel as if i threw away the last ~11 years of my life by playing games whenever i had free time, instead of doing something useful :( [url]http://facepunch.com/showthread.php?t=1458764[/url] ^ They are like 13, barely know any basic english grammar, but know how to mod the fuck out of battlefield, and i'm just sitting here, turning 25 this year, happy that i *finally* got an apprenticeship as an IT-specialist. ughh. All my C++ programs have been shitty console applications so far... I wish i could find the motivation to *learn* C++ and reverse engineering, instead of just messing around a few minutes here and there whenever i feel like it :( I'm so jealous of everyone in this thread :C[/QUOTE] I don't really have anything to say other than the standard advice :( Personally I always find myself procrastinating. I do have one tip, though. Just write down a time log of what you get up to every day for a week. You don't have to plan anything, you don't need to start making a strict schedule, you just have to log. Here's a template spreadsheet I use to calculate how much time I've spend doing useful tasks, and how much time I've wasted either by procrastinating or by playing games or something: [url]https://docs.google.com/spreadsheets/d/1EHZn0oO4zshmEQJGiwKXDLtSjamiw_G8P2utAYYkQqk/edit?usp=sharing[/url] [IMG]https://dl.dropboxusercontent.com/u/10518681/Screenshots/2015-04-01_18-35-20.png[/IMG] [IMG]https://dl.dropboxusercontent.com/u/10518681/Screenshots/2015-04-01_18-34-07.png[/IMG] Personally, I find that I spend a lot of time wasted in the interim between tasks. Even playing a game is better than spending time in this 'interim' zone, because you're spending time doing something you like. This log acts as a prompt for me, since it makes me remember "Oh, I've just completed task X, what am I doing now? Oh, looks like I'm just browsing Facepunch...". It requires a bit of discipline, and it works best if you're honest and precise with your time logging, but it might just help give you an accurate insight into how you spend your time which could motivate you a little.
Question: How rare is super-linear speedup?
Sorry, you need to Log In to post a reply to this thread.