• What are you working on? v19
    6,590 replies, posted
AND could be used to check for collisions where the collision bodies are 1 and noncolliding parts are 0. if there's 1 left in the final bitmap, there's a collision. However, rect-to-rect collision is much more efficient.
[QUOTE=esalaka;31297429]AND could be used to check for collisions where the collision bodies are 1 and noncolliding parts are 0. if there's 1 left in the final bitmap, there's a collision. However, rect-to-rect collision is much more efficient.[/QUOTE] I know its more efficient, but im bored :v: [editline]24th July 2011[/editline] [QUOTE=Lutin;31297409]Why not AND since you want to see where object A AND object B are?[/QUOTE] well, if you have a colour (ignoring alpha of) FF0011 and you AND it with 000000 youll produce something which i cant be arsed to work out. If you AND it with something other than 000000 youll end up with something else i cant be arsed to work out. If you OR them though, surely youll end up with FF0011 when OR'd with 000000 and something random which i cant be arsed to work out with anything else, which allows you to check for an overlap?
[QUOTE=esalaka;31297429]AND could be used to check for collisions where the collision bodies are 1 and noncolliding parts are 0. if there's 1 left in the final bitmap, there's a collision. However, rect-to-rect collision is much more efficient.[/QUOTE] Well if you do a bounding box collision for broad collisions and then a per-pixel collision if the bounding boxes collide it wouldn't be too bad until you had a lot of objects colliding
Does anyone have an OP ready for v20?
[QUOTE=Icedshot;31297462]I know its more efficient, but im bored :v: [editline]24th July 2011[/editline] well, if you have a colour (ignoring alpha of) FF0011 and you AND it with 000000 youll produce something which i cant be arsed to work out. If you AND it with something other than 000000 youll end up with something else i cant be arsed to work out. If you OR them though, surely youll end up with FF0011 when OR'd with 000000 and something random which i cant be arsed to work out with anything else, which allows you to check for an overlap?[/QUOTE]If you're going to be doing per-pixel collision, you should use separate collision bitmaps or use the alpha channel [editline]23rd July 2011[/editline] OVERV U BROKE DA AUTOMERGE
[QUOTE=Lutin;31297598]If you're going to be doing per-pixel collision, you should use separate collision bitmaps or use the alpha channel [editline]23rd July 2011[/editline] OVERV U BROKE DA AUTOMERGE[/QUOTE] What im going to do in reality is split the screen area into a grid, then perform collision checks on squares around where the entity currently is Doing a naive method currently, for 600 items which can collide with a total of 600 objects, takes about 0.3 seconds a frame (but thats including all the other crap as well) When it gets down to the realistic number of entities im going to have (about 100), its fine even with naive checking (0.013 seconds per frame, which is the refresh rate of my monitor). But im still going to optimise it anyway :v:
Just released a stripped-down version of our voxel engine in our development thread [URL="http://www.facepunch.com/threads/1108612-Umbra-Voxel-Engine?p=31298838#post31298838"]here[/URL]. Could some kind people please test it and post results in that thread? I want to know how it runs on different machines and if it even runs at all.
[QUOTE=Lutin;31291451]If you're using .NET check out System.Security.Cryptography. RSA would be nice to implement. SHA as well and maybe AES/DES?[/QUOTE] .NET's RSA class is actually quite nice (given you're not trying to import a PEM), but it can generate a new keypair for you every time if you want it to. I use it for encrypting logins on AnyHub since I'm not able to use SSL.
Well that is awesome, it took me 2 hours to port CodeGame to sfml, though I still have some bugs it is comming along nicely
[cpp] decode::file("models/ah1z.imf", [](std::string cmd, std::string content){ print("Command: "<<cmd<<"\nContent: "<<content<<'\n'); });[/cpp] File: [code]Texture "materials/AH_1Z.tga"; Diffuse 1; Ambient 0.01; Phong { 0.1; HAHAHA; { "The cake is a joke." { b; } } c; } [/code] Console output: [code]Command: Texture Content: "materials/AH_1Z.tga" Command: Diffuse Content: 1 Command: Ambient Content: 0.01 Command: Phong Content: 0.1; HAHAHA; { "The cake is a joke." { b; } } c; [/code] I love lambda functions. I should add a third parameter that tells if it's a block or single statement. Blocks can further be decoded by using decode::text. [editline][/editline] I played around a bit more and.. [cpp]template<typename T_ret, typename... T_args> class ClassFunction { T_ret(*mFunc)(T_args...); public: ClassFunction(T_ret(*f)(T_args...)){ mFunc = f; } T_ret operator()(T_args... a){ return mFunc(a...); } }; class SomeTestClass { public: ClassFunction<void> Hurr; SomeTestClass(): Hurr([](){ print("LAWL :3"); }){} }; int main(){ SomeTestClass test; test.Hurr(); return 0; }[/cpp] This shit actually works. Now imagine somebody would overload the += operator for it, to add callback functions.
Wrote an arbitrary base converter. [url=http://dl.dropbox.com/u/6929441/screenshots/baseconv01.png][img]http://dl.dropbox.com/u/6929441/screenshots/baseconv01.png[/img][/url] [url=http://dl.dropbox.com/u/6929441/screenshots/baseconv02.png][img]http://dl.dropbox.com/u/6929441/screenshots/baseconv02.png[/img][/url] [url=http://dl.dropbox.com/u/6929441/screenshots/baseconv03.png][img]http://dl.dropbox.com/u/6929441/screenshots/baseconv03.png[/img][/url] The Convert button is a little bit redundant as the thing automatically updates the result whenever you alter the bases or input value. The dropdown lists for both have base 2, 8, 10, 16, and alphabet but you can type in whatever you like. C++ with Qt.
[QUOTE=mechanarchy;31302310]Wrote an arbitrary base converter. [url=http://dl.dropbox.com/u/6929441/screenshots/baseconv01.png][img]http://dl.dropbox.com/u/6929441/screenshots/baseconv01.png[/img][/url] [url=http://dl.dropbox.com/u/6929441/screenshots/baseconv02.png][img]http://dl.dropbox.com/u/6929441/screenshots/baseconv02.png[/img][/url] [url=http://dl.dropbox.com/u/6929441/screenshots/baseconv03.png][img]http://dl.dropbox.com/u/6929441/screenshots/baseconv03.png[/img][/url] The Convert button is a little bit redundant as the thing automatically updates the result whenever you alter the bases or input value. The dropdown lists for both have [B]base-2, -8, -10, -16,[/B] and alphabet but you can type in whatever you like. C++ with Qt.[/QUOTE] You shouldn't have written like base-2, because negative bases really exist: [url]http://en.wikipedia.org/wiki/Base_-2[/url]
[QUOTE=sim642;31302494]You shouldn't have written like base-2, because negative bases really exist: [url]http://en.wikipedia.org/wiki/Base_-2[/url][/QUOTE] I see, interesting. Updated my post to remove ambiguity, but I don't really see any practical applications of negative-based numbers.
"Negadecimal" sounds epic. [editline]24th July 2011[/editline] Maurice should include Not Tetris in Not Mario as a Not Easteregg.
[QUOTE=mechanarchy;31302890]I see, interesting. Updated my post to remove ambiguity, but I don't really see any practical applications of negative-based numbers.[/QUOTE] It's maths, there aren't supposed to be practical applications. There is even stuff like base pi. Here's a list of some: [url]http://en.wikipedia.org/wiki/List_of_numeral_systems[/url].
[QUOTE=sim642;31303276]It's maths, there aren't supposed to be practical applications. There is even stuff like base pi. Here's a list of some: [url]http://en.wikipedia.org/wiki/List_of_numeral_systems[/url].[/QUOTE] "Twindragon base" sounds awesome
God those names are sexy. Anyway, I spent THREE HOURS trying to stream raw audio, from VLC, to shoutcast. All failed miserably(in VLC, i couldnt stream a m3u). So I did this: [thumb]http://i.imgur.com/fe30p.png[/thumb] (brought to you by 2d tiles) And I'm listening to chrono trigger music since I almost beat the game and its good stuff. [editline]24th July 2011[/editline] brought to you and part by [code] (Y==5|Y==4) ? (Y==5 ? 4 : r.nextBoolean() ? (r.nextInt(2)+13) : 0) : (Y>5 ? 3 : 0)[/code]
[QUOTE=sim642;31302494]You shouldn't have written like base-2, because negative bases really exist: [url]http://en.wikipedia.org/wiki/Base_-2[/url][/QUOTE] [URL]http://en.wikipedia.org/wiki/Base_2[/URL] [quote=Wikipedia]The binary numeral system, or [b]base-2[/b] number system...[/quote] I wonder how the -2 system should be written in the same manner. "base-(-2)" ?
[QUOTE=Spoco;31305231][URL]http://en.wikipedia.org/wiki/Base_2[/URL] I wonder how the -2 system should be written in the same manner. "base-(-2)" ?[/QUOTE] base+2? :v:
[QUOTE=Spoco;31305231] I wonder how the -2 system should be written in the same manner. "base-(-2)" ?[/QUOTE] base&#8211; -2, I believe
[QUOTE=Map in a box;31304549]And I'm listening to chrono trigger music since I almost beat the game and its good stuff.[/QUOTE] Yes. Yes it is.
[QUOTE=Overv;31297594]Does anyone have an OP ready for v20?[/QUOTE] Why? LMAO Pics v.96 is at a 150 pages atm.
We'll have to artificially close WAYWO at some point to get refreshed highlights :saddowns:
[QUOTE=sim642;31303276]It's maths, there aren't supposed to be practical applications. There is even stuff like base pi.[/QUOTE] I've always thought [url=http://en.wikipedia.org/wiki/Balanced_ternary]balanced ternary[/url] was an interesting one.
[QUOTE=esalaka;31306017]We'll have to artificially close WAYWO at some point to get refreshed highlights :saddowns:[/QUOTE] I doubt it will stay like this, there has always been a limit, i doubt the forums will be very stable if we have 1000 page topics all over the place.
[QUOTE=esalaka;31306017]We'll have to artificially close WAYWO at some point to get refreshed highlights :saddowns:[/QUOTE] Overv should just lock the thread when it reaches 5000 posts.
I just added some threading to my loading process and it became about 10 times slower. I think I'm doing something wrong.
[QUOTE=Robber;31306846]Overv should just lock the thread when it reaches 5000 posts.[/QUOTE] Overv already kind of offered to close this thread right here [url]http://www.facepunch.com/threads/1099026-What-are-you-working-on-v19?p=31297594&viewfull=1#post31297594[/url] It's just that noone has an OP ready.
Okay, I have improved my app a lot and got it to spit out pictures at any resolution, but now I have another problem: [quote][img]http://dl.dropbox.com/u/11782997/mandelbrot_colorproblem.png[/img][/quote] See the color difference? This has something to do with color profiles. Here's that 1920x1200 picture if anyone is interested: [URL]http://dl.dropbox.com/u/11782997/Mandelbrot_1920x1200.PNG[/URL] [b]Edit:[/b] Actually, when I open that in Chrome I think the colors are adjusted to my monitor profile or something, because it looks exactly like in the app.
[QUOTE=Spoco;31307407]Okay, I have improved my app a lot and got it to spit out pictures at any resolution, but now I have another problem: See the color difference? This has something to do with color profiles. Here's that 1920x1200 picture if anyone is interested: [URL]http://dl.dropbox.com/u/11782997/Mandelbrot_1920x1200.PNG[/URL][/QUOTE] I don't see a color difference?
Sorry, you need to Log In to post a reply to this thread.