• What are you working on? v16
    5,004 replies, posted
[QUOTE=Dlaor-guy;28362681]My engine is a beast. [img_thumb]http://i.imgur.com/s55qd.png[/img_thumb] 839 physically simulated objects without noticable lag! (ignore the horrible programmer art)[/QUOTE] What language is it?
[QUOTE=Richy19;28362874]What language is it?[/QUOTE] C#
[QUOTE=Darwin226;28362770]It's a 2D game. Everything is screen aligned :D[/QUOTE] So why do you need a 3d rotation matrix when you can pass a single rotation float into the shader?
Why is this code not working?When I run it, it freezes for 5 seconds and then nothing happens [code]private void Edittor_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.W) { SelectedBlock.picture.Location = new Point(SelectedBlock.picture.Location.X, SelectedBlock.picture.Location.Y - 10); }; if (e.KeyCode == Keys.A) { SelectedBlock.picture.Location = new Point(SelectedBlock.picture.Location.X - 10, SelectedBlock.picture.Location.Y); }; if (e.KeyCode == Keys.S) { SelectedBlock.picture.Location = new Point(SelectedBlock.picture.Location.X, SelectedBlock.picture.Location.Y + 10); }; if (e.KeyCode == Keys.D) { SelectedBlock.picture.Location = new Point(SelectedBlock.picture.Location.X + 10, SelectedBlock.picture.Location.Y); }; } [/code] but when i make the same thing but with buttons it works perfect: [code]private void Up_Click(object sender, EventArgs e) { SelectedBlock.picture.Location = new Point(SelectedBlock.picture.Location.X, SelectedBlock.picture.Location.Y - 10); } private void Left_Click(object sender, EventArgs e) { SelectedBlock.picture.Location = new Point(SelectedBlock.picture.Location.X - 10, SelectedBlock.picture.Location.Y); } private void Down_Click(object sender, EventArgs e) { SelectedBlock.picture.Location = new Point(SelectedBlock.picture.Location.X, SelectedBlock.picture.Location.Y + 10); } private void Right_Click(object sender, EventArgs e) { SelectedBlock.picture.Location = new Point(SelectedBlock.picture.Location.X + 10, SelectedBlock.picture.Location.Y); }[/code] What am I missing? HELP!
[QUOTE=bobiniki;28363312]What am I missing? HELP![/QUOTE] [url]http://www.facepunch.com/threads/1053117-What-do-you-need-help-with-v2[/url]
[QUOTE=knighty;28363036]So why do you need a 3d rotation matrix when you can pass a single rotation float into the shader?[/QUOTE] True. But I calculate the matrices per object since I figure it's faster than per vertex. And I said 16 floats because I just use 1 for my z coordinate since if I ever want to extend my library for 3D stuff as well it will be easier.
[QUOTE=bootv2;28361685]well with a question of good c++ books I automatically assume you have to learn from the very beginning, if you want to start learning at a intermediate level you have to tell people to recommend you that kind of books, not just assume they know what you're talking about and call them dumb when they give you a good book from the very beginning to advanced programming. and if you are starting from the very beginning, which I don't assume right now. c++ for dummies is very good, it taught me almost all I know about c++.[/QUOTE] Sorry, I didn't mean to provoke. But as I was trying to say I'm not a complete beginner so I'm searching for somewhat more advanced books. Any other recommendations?
A max map size of 8192x8192 is a little disappointing to me, but eh, I think it'll be alright for a while.
OBJ loading again (scaling and uv this time) [img]http://i56.tinypic.com/2ef0s2o.png[/img]
I'm doing some work experience as part of my college course in the IT department of Hertz. Basically they have nothing for me to do, so the developers that work there told me to make an application - but they didn't give me any ideas for it. They mostly use C#, VB, and tons of databases. So pretty much: I need an idea for an application. Any suggestions? I already know C# decently, so it shouldn't be too basic.
[QUOTE=Vicis;28364953]I'm doing some work experience as part of my college course in the IT department of Hertz. Basically they have nothing for me to do, so the developers that work there told me to make an application - but they didn't give me any ideas for it. They mostly use C#, VB, and tons of databases. So pretty much: I need an idea for an application. Any suggestions? I already know C# decently, so it shouldn't be too basic.[/QUOTE] You should make a 2D minecraft MMO in C++ with a friend or something.
[QUOTE=Dr Magnusson;28365005]You should make a 2D minecraft MMO in C++ with a friend or something.[/QUOTE] Shh
[QUOTE=HiredK;28364772]OBJ loading again (scaling and uv this time) [img_thumb]http://i56.tinypic.com/2ef0s2o.png[/img_thumb][/QUOTE] What's the black / grey?
[QUOTE=Darwin226;28363719]True. But I calculate the matrices per object since I figure it's faster than per vertex. And I said 16 floats because I just use 1 for my z coordinate since if I ever want to extend my library for 3D stuff as well it will be easier.[/QUOTE] What do you mean once per object? Each particle (object) should be 1 vertex. Or if you don't instance it, 4, but copying into a small vertex buffer even 4x the amount if going to be negligible. As I said before, even if it's 3d, don't pass in a matrix. Pass in the position and rotation and construct the matrix in the shader.
Forget particles. Let's just say I have a huge number of same complex objects. My current particle has 5 vertices. Calculating matrices 5 times per particle on the shader might be faster than once per particle on the CPU but as I said, I want flexibility. So the potential particle can have a 1000 vertices or something where there would be a slowdown if I did the matrix math on the shader.
Well then go with the instance method where you have 1 model vertex buffer and 1 data vertex buffer. That's the point of instancing. Particles are really just a somewhat special case of instancing. If you're going to have 1000s of vertices per model, then yes maybe you could do with having the matrix in the data buffer (even then, it could well still be faster in the vertex shader. I think you underestimate how fast they are. Here's a tip: alu instructions are cheap. memory is not.). But your system should allow for specialisation for screen align and world aligned particles. Screen aligned particles are much faster, and ignoring that optimisation is not a great decision.
[url]http://81.155.91.240:8090/post.lua[/url] I wrote an HTTP Server in C++ which uses Lua as it's scripting language. Does GET/POST at the moment (No HEAD yet). Also Cache related headers are all ignored at the moment. [url=http://81.155.91.240:8090/post.lua][img]http://www.adamncasey.co.uk/upload/image/3056/d/o/[/img][/url] It's hosted on rubbish internet, so it may slow down. (I added the picture so people can see what it looks like when I take it down) I did have it compiled for linux and on my VPS, but I find it such a hassle to compile it on linux everytime I make a small change so for now it's just on my Windows PC. Each query spawns a new thread, Can handle GET/POST variables in Lua, I've tried to prevent infinite loops and stop any security issues from letting anybody run lua on a server. (I think I've done a pretty good job, however I'm sure there's someone out there who knows better than me) Let me know if anybody finds any security issues. Any C&C would also be nice. (Slightly related note, I'm using [url=http://sockets.carrierlabs.com/]this[/url] cross-platform socket library and it's pretty decent. Sure, it's not Boost but it's probably is 5% of the size and take half the time to compile) For anybody still reading: Wireshark doesn't detect any packets it sends as HTTP, if anybody could help me find out what I'm doing wrong that'd be great.
Loved testing on it! :)
[QUOTE=Jallen;28365509]What's the black / grey?[/QUOTE] Just a debug texture until I add the mtl support.
[img]http://gyazo.com/397998ab01183f1bc43d63e095f3263f.png[/img] :buddy: And yeah, there is a quite a delay for me.
[QUOTE=BlkDucky;28366539][img_thumb]http://gyazo.com/397998ab01183f1bc43d63e095f3263f.png[/img_thumb] :buddy: And yeah, there is a quite a delay for me.[/QUOTE] [code]IRequest deconstructed: 15ms [IP removed] function test() string = "I barely know Lua end IRequest deconstructed: 0ms [IP removed] function test() string = "I barely know Lua. Am i end IRequest deconstructed: 0ms IRequest deconstructed: 15ms IRequest deconstructed: 0ms IRequest deconstructed: 15ms IRequest deconstructed: 16ms IRequest deconstructed: 0ms IRequest deconstructed: 16ms IRequest deconstructed: 0ms IRequest deconstructed: 16ms [IP removed] function test() string = "I barely know Lua. Amidoinitrite?" print(string) end test() IRequest deconstructed: 0ms[/code] I believe that's just network lag, requests take between 0 and 16 ms to process (+/- 16ms due to GetTickCount() resolution) Edit: Only the two crashes so far! I think I fixed them too, possibly
[QUOTE=HiredK;28364772]OBJ loading again (scaling and uv this time) [img_thumb]http://i56.tinypic.com/2ef0s2o.png[/img_thumb][/QUOTE] I see deku link, link, the eyeball boss in the first dungeon, and not sure if its goron link or something. And a robot at the top
[QUOTE=Ortzinator;28345039]Guys check it out: [url]http://codereview.stackexchange.com/[/url][/QUOTE] This site is so awesome, I posted a bit of unefficient code there with a bit of explanation and 20 minutes later they give me a piece of code which fixes all the issues! Check it out :buddy: [url]http://codereview.stackexchange.com/questions/1066/is-there-any-way-to-improve-this-piece-of-c-code[/url]
[QUOTE=Richy19;28366802]And a robot at the top[/QUOTE] ...Metal Gear?
[QUOTE=Richy19;28366802]I see deku link, link, the eyeball boss in the first dungeon, and not sure if its goron link or something. And a robot at the top[/QUOTE] I just found out I can convert Zelda OOT scene to .obj file too :v: [img]http://i56.tinypic.com/2ch2gyb.png[/img]
I'm trying to figure out which scene that is. I'm gonna have to say Kokiri Forest...
Where is that in OOT?
[QUOTE=Dryvnt;28368645]Where is that in OOT?[/QUOTE] Obviously just outside the shop in kokiri village. bitches can't match my oot knowledge
[QUOTE=Dotmister;28366343][url]http://81.155.91.240:8090/post.lua[/url] I wrote an HTTP Server in C++ which uses Lua as it's scripting language. Does GET/POST at the moment (No HEAD yet). Also Cache related headers are all ignored at the moment. [url=http://81.155.91.240:8090/post.lua][img_thumb]http://www.adamncasey.co.uk/upload/image/3056/d/o/[/img_thumb][/url] It's hosted on rubbish internet, so it may slow down. (I added the picture so people can see what it looks like when I take it down) I did have it compiled for linux and on my VPS, but I find it such a hassle to compile it on linux everytime I make a small change so for now it's just on my Windows PC. Each query spawns a new thread, Can handle GET/POST variables in Lua, I've tried to prevent infinite loops and stop any security issues from letting anybody run lua on a server. (I think I've done a pretty good job, however I'm sure there's someone out there who knows better than me) Let me know if anybody finds any security issues. Any C&C would also be nice. (Slightly related note, I'm using [url=http://sockets.carrierlabs.com/]this[/url] cross-platform socket library and it's pretty decent. Sure, it's not Boost but it's probably is 5% of the size and take half the time to compile) For anybody still reading: Wireshark doesn't detect any packets it sends as HTTP, if anybody could help me find out what I'm doing wrong that'd be great.[/QUOTE] Just curious, I'm planning on doing something similar with C#, and I was wondering how you handled infinite loops? The only solution I see (short of solving the halting problem) is to check for long execution time.
[QUOTE=Xeon06;28368969]Just curious, I'm planning on doing something similar with C#, and I was wondering how you handled infinite loops? The only solution I see (short of solving the halting problem) is to check for long execution time.[/QUOTE] [code] lua_sethook(Engine, LuaFunction::ExecutionLimit, LUA_MASKCOUNT, 100000); [/code] Hopefully the C# API is actually object orientated, I'm using the pure C API and it's awful.
Sorry, you need to Log In to post a reply to this thread.