• What are you working on? January 2012
    3,401 replies, posted
[QUOTE=Yogurt;34088428]I want to write a little scripting language, but I don't know the best way to tokenize/parse such things. Also, I have no idea how the fuck a stack works.[/QUOTE] You can make some cool shit using lex and yacc (or bison) without worrying too much. They generate lexers and parsers, respectively, when you supply them with a set of rules (a grammar.)
[QUOTE=cody8295;34088218]Ryan, is your last name DallaValle?[/QUOTE] No, it's daniels
[QUOTE=foszor;34088488]I want to build a house, but I don't know how to read home design plans. Also, I have no idea what the fuck a nail is. I didn't say that to mock you... its exactly how I feel whenever I have one of those "I wanna make a ...." ideas. I can never just make it, I have to learn eleventy new things before I can even start. By the time I learn everything I'm burnt out on the original idea.[/QUOTE] My post was more of an "Explain this shit to me please" post.
[QUOTE=Topgamer7;34088061]Heres what I found, not sure if its what you want. [url]https://developer.valvesoftware.com/wiki/Save_Game_Files[/url][/QUOTE] I've already stated that the valve wiki doesn't have what I need. Plus that doesn't describe the format, just how to use it in the engine.
[QUOTE=Yogurt;34088550]My post was more of an "Explain this shit to me please" post.[/QUOTE] A stack is just a data structure where whatever you add last comes off first: So say I have a stack of integers, to add something i would push it on the stack, to remove something I would pop it. [code] stack int_stack; push(int_stack, 3); Now, int_stack has one element: 3 push(int_stack, 4); Now it looks like: 4 3 int result; result = pop(int_stack); Popping it takes the top element off, so result == 4. result = pop(int_stack); Now result == 3 and the stack is empty. [/code] In terms of implementation, in C I've used a linked list where each member is a struct with form [code]struct stack_member { int data; struct stack_member *next; }; [/code] I also have a master STACK struct that keeps track of the "head" or the first element - which, because each member points to the next, and more importantly because a stack is usually only operated on through pushing and popping on and off the top, is all you really need. [code] struct STACK { struct stack_member *head; int len; }; [/code] For pushing, I malloc() a pointer to a stack member struct, set its data value equal to the value that was supplied to the push function, set its next pointer to the old head of the master STACK, and set the master STACK struct's head pointer to point to the newly allocated member. Thus, it has replaced the old head at the top of the stack. For popping, I copy the old head of the stack and set the head pointer of the master STACK to the next pointer member of the old head, so that the new head is the next stack element. I copy the old stack head's value, because you're going to be returning that, and then I free the old stack head and return the value. Thus the old stack head has been removed, the new stack head is now the previous second stack element, and the data of the popped stack element has been returned. This is how I've done it, it might not be a good way at all, but I hope this helps.
But he'd probably use C# so it wouldn't be that complicated. But it is useful.
[QUOTE=foszor;34088488]I want to build a house, but I don't know how to read home design plans. Also, I have no idea what the fuck a nail is. I didn't say that to mock you... its exactly how I feel whenever I have one of those "I wanna make a ...." ideas. I can never just make it, I have to learn eleventy new things before I can even start. By the time I learn everything I'm burnt out on the original idea.[/QUOTE] The magic of determination!
Probably late but oh google (android stuff) [img]http://dl.dropbox.com/u/11517902/google.png[/img]
[QUOTE=thisBrad;34088396]Building a Zilog Z80 computer on a breadboard. Fucking 16 bit wide address buses use all my wire :( [IMG]http://img42.imageshack.us/img42/5873/screenshot2012010621244.png[/IMG] Gunna write some assembly soon and write it to the ROM to start testing. Although its going to be hard with no output yet (I have to test the data and address lines manually :()[/QUOTE] That's a nice breadboard :o I do stuff like that in class everyday.
[QUOTE=benji2015;34087050][img]http://puu.sh/cDSt[/img][/QUOTE] Can you edit the world, like place and remove blocks?
[QUOTE=CmdrMatthew;34089443]Can you edit the world, like place and remove blocks?[/QUOTE] Yeah. Well, right now I just remove blocks in a certain area around the player. I'll add regular removing/placing later. Also I'm temporarily ditching the new meshes. They're making things a lot more difficult.
[QUOTE=synthiac;34090066][IMG]http://i.imgur.com/7dOsq.png[/IMG][/QUOTE] That looks good. Whatever it is. Maybe add a window title?
[vid]http://anyhub.net/file/30tz-termular.webm[/vid]
[QUOTE=Yogurt;34084353]Squid, [img]http://i.imgur.com/J5qYw.png[/img] That green line looks like x + 2, not x + 1...[/QUOTE] The grid size is dynamic so that the lines don't get too spread out or packed in - in that shot, the squares are actually 1/2 a unit apart each, because it's slightly zoomed in :) [editline]7th January 2012[/editline] Check the drawn area coords, bottom left, if you don't believe me ;)
[QUOTE=r0b0tsquid;34090805]The grid size is dynamic so that the lines don't get too spread out or packed in - in that shot, the squares are actually 1/2 a unit apart each, because it's slightly zoomed in :) [editline]7th January 2012[/editline] Check the drawn area coords, bottom left, if you don't believe me ;)[/QUOTE] It might be a good idea to draw the integer grid lines bolder than the fractional ones to make that obvious!
[QUOTE=HeroicPillow;34084501]And doesn't the top function equate to this? [code]y = sqrt(x^2 + y^2) y^2 = x^2 + y^2 0 = x^2 0 = x[/code] Yet you made it look like: y = abs(x)[/QUOTE] The function was meant to be sqrt(x^2 + z^2); I was meaning to show the same relations in 2d vs 3d mode, but it looks like I didn't replace the first screenshot when I saw the typo :S and yeah, you're right, it ought to be a vertical line. What you're seeing there is the result of an explicit plot - it varies the x value and plots the y, so the y value can't get taken into account. It should be plotted correctly as an implicit relation. Or, I could "fix" it by iterating the evaluation :v: I was also thinking of making explicit plots the default, it's fast enough now. [editline]7th January 2012[/editline] [QUOTE=Chris220;34090838]It might be a good idea to draw the integer grid lines bolder than the fractional ones to make that obvious![/QUOTE] Thanks, that's a good idea :) I was gonna just draw numbers all over it, but that seems a bit more elegant.
[QUOTE=r0b0tsquid;34090903]Thanks, that's a good idea :) I was gonna just draw numbers all over it, but that seems a bit more elegant.[/QUOTE] You could make it display the X/Y values of the current mouse position, snapped to the nearest gridline if it's under a certain distance away. That way there's no numbers spammed all over the graph but it's quick and easy to check a specific value.
[img]http://i.imgur.com/PRt9k.png[/img]
[QUOTE=Darwin226;34086172]You know, .NET can already load BMPs. I don't really see the point of the library. If it was just for the experience, it's impressive.[/QUOTE] It was just for the experience, since I have never before parsed something more complicated than INI files.
[QUOTE=icantread49;34085555]if you have something that needs to run every frame (like a spring), you'll be doing lookups quite often not really, in my experience it's quite clean. i suppose it really depends on the type of connections between your entities - in my case, ID's are pointless because objects connect through physical interactions you guys do bring up valid points, a solid ID system could be useful, but i just don't find it necessary in my current project. and it's certainly not worth the effort considering my current undo/redo system is perfectly fine in practice[/QUOTE] Wouldn't your spring maintain a connection to the physics object (by pointer) instead of the entity object? Seems like you should be re-thinking how those things work rather than designing the whole system around them.
[QUOTE=garry;34091301]Wouldn't your spring maintain a connection to the physics object (by pointer) instead of the entity object?[/QUOTE] So a spring game object should have pointers to physics bodies? What if one of those physics bodies is deleted it? Even if you're talking about a spring physics object (lower level than a game object), the same question applies: what if one of the bodies is destroyed? [editline]7th January 2012[/editline] We're really debating a non-existend issue here so I'm out, I'll revive this entity ID vs. pointer debate if I actually run into wall
-snip-
[QUOTE=amcfaggot;34085759]I'm impressed. Is it maintained in git? Have you considered using SVN?[/QUOTE] Mercurial is better! [URL="https://bitbucket.org/simssi/libbmpsharp/overview"]https://bitbucket.org/simssi/libbmpsharp/overview[/URL]
We used to have 5+ page arguments about how one person used this VCS and thought it was better than that VCS, and anybody who used a different one was sadly misguided. I'd rather not see that happen again... :S Anyway, on my way back now. Feeling pretty tired, but I'll get working on those suggestions once I'm back. Thanks guys :) [editline]7th January 2012[/editline] As in, instead of "Mercurial's better!", say "I prefer Mercurial because of..." and let them make their own mind up :)
except that was clearly a joke
I thought amcfaggot was joking, wasn't sure about that piggy bank guy. He sort of missed the window of opportunity for the joke, so I'd assumed he must be serious :v: never mind, I'm back now, so on with the project!
[QUOTE=icantread49;34091573]So a spring game object should have pointers to physics bodies? What if one of those physics bodies is deleted it? Even if you're talking about a spring physics object (lower level than a game object), the same question applies: what if one of the bodies is destroyed? [editline]7th January 2012[/editline] We're really debating a non-existend issue here so I'm out, I'll revive this entity ID vs. pointer debate if I actually run into wall[/QUOTE] I would have entities using lookup by name. Then I would have the spring entity be attached by other entities by name. Then when it's all created I'd attach the physics objects by pointer. If one of the objects gets deleted I'd send a message to the spring physics object to detach it. Any messages coming from the entity would still do the entity lookup (activate, deactivate etc).
[QUOTE=r0b0tsquid;34092154]We used to have 5+ page arguments about how one person used this VCS and thought it was better than that VCS, and anybody who used a different one was sadly misguided. I'd rather not see that happen again... :S Anyway, on my way back now. Feeling pretty tired, but I'll get working on those suggestions once I'm back. Thanks guys :) [editline]7th January 2012[/editline] As in, instead of "Mercurial's better!", say "I prefer Mercurial because of..." and let them make their own mind up :)[/QUOTE] Honesly, in the last year or so every time someone mentions Git vs SVN people go "No no no, don't start that again!" I don't think there's anyone left willing to argue something as unimportant as that.
r0b0tsquid can you make this on your program and show it [code] x^2 + y^2 = n //replace n with a number like 1,2,3 [/code]
[QUOTE=bobiniki;34092738]r0b0tsquid can you make this on your program and show it [code] x^2 + y^2 = n //replace n with a number like 1,2,3 [/code][/QUOTE] Already showed circles.
Sorry, you need to Log In to post a reply to this thread.