• What are you working on? November 2011 Edition
    3,673 replies, posted
I wasn't sure where to post this, but I think this thread will do. I thought you might like it. I'm at work at the moment (coffee break time) and I've recently found a problem with a client's app that we are testing. Basically, it's an embedded application for their TV set-top-box, which finds local events via the internet (I have no idea if anybody actually wants this on their TV, but they're making it anyway). Some bright spark had the idea of being able to automatically find the general geographical area that the user is in, by checking which regional TV stations are available. Aside from the fact that it's a complex answer for a simple problem, they also had an assumption in their code: That if the box was tuned, then BBC 1 should be available and it could find which regional BBC 1 service it was receiving, giving them the transmission region. We were getting crashes when we used test streams that didn't have BBC channels, because it wasn't programmed for that eventuality, it literally dropped through a switch/case and died. I let them know about the problem and I've just got an email back: "... I apologize for the crash, we assumed that if BBC1 was unavailable then human civilization must have collapsed to the point where nobody would care if a small application stopped working. We didn't take missing transponders into consideration..." I'm going to print off that email and put it up on the notice board. Their reasoning is stupid, but having the balls to put it like that... The lesson here children, is to never assume you know what data will be input into your system. You'll end up looking like an idiot eventually. Also, don't try to be too clever, a lot of the time a simpler solution will be less problematic. That concludes lesson #1 of... well... programming generally. Make sure you know these two rules before you start working on any software, especially if you're being paid for it.
[QUOTE=Vampired;33149267][img]http://i.imgur.com/Q3MAe.png[/img] Hey guys, I made my first android game. Please download it and tell me what you think. Its a remake of the classic Pipes game where you connect up all the tiles to turn them all green [url=https://market.android.com/details?id=com.jakemadethis.source][img]http://i.imgur.com/NFoFf.png[/img] Android Market for 'Source'[/url][/QUOTE] Great game, love the way it solves it. :-)
[img]http://dl.dropbox.com/u/44437457/other/mario1.png[/img] Hatless mario! [img]http://dl.dropbox.com/u/44437457/other/mario2.png[/img] The origin is 0,0 My next post here WILL be content, I am sorry for not posting any in a while
[QUOTE=Deco Da Man;33198230]Matter of opinion.[/QUOTE] P sure most of us would agree that JSON is easier to read. Considering this is for mod-ability, he wants it as readable as possible for the most number of users. [I]~~Just saying~~[/I]
[QUOTE=h2ooooooo;33197622]I'd use JSON instead.. XML is so outdated [code]WeaponData: { Name: "Assault Rifle", Missile: "Bullet", RateOfFire: 0.2, Kickback: 2.5, Range: 100, Muzzle: { x: 0.8, y: 0, z: 0 }, BoxSize: { x: 0.95, y: 0.25, z: 0.125 }, SizeScale: 2, DamageMin: 5, DamageMax: 15, SoundPitchMin: 0.9, SoundPitchMax: 1.1 }[/code] 303 characters (JSON) vs. 477 characters (XML)[/QUOTE] Yes, JSON usually looks prettier, but it's not nearly as widely used/supported as XML and you can't get away without any XML when using the .NET framework (it's everywhere!). Saying it's outdated is really just ignorant as [url=http://xml.coverpages.org/xmlApplications.html]hundreds of XML-based languages have been developed ever since 1998[/url]. There are also alternative ways to describe the same information using XML and it [i]may[/i] even be shorter than the JSON equivalent: [code] <Muzzle> <x>0.8</x> <y>0</y> <z>0</z> </Muzzle> <Muzzle x="0.8" y="0" z="0"/> [/code] If size somehow becomes a problem, XML is well compressible. Then there's of course a whole lot of useful processing technologies for XML, like XPath and XSLT. I don't know whether anything like those exist for JSON. I wouldn't have said any of this half a year ago, but now I've completed some courses involving XML that shed some light on a lot of stuff.
[QUOTE=Spoco;33200758]Yes, JSON usually looks prettier, [B]but it's not nearly as widely used/supported as XML [/B]and you can't get away without any XML when using the .NET framework (it's everywhere!). Saying it's outdated is really just ignorant as [url=http://xml.coverpages.org/xmlApplications.html]hundreds of XML-based languages have been developed since 2009[/url]. There are also alternative ways to describe the same information using XML and it [i]may[/i] even be shorter than the JSON equivalent: [code] <Muzzle> <x>0.8</x> <y>0</y> <z>0</z> </Muzzle> <Muzzle x="0.8" y="0" z="0"/> [/code] If size somehow becomes a problem, XML is well compressible. Then there's of course a whole lot of useful processing technologies for XML, like XPath and XSLT. I don't know whether anything like those exist for JSON. I wouldn't have said any of this half a year ago, but now I've completed some courses involving XML that shed some light on a lot of stuff.[/QUOTE] Wait. How does this matter at all?
[QUOTE=BlkDucky;33200811]Wait. How does this matter at all?[/QUOTE] In this case it probably doesn't, but I wouldn't go through any trouble (like external dependencies) to use JSON instead of XML when developing for .NET framework, since XML is much better supported there.
[QUOTE=uitham;33200397][img]http://dl.dropbox.com/u/44437457/other/mario1.png[/img] Hatless mario! [img]http://dl.dropbox.com/u/44437457/other/mario2.png[/img] The origin is 0,0 My next post here WILL be content, I am sorry for not posting any in a while[/QUOTE] Mario is hatless by default now, Garb has already created the sprites for that (Don't have them here on my netbook, though)
[QUOTE=Spoco;33200891]In this case it probably doesn't, but I wouldn't go through any trouble (like external dependencies) to use JSON instead of XML when developing for .NET framework, since XML is much better supported there.[/QUOTE] I was going to reply saying that JSON is supported out of the box on .NET framework, but then I remembered that the implementation is pretty much total crap.
[QUOTE=Spoco;33200891]In this case it probably doesn't, but I wouldn't go through any trouble (like external dependencies) to use JSON instead of XML when developing for .NET framework, since XML is much better supported there.[/QUOTE]But .net has support for serializing JSON? [editline]9th November 2011[/editline] [QUOTE=DarKSunrise;33200932]I was going to reply saying that JSON is supported out of the box on .NET framework, but then I remembered that the implementation is pretty much total crap.[/QUOTE]Oh, is it?
I wanted to ask this in the games forum but they dont have a general chat thread. In a game, do you guys care if the settings is say in an settings window that allows you to change the settings then launches the actual game, or do you preffer the settings to be in their own options menu ingame? Ingame settings would look nicer, but the settings window would be easier. Considering that apart from resolution and window changes the user wouldnt need to reset the game. Can I get: [img]http://www.facepunch.com/fp/ratings/programming_king.png[/img] for ingame options menu [img]http://www.facepunch.com/fp/ratings/zing.png[/img] for external settings page/window
Launchers are pretty redundant in my opinion. It's not like you're going to change the settings every time you launch the game anyway.
[QUOTE=Richy19;33200944]I wanted to ask this in the games forum but they dont have a general chat thread. In a game, do you guys care if the settings is say in an settings window that allows you to change the settings then launches the actual game, or do you preffer the settings to be in their own options menu ingame? Ingame settings would look nicer, but the settings window would be easier. Considering that apart from resolution and window changes the user wouldnt need to reset the game. Can I get: [img]http://www.facepunch.com/fp/ratings/programming_king.png[/img] for ingame options menu [img]http://www.facepunch.com/fp/ratings/zing.png[/img] for external settings page/window[/QUOTE] You should be able to change settings outside either way in case you screw something up and the game is (for instance) set to an undisplayable resolution or something.
[QUOTE=BlkDucky;33200623]P sure most of us would agree that JSON is easier to read. Considering this is for mod-ability, he wants it as readable as possible for the most number of users. [I]~~Just saying~~[/I][/QUOTE] I entirely agree. If there was a vote, JSON would win. Hell, I would vote JSON; XML is an abomination in my opinion. I was just being picky with Jookia's attempt to quantify readability without basis.
[QUOTE=Parakon;33197082][media]http://www.youtube.com/watch?v=r0TSDKLdPQU[/media] I have no idea how this happened[/QUOTE] Keep it, the universe has spoken.
[QUOTE=Richy19;33200944]I wanted to ask this in the games forum but they dont have a general chat thread. In a game, do you guys care if the settings is say in an settings window that allows you to change the settings then launches the actual game, or do you preffer the settings to be in their own options menu ingame? Ingame settings would look nicer, but the settings window would be easier. Considering that apart from resolution and window changes the user wouldnt need to reset the game. Can I get: [img]http://www.facepunch.com/fp/ratings/programming_king.png[/img] for ingame options menu [img]http://www.facepunch.com/fp/ratings/zing.png[/img] for external settings page/window[/QUOTE] I'd say both. Usually on first start I adjust every setting to my liking. But I want to be able to change something in-game quickly, too.
[QUOTE=BlkDucky;33200983]You should be able to change settings outside either way in case you screw something up and the game is (for instance) set to an undisplayable resolution or something.[/QUOTE] Oh yea, all settings will be editable from a json file. Some more hardcore settings like FoV level or FPS limit which normal users wont usually change will be there, but I was thinking more of the general stuff
[QUOTE=Spoco;33200758]Yes, JSON usually looks prettier, but it's not nearly as widely used/supported as XML[/quote] What? Every single language I can think of has one / many JSON serializers. It even comes natively with JavaScript. [QUOTE=Spoco;33200758]Saying it's outdated is really just ignorant as [url=http://xml.coverpages.org/xmlApplications.html]hundreds of XML-based languages have been developed ever since 1998[/url]. [/quote] How is that relevant? The date on the top-right corner of that page is June 25, 2005. So you're saying that XML is not out-dated because an out-dated pages lists languages based off it that have been developed since [i]1998[/i]? [QUOTE=Spoco;33200758] There are also alternative ways to describe the same information using XML and it [i]may[/i] even be shorter than the JSON equivalent:[/QUOTE] That ambiguity is not a good thing. It makes for inconsistencies in XML format specifications and is hard to remember. [QUOTE=Spoco;33200758] If size somehow becomes a problem, XML is well compressible.[/QUOTE] [url=http://msgpack.org/]So is JSON.[/url] And to a fraction on the compression levels that XML can achieve. And why compress XML when you can just use JSON and it be smaller already? [QUOTE=Spoco;33200758] Then there's of course a whole lot of useful processing technologies for XML, like XPath and XSLT. I don't know whether anything like those exist for JSON.[/QUOTE] With JSON you don't use some unefficient node navigating scheme. You can navigate directly to the node you want by dot or array notation. Natively. If you need something more complex, [url=http://code.google.com/p/jsonpath/]the tools are there.[/url] [code] x.store.book[0].title //or x['store']['book'][0]['title'] [/code] Sorry about the rant, but I really feel like there should be no reason for anyone to still be using XML in 2011. It's annoying and slows down everyone who has to work with it.
I know this isn't the help thread, but does anyone have a good function for a sun's movement (or am I doing this one wrong?) [code] float width = Collisions.ScreenW; //time is 0 at sunrise and 1 at sunset float height = Collisions.ScreenH; Vector2 sunpos = new Vector2(time * width, height - height * (float)Math.Sin(time * width / MathHelper.TwoPi)); [/code] I took this one from the last WAYWO, and uh... it does not seem to work very well. [vid]http://dl.dropbox.com/u/8745051/facepunch/sexysun.webm[/vid]
Try [code] Vector2 sunpos = new Vector2(time * width, height - height * (float)Math.Sin(time / 20.0f * width / MathHelper.TwoPi)); [/code]
[quote][img]http://i.imgur.com/FjS8s.png[/img][/quote] Re-doing pathfinding completely, now I'm using a navigation mesh that's separate from the actual map.
[QUOTE=NovembrDobby;33201285]Try [code] Vector2 sunpos = new Vector2(time * width, height - height * (float)Math.Sin(time / 20.0f * width / MathHelper.TwoPi)); [/code][/QUOTE] Didn't work with 20.0f, but did with 65.0f! Needs some things fixed, but for now.. [vid]http://dl.dropbox.com/u/8745051/facepunch/yay.webm[/vid] Thank you [img]http://www.facepunch.com/fp/ratings/heart.png[/img]
WAYWO: My Opinions Are Fact Edition
[QUOTE=Felheart;33199517]are those 2d sprites or actual 3d models? what rendering engine ?[/QUOTE] Weapon is a 2D sprite on a 3D plane. Enemies are actual 3D models. Unity.
After playing around with MonoGame for a while, I've decided I will port [url=http://i3software.org/DigIt.php]Dig It[/url] to Mac OS X. I don't have any screenshots (yet), but it definitely will be coming out on the 11th. [editline]ad[/editline] I might port it to iOS and Android. I would have to change a lot of stuff, especially the UI.
New Zombie type called notendermen. :V: [img_thumb]http://i.imgur.com/bHa2o.png[/img_thumb] EDIT: Notendermen are actually just a simple mod (like YOU will be able to do), no extra coding was required from my part.
[QUOTE=Jack Trades;33201855]New Zombie type called notendermen. :V: [img_thumb]http://i.imgur.com/bHa2o.png[/img_thumb] EDIT: Notendermen are actually just a simple mod (like YOU will be able to do), no extra coding was required from my part.[/QUOTE] Can't wait to test this!
[QUOTE=Tortex;33202341]Can't wait to test this![/QUOTE] I usually release a testing build every Sunday but this weekend I'm going off somewhere special so I'll be putting out a new devlog, video and public build, tomorrow.
After reading up on Head-Related Transfer Functions, I've decided that 3D sound is just too much work for me. The solution? Just use OpenAL. With projects like OpenAL Soft and Rapture3D, I don't see OpenAL going away any time soon. Plus, I don't think I'll have $6,000 to spend on fmod. So the end goal is to get my class hierarchies correct so that I can use both OpenAL and libao as backends. Now, I'm working on a resource management system to manage data loaded from disk (sounds, models, textures, configuration files).
[QUOTE=i300;33201817]After playing around with MonoGame for a while, I've decided I will port [url=http://i3software.org/DigIt.php]Dig It[/url] to Mac OS X. I don't have any screenshots (yet), but it definitely will be coming out on the 11th. [editline]ad[/editline] I might port it to iOS and Android. I would have to change a lot of stuff, especially the UI.[/QUOTE] playing that game on a portable device would be great.
Sorry, you need to Log In to post a reply to this thread.