• What Are You Working On? V13
    5,003 replies, posted
Should I just start over on Left 4 Dead 1.5? I can't find this god damned memory leak. And maybe, just maybe, rewriting it might point out the leak.
In C#, does type-casting a double into an integer round or truncate? It would be a hell of a lot easier for me if it truncates.
[QUOTE=SamPerson123;25411634]In C#, does type-casting a double into an integer round or truncate? It would be a hell of a lot easier for me if it truncates.[/QUOTE] I don't use C#, but if it doesn't you can always convert (value-value%1), which will perform truncation anyway.
[QUOTE=SamPerson123;25411634]In C#, does type-casting a double into an integer round or truncate? It would be a hell of a lot easier for me if it truncates.[/QUOTE] C# truncates doubles when type-casting them.
[QUOTE=CarlBooth;25401482][img_thumb]http://i56.tinypic.com/2hz0m4g.png[/img_thumb][/QUOTE] Nice! How is this implemented by the way? Just an HTTP proxy, or are you hooking into Winsock as an LSP? The latter would be stupendously awesome.
[QUOTE=X'Trapolis;25413690]Nice! How is this implemented by the way? Just an HTTP proxy, or are you hooking into Winsock as an LSP? The latter would be stupendously awesome.[/QUOTE] New mini meme: The latter would be awesome Anyone have some good resources on: MD3/5, MDL and BSP?
[url=http://www.flipcode.com/archives/Quake_2_BSP_File_Format.shtml]Quake 2 BSP format[/url] [url=http://developer.valvesoftware.com/wiki/Source_BSP_File_Format]Source BSP format[/url] [url=http://en.wikipedia.org/wiki/BSP_%28file_format%29]BSP general info[/url] [url=http://en.wikipedia.org/wiki/Binary_space_partitioning]BSP concept[/url] [url=http://tfc.duke.free.fr/coding/mdl-specs-en.html]MDL file format[/url] [url=http://en.wikipedia.org/wiki/MD3_%28file_format%29]MD3 file format[/url] [url=http://www.modwiki.net/wiki/MD5MESH_%28file_format%29]MD5 file format[/url]
[url=http://www.mralligator.com/q3/]Quake 3 BSP format[/url] Also, IBSP is far superior to VBSP. Valve totally destroyed the format.
I have to slightly tweek my deobfuscator so much that I have decided to rewrite it as a plugin host with plugins that do the deobfuscating. Thing is, is there a nice way of writing plugins in C# that compile at runtime? I do not want to have to keep compiling them under the plugin host to find spelling mistakes :\.
For a mapping format do you think I should use Lua run in a special state or use a more complex format.
[QUOTE=Jallen;25404225]They go away after a while, awesome little critters. [url]http://en.wikipedia.org/wiki/Thrips[/url] If I remember correctly, they are common in Scandinavia, the US and the UK. I always get them in my monitor when it's stormy outside, I think it makes them more active. I know they are also known as storm bugs.[/QUOTE] I have one in my old monitor. It's dead. Right in the middle.
[QUOTE=VeryNiceGuy;25404142]It'd be neat if you got far enough on this that schools got interested in it and wanted to buy it. :v:[/QUOTE] It'd probably be pretty hard. The market is already saturated by student fascism software solutions that are far more powerful. But if he works on it for a few years maybe he can out-do them all. I want to do the same thing (be better and thus get bought) with a project of mine.
[QUOTE=Jookia;25404723]Does anybody have any advice on my problem? Basically, I have a reference counter that I PRESUMED has been working properly for the past decade, but behold, it doesn't. [code] bool drop(void) { references--; if(references == 0) { delete this; return true; } return false; }[/code] It works fine, but it's in a class and 'delete this;' doesn't delete the object. I can call drop() again and since references is an unsigned char, it resets to 255 and all is well. Can anybody tell me why it doesn't delete itself?[/QUOTE] Deleting simply means freeing the memory, not overriding with zeros or something. The object can still be existant, it's just dangerous to mess with it, as a new object could have been allocated there now. You should throw an exception or assert upon underflow. Also, std::tr1::shared_ptr. [QUOTE=Chandler;25405307]Also, a feature that my build system hasn't had up until now was build targets (i.e. debug, release, clean, etc.). But now, when creating your project, you'll do something like [code] my_project = Project('name', 'target1', 'target2', 'target3') my_project.target1.cflags('Wall') [/code][/QUOTE] Can you also have something like [code]my_project.alltargets.cflags('Wall')[/code]? And possibly some compiler independant flags, such as [code]my_project.release.cflags.optimize = optimize_speed[/code] Are targets assignable? So you could do something like [code]somelib_template_target = Target() somelib_template_target.cflags('Isomedir', 'DSOMETHING) somelib_template_target.ldflags('lsomelib') my_project.sometarget = template_target my_project.someothertarget = template_target[/code] And can you group a bunch of targets into one? Like having the group unittests, with the subgroups filesystem and vector, so you could do [code]bit unittests ;builds all unittests bit unittests.filesystem ;builds only the filesystem unittest[/code] Sorry if I used invalid syntax and/or I'm asking stuff that is obvious if one has already used your build system. I have not yet done so :ohdear: Though I have plans to :) Also, there is no decent way to reply to multiple posts, apart from multi-posting and hoping that noone will break ones automerge :(
[QUOTE=ZeekyHBomb;25417479] Also, there is no decent way to reply to multiple posts, apart from multi-posting and hoping that noone will break ones automerge :([/QUOTE] I just middle-click 'Reply' on everyone I want to reply to, write the response, then cut-paste-ctrl-W it all together.
[QUOTE=gparent;25417586]I just middle-click 'Reply' on everyone I want to reply to, write the response, then cut-paste-ctrl-W it all together.[/QUOTE] That's what I used to do, but Chromium won't open a new tab for some reason since the forum updated :'(
[QUOTE=gparent;25417586]I just middle-click 'Reply' on everyone I want to reply to, write the response, then cut-paste-ctrl-W it all together.[/QUOTE] Yeah doesn't work anymore in chrome :(
[QUOTE=r4nk_;25417675]Yeah doesn't work anymore in chrome :([/QUOTE] Works for me, Chrome 8, developer channel.
Ah. I use Firefox 4.0 Beta 6 so I wouldn't know, sorry.
[QUOTE=raBBish;25417734]Works for me, Chrome 8, developer channel.[/QUOTE] What the hell, I'm using chrome 6.0. The chrome download page doesn't say what the latest stable release version is :\
[QUOTE=The Inzuki;25411559]Should I just start over on Left 4 Dead 1.5? I can't find this god damned memory leak. And maybe, just maybe, rewriting it might point out the leak.[/QUOTE] Why dont you put the code file thats dong it on here see if anyone else can find it? (unless you dont know where in the program the bad code is, more or less :/ )
[QUOTE=Overv;25414142][url=http://www.flipcode.com/archives/Quake_2_BSP_File_Format.shtml]Quake 2 BSP format[/url] [url=http://developer.valvesoftware.com/wiki/Source_BSP_File_Format]Source BSP format[/url] [url=http://en.wikipedia.org/wiki/BSP_%28file_format%29]BSP general info[/url] [url=http://en.wikipedia.org/wiki/Binary_space_partitioning]BSP concept[/url] [url=http://tfc.duke.free.fr/coding/mdl-specs-en.html]MDL file format[/url] [url=http://en.wikipedia.org/wiki/MD3_%28file_format%29]MD3 file format[/url] [url=http://www.modwiki.net/wiki/MD5MESH_%28file_format%29]MD5 file format[/url][/QUOTE] Thanks.
[QUOTE=X'Trapolis;25413690]Nice! How is this implemented by the way? Just an HTTP proxy, or are you hooking into Winsock as an LSP? The latter would be stupendously awesome.[/QUOTE] It's a really shit pass through proxy and has no support for HTTPS because the certificate chain fails. I'm assuming I'd have to generate my own certificates on the fly for each domain to support HTTPS, which is shit. I'll look in to LSP because it sounds like a good solution.
[img]http://img219.imageshack.us/img219/6246/protobullet.jpg[/img] Currently am working on collision, which is a bitch to be honest. What you see on the screen are 250 "bullets", and the white circle on the top left corner is the player. Currently with this amount of bullets I'm having 47FPS on a Q9450 @ 2.66GHz, note that this application is single threaded. Also note that the current code does yet have collision detection for the triangles and possible rotating rectangles, only static ones. [code] // Collision detection switch (iter->GetShape()) { case Bullet::Shape::Circle: if ( sqrt(pow(((bullet_pos.x - player_pos.x)), 2)) <= (bullet_size / 2.0f + player_radius) && sqrt(pow((bullet_pos.y - player_pos.y), 2)) <= (bullet_size / 2.0f + player_radius)) { m_gameState.gameOver = true; } break; case Bullet::Shape::Rectangle: if ( bullet_pos.x <= player_pos.x + player_radius && bullet_pos.x + bullet_size >= player_pos.x - player_radius && bullet_pos.y <= player_pos.y + player_radius && bullet_pos.y + bullet_size >= player_pos.y - player_radius) { m_gameState.gameOver = true; } break; case Bullet::Shape::Triangle: // Placeholder CPU calculations for estemation of grand total FPS when done if ( bullet_pos.x <= player_pos.x + player_radius && bullet_pos.x + bullet_size >= player_pos.x - player_radius && bullet_pos.y <= player_pos.y + player_radius && bullet_pos.y + bullet_size >= player_pos.y - player_radius) { m_gameState.gameOver = true; } break; }[/code] Almighty mathpunch, is there a way the optimise this some more before making this multi-threaded?
Are you going through each entity? If so, quad- or kd-trees. And for the circle-type check, just square the right hand operant instead of taking the squareroot of the left hand operant.
What would be the best method of collision detection with tiles in AS2? hitTest with a for-loop doesn't suffice with 100+ tiles.
[QUOTE=Giraffen93;25420049]What would be the best method of collision detection with tiles in AS2? hitTest with a for-loop doesn't suffice with 100+ tiles.[/QUOTE] [QUOTE=ZeekyHBomb;25419937]Are you going through each entity? If so, quad- or kd-trees.[/QUOTE] Same applies.
[QUOTE=ZeekyHBomb;25419937]Are you going through each entity? If so, quad- or kd-trees. And for the circle-type check, just square the right hand operant instead of taking the squareroot of the left hand operant.[/QUOTE] I have a std::list<Bullet>, and any bullet can be at a random location, so I really do have to check it's location for each bullet. I fail too see how a *-tree would benefit me. Forgive me for my possible ignorance. Also, why would I want to square the left operand? The reason I squareroot the left operhand is to get the absolute difference of the two different coordinations.
[QUOTE=ZeekyHBomb;25420168]Same applies.[/QUOTE] Oh snap, didn't notice. But i have no idea what you mean.
[QUOTE=Shammah;25420192]I have a std::list<Bullet>, and any bullet can be at a random location, so I really do have to check it's location for each bullet. I fail too see how a *-tree would benefit me. Forgive me for my possible ignorance.[/QUOTE] The tree-structures order the objects by their position, making an easy and fast selection of fewer candidates possible. [QUOTE=Shammah;25420192]Also, why would I want to square the left operand? The reason I squareroot the left operhand is to get the absolute difference of the two different coordinations.[/QUOTE] No, quare the right, not left operant. sqrt(x) <= y is equal to x <= y² though the latter will most probably be faster. [QUOTE=Giraffen93;25420221]Oh snap, didn't notice. But i have no idea what you mean.[/QUOTE] Google them.
[QUOTE=ZeekyHBomb;25420275]The tree-structures order the objects by their position, making an easy and fast selection of fewer candidates possible. No, quare the right, not left operant. sqrt(x) <= y is equal to x <= y² though the latter will most probably be faster.[/QUOTE] Thanks for the squareroot thingy, it's a whopping 14% faster now! About the tree structure, the point is that these bullets will all have different locations and that means I would still have to iterate and order them all. Wait, let me get this straight, I suddenly think I know what you mean: order all of the bullets, then only select the ones that are close to the player, like in 2x it's radius around them, and do a collision check for only these? Does this really outweight the calculations needed to order them?
Sorry, you need to Log In to post a reply to this thread.