• What are you working on? February 2012
    3,497 replies, posted
  • Avatar of icantread49
  • [QUOTE=BlkDucky;34549157]programming-too-much alert[/QUOTE] does this really happen to people? i mean i've been programming for years and i've never found myself ending my sentences like this;
  • Avatar of Ortzinator
  • [QUOTE=icantread49;34551893]does this really happen to people? i mean i've been programming for years and i've never found myself ending my sentences like this;[/QUOTE] So are people agreeing to the first sentence or the second?
  • Avatar of ZenX2
  • Okay, working on Text-Based User Interface, so far I've got buttons Also nothing moves and there's no parenting
  • Avatar of efeX
  • [QUOTE=icantread49;34551893]does this really happen to people? i mean i've been programming for years and i've never found myself ending my sentences like this;[/QUOTE] seriously. people just say it to say it;
  • Avatar of ZenX2
  • I'm thinking of trying a new way of handling entities. Most of the time I just through them all in a table and tell them what index they're at, then iterate through it to do stuff. Any suggestions?
  • [QUOTE=ZenX2;34552964]Okay, working on Text-Based User Interface, so far I've got buttons Also nothing moves and there's no parenting[/QUOTE] [img]http://i.imgur.com/MlS7x.png[/img] Made this a long time ago. The code is ugly and slow.
  • Avatar of swift and shift
  • [QUOTE=Rohans;34553351][img]http://i.imgur.com/MlS7x.png[/img] Made this a long time ago. The code is ugly and slow.[/QUOTE] nostalgia [img]http://wiki.remobjects.com/w/images/e/e5/RO42_05.PNG[/img] [editline]5th February 2012[/editline] I wonder if I still have any of my old freepascal crap anywhere
  • Avatar of Octave
  • Just finished redoing my interpreted language's parser and interpreter, nothing impressive to show for it, but the benchmarks are getting better - 100000 fibonacci numbers in about 139 ms
  • [QUOTE=Bluefire;34551810]play the raw PCM files[/QUOTE] and uh why do you need libvgmstream for this? unless you mean adpcm then well okay
  • Avatar of robmaister12
  • Picking up work on my FreeType bindings again and testing on linux. Apparently POSIX uses 32 bit ints and 64 bit long/long long/pointers while Windows uses 32 bit int/longs and 64 bit long long/pointers. A lot of values in FreeType are longs and sizeof(long) is determined at compile time and not runtime... any ideas?
  • Avatar of robmaister12
  • [QUOTE=swift and shift;34553589]use types like int32_t, int64_t[/QUOTE] Determine size on the C# side, should have clarified that.
  • Avatar of Chandler
  • I'm running into so many problems with CMake, it's driving me up a wall. Anything beyond "grab these files and compile them" seems to take a huge number of additional functions and hand-crafted parsing within CMake's world. (I'm sorry for complaining about this shit, but I just spent an hour trying to get a basic regex parsing to work so I could force breakpoints into a file because CMake doesn't seem to be working with any breakpoints I insert for visual studio. I'm so sick of CMake's shit, I'm getting ready to start up my own build system again, so help me... :yarr:)
  • Avatar of Jimbomcb
  • rewriting - yet again - the tf2 websockets spectator, except better. Have the 'master server' pretty much done and supporting feeds from multiple servers just need to finish up the websockets side and start on the browser side of the project
  • Avatar of robmaister12
  • [QUOTE=robmaister12;34553558]Picking up work on my FreeType bindings again and testing on linux. Apparently POSIX uses 32 bit ints and 64 bit long/long long/pointers while Windows uses 32 bit int/longs and 64 bit long long/pointers. A lot of values in FreeType are longs and sizeof(long) is determined at compile time and not runtime... any ideas?[/QUOTE] Turns out IntPtr.Size works, as the Windows binary I built was 32 bit - It probably won't work with a native 64bit binary but I'll test that later - what's important now is that I have it working on both Windows and Linux.
  • Avatar of Bluefire
  • [QUOTE=synthiac;34553552]and uh why do you need libvgmstream for this? unless you mean adpcm then well okay[/QUOTE] Yeah, its mostly for adpcm, as well as the ability to decode all the other game audio formats.
  • Avatar of NorthernGate
  • Was bored and set my Render component to easily animate sprite sheets. I haven't really got any images to show it off because making a gif for a flashing box seems like a lot of effort. But the code looks nice and simple: [csharp] var i = _test.Use<Render>(); i.IsAnimated = true; // The Render Component needs to have animations turned on, otherwise it'll just draw the whole texture i.Animation = 2; // You can set which animation is being played (Different animations are stored along the y-axis, while frames for each animation are stored on the x-axis) i.FramesPerSecond = 5.25f; // You can also change the rate of the animation by setting how many frames are displayed per second, I found this to be a bit more intuitive and productive than an arbitrary 'Speed' property. [/csharp] I was going to do it so it loaded multiple images for animation instead, but that seemed like more effort for some reason.
  • Avatar of ZenX2
  • [img]http://dl.dropbox.com/u/45554193/images/terminal%20images.png[/img] :v: :v: :v: [editline]4th February 2012[/editline] This will prove itself to be useful
  • Avatar of Jookia
  • [QUOTE=Chandler;34553620]I'm running into so many problems with CMake, it's driving me up a wall. Anything beyond "grab these files and compile them" seems to take a huge number of additional functions and hand-crafted parsing within CMake's world. (I'm sorry for complaining about this shit, but I just spent an hour trying to get a basic regex parsing to work so I could force breakpoints into a file because CMake doesn't seem to be working with any breakpoints I insert for visual studio. I'm so sick of CMake's shit, I'm getting ready to start up my own build system again, so help me... :yarr:)[/QUOTE] PM me before you do sometehing dangerous. I know CMake.
  • Avatar of Chandler
  • [QUOTE=Jookia;34554591]PM me before you do sometehing dangerous. I know CMake.[/QUOTE] It's not so much that I don't know CMake, but trying to do a lot of work in loops, which saves a bunch of time ends up taking a lot more time because I can't do shit that makes sense like set a scoped variable to a function to be called. Tcl lets you do this, which would make more sense given cmake's syntax :|
  • Avatar of SamPerson123
  • I've been getting back into programming after not making anything for a long time, mostly because of the class I'm taking. This was our first assignment worth mentioning. I thought it was interesting enough to post it here. [code] public class IndirectlyOrderedArray { private String[] a; private int[] k; private int size; public IndirectlyOrderedArray(int size) { this.size = size + 1; a = new String[this.size]; k = new int[this.size]; k[0] = -1; } public boolean insert(String node) { int dataLoc; for (dataLoc = 1; dataLoc < size && a[dataLoc] != null; dataLoc++); if (dataLoc == size) { return false; } for (int index = 0; index != -1; index = k[index]) { if (k[index] == -1 || a[k[index]].compareTo(node) > 0) { k[dataLoc] = k[index]; k[index] = dataLoc; a[dataLoc] = node; return true; } } return false; } public boolean delete(String node) { for (int index = 0; k[index] != -1; index = k[index]) { if (a[k[index]].equals(node)) { a[k[index]] = null; k[index] = k[k[index]]; return true; } } return false; } public String showOrdered() { String out = ""; for (int i = k[0]; i != -1; i = k[i]) { out += a[i] + " "; } return out; } public String showUnordered() { String out = ""; for (int i = 0; i < size; i++) { out += a[i] + " " + k[i] + "\n"; } return out; } } [/code] It does kind of bother me that there isn't anything in the first index, but the assignment specifically said to leave it empty. It's supposed to make it so that an array can stay in order without having to copy the contents around all of the time. Since the indices each point to the next element, it never has to change more than two to stay in order. This was much more fun than I thought it would be, I'm just glad to be programming again.
  • Avatar of Jookia
  • [QUOTE=Chandler;34554644]It's not so much that I don't know CMake, but trying to do a lot of work in loops, which saves a bunch of time ends up taking a lot more time because I can't do shit that makes sense like set a scoped variable to a function to be called. Tcl lets you do this, which would make more sense given cmake's syntax :|[/QUOTE] Why don't we have both?
  • Avatar of ZenX2
  • I think I stumbled upon something I shouldn't have [img]http://dl.dropbox.com/u/45554193/images/terminal%20oh%20noes.png[/img] [editline]5th February 2012[/editline] [img]http://dl.dropbox.com/u/45554193/images/terminal%20mainmenu1.png[/img] Some actual progress on le menu The exit button actually works! [editline]5th February 2012[/editline] The terminal is 80x30 characters right now, I can't shake the feel that the characters are a bit too tall :v:
  • Avatar of Electroholic
  • Holy shit gesture recognition is hard to program. I'm trying to make it so if the fingers are dragged together the camera pans but if they are pinched, it zooms. I thought it would be easy but I cant get it :(
  • Avatar of i300
  • [QUOTE=thisBrad;34554965]Holy shit gesture recognition is hard to program. I'm trying to make it so if the fingers are dragged together the camera pans but if they are pinched, it zooms. I thought it would be easy but I cant get it :([/QUOTE] It's funny because gesture recognition is built into the iOS API and it is super simple to implement. Native code woo!
  • Avatar of Lord Ned
  • [QUOTE=thisBrad;34554965]Holy shit gesture recognition is hard to program. I'm trying to make it so if the fingers are dragged together the camera pans but if they are pinched, it zooms. I thought it would be easy but I cant get it :([/QUOTE] Can you get both touch position as points? You could start by checking the x/y position of both points. If they've both increased 'significantly' on one axis from when both points were first registered, than it's a swipe. If they've increased on opposite axis' or the distance between them has shrunk 'significantly' from their start position, it's probably a scale.
  • Avatar of Electroholic
  • [QUOTE=Lord Ned;34555007]Can you get both touch position as points? You could start by checking the x/y position of both points. If they've both increased 'significantly' on one axis from when both points were first registered, than it's a swipe. If they've increased on opposite axis' or the distance between them has shrunk 'significantly' from their start position, it's probably a scale.[/QUOTE] The problem is, I'm completely shit at math so I don't know how to check if both fingers have moved in the same direction/distance within a tolerance level;
  • Avatar of Chandler
  • [QUOTE=Jookia;34554844]Why don't we have both?[/QUOTE] The developers of CMake said "oh we don't want to use tcl, it's bad" then wrote their own syntax. Obviously tcl makes a lot more sense for a command language (and has proper scopes :v:) I'm taking a look at that ninja build system though. It (or a modified fork of it) might actually be what I'm looking for.
  • Avatar of i300
  • [QUOTE=thisBrad;34555140]The problem is, I'm completely shit at math so I don't know how to check if both fingers have moved in the same direction/distance within a tolerance level;[/QUOTE] If both fingers' X increased, they're probably moving right. If both fingers' X decreased, left. Y Increase == Down, Y Decrease == Up. And so on. Pinching would be that one finger is moving diagonally down (x decrease, y increase) and one is moving diagonally up (x increase, y decrease).