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;
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;
#define bad new
/* maybe you're just a */ bad Coder();
So are people agreeing to the first sentence or the second?
Okay, working on Text-Based User Interface, so far I've got buttons
Also nothing moves and there's no parenting
seriously. people just say it to say it;
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?
Made this a long time ago. The code is ugly and slow.
nostalgia
Edited:
I wonder if I still have any of my old freepascal crap anywhere
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
and uh why do you need libvgmstream for this?
unless you mean adpcm then well okay
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?
use types like int32_t, int64_t
Determine size on the C# side, should have clarified that.
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...)
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
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.
Post #377
Yeah, its mostly for adpcm, as well as the ability to decode all the other game audio formats.
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:
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.
I was going to do it so it loaded multiple images for animation instead, but that seemed like more effort for some reason.
![]()
![]()
Edited:
This will prove itself to be useful
PM me before you do sometehing dangerous. I know CMake.
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 :|
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.
It does kind of bother me that there isn't anything in the first index, but the assignment specifically said to leave it empty.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; } }
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.
Why don't we have both?
I think I stumbled upon something I shouldn't have
Edited:
Some actual progress on le menu
The exit button actually works!
Edited:
The terminal is 80x30 characters right now, I can't shake the feel that the characters are a bit too tall![]()
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 :(
It's funny because gesture recognition is built into the iOS API and it is super simple to implement.
Native code woo!
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.
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;
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)
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.
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).
Read the ToS:
You can register as an "attendee" and follow the lectures without participating in the coursework.
Works great on Windows 8
![]()
So I am working on a two-player text-based fighting game in Java. It's a rewrite of some of my old code, which was a terrible exercise in object-oriented programming (even if it was kind of fun to play).
The basic concept is simple: you give your character a name, a race, a weapon, an armor type, and a consumable item, then you take turns fighting each other and see who runs out of health the soonest.
Most of the shit in this thread flies right over my head but rest assured you're inspiring, WAYWO.
Oh yeah, the presentation is written in Javascript and running on Twostroke as well ;)
Edited:
automerge fuck
You can use tcl scripts using cmake's execute_process or add_custom_command.
Looks awesome.
How exactly are you going from AST to bytecode?
recursing down the AST: https://github.com/charliesome/twost...piler/tsasm.rb
So if I have to compile an AST like this:
I'd send that node to a method that compiles 'Add' nodes. That method would then send both of its child nodes to the method that compiles them, and so forth. Basically you're doing a DFS over the AST.Code:Add: Number: 1 Multiply: Number: 2 Number: 3
Pseudo-code:
In the end, you would get something like this:Code:compile_node(node): if node is Add: compile_add(node) else if node is Multiply: compile_multiply(node) else if node is Number: compile_number(node) compile_add(node): compile_node(node.left) compile_node(node.right) output "add" compile_multiply(node): compile_node(node.left) compile_node(node.right) output "mul" compile_number(node): output "push", node.number
Code:push 1 push 2 push 3 mul add
Might as well be writing my own build system at that point![]()
Nifty.