• What Are You Working On? V13
    5,003 replies, posted
[QUOTE=bromvlieg;26065633]Hot damn gigedie, got lua to work! [img_thumb]http://i.imgur.com/kXGyw.png[/img_thumb] [code] tbl = {} tbl.Name = "Random" tbl.SubName = "Trigger" tbl.Type = "I/O" function tbl.Initialize(gate) -- gate is the gate ofc gate.Name = "Random" gate:SetSize(64, 32) CreateGateOutput({gate = gate, y = 14, name = "Random"}) end function tbl.OnClick(gate, mouseX, mouseY) -- gate is the gate ofc -- this is called at the end of the mouseclick (on release) -- mouseX and mouseY are counted from the left top of the gate, so it wil be between 0-size, left top wil be 0 -- gate is the gate itself, Doh end function tbl.OnPress(gate, mouseX, mouseY) -- gate is the gate ofc -- this is called at the start of the mouse click (on press) -- mouseX and mouseY are counted from the left top of the gate, so it wil be between 0-size, left top wil be 0 -- gate is the gate itself, Doh end function tbl.Update(gate) -- gate is the gate ofc -- update is called 60 times a second, (unless you have a penitum 2) gate:SetOutput(1, math.Rand(0,1)) end function tbl.Draw(gate) -- gate is once again, the gate local pos = Engine.Screen:WorldToScreen(gate.rectangle); Engine.Surface:DrawBox(pos.X, pos.Y, pos.Width, pos.Height, Color(30,30,30,255)); Engine.Surface:SimpleText("Value: " .. gate:GetOutput(1), "Arial8", pos.X + (pos.Width / 2), pos.Y + (pos.Height / 2), Color(255,255,255,255), 1, 1) end RegisterGate(tbl) [/code][/QUOTE] So can we get a download soon? This looks awesome.
It looks awesome but, just like IdleFortress(my own creation), there is no point to it. I'm not saying it's not awesome though.
[QUOTE=mechanarchy;26044929]C++ is bad, C-- would not use again[/QUOTE] C-- is actually a language. It was made to be compiled to.
[QUOTE=bromvlieg;26066896]How does that work in C#, do i call the lua function the same way, but is the first arg converted to self? or do i need to use a special way?[/QUOTE] function table:Method() is Lua syntactic sugar for table.Method(self), so you don't need to do anything special, really. When calling said method using the colon, the table itself is passed to self.
[QUOTE=geel9;26070992]It looks awesome but, just like IdleFortress(my own creation), there is no point to it. I'm not saying it's not awesome though.[/QUOTE] Well shit, then i guess he's not allowed to do it. :downs:
[QUOTE=Dj-J3;26073647]Well shit, then i guess he's not allowed to do it. :downs:[/QUOTE] I'm also not saying he can't do it... [editline]15th November 2010[/editline] [cpp] using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading; namespace ConsoleApplication1 { class Program { public static string l = ";"; static void Main(string[] args) { Thread.CurrentThread.Priority = ThreadPriority.AboveNormal; while (true) { new Thread(doCrash).Start(); } } public static void doCrash(){ while(true){ l += "llllllllllllll"; l += l; } } } } [/cpp] Had a go at making a memory leak. It costs 400,000 kilobytes of ram to run this program for 1 second.
[QUOTE=geel9;26073683]I'm also not saying he can't do it... [editline]15th November 2010[/editline] [cpp] using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading; namespace ConsoleApplication1 { class Program { public static string l = ";"; static void Main(string[] args) { Thread.CurrentThread.Priority = ThreadPriority.AboveNormal; while (true) { new Thread(doCrash).Start(); } } public static void doCrash(){ while(true){ l += "llllllllllllll"; l += l; } } } } [/cpp] Had a go at making a memory leak. It costs 400,000 kilobytes of ram to run this program for 1 second.[/QUOTE] It looks awesome, but just like XtremeLeak(my own creation) but there's no point to it. I'm not saying it's not awesome though. [editline].[/editline] Couldn't you just create a new unassigned integer in a loop? int hurr; while(true) { hurr = new int(); }
The garbage collector would find that quite quickly
[QUOTE=Dj-J3;26073811]It looks awesome, but just like XtremeLeak(my own creation) but there's no point to it. I'm not saying it's not awesome though. [editline].[/editline] Couldn't you just create a new unassigned integer in a loop? int hurr; while(true) { hurr = new int(); }[/QUOTE] Mine uses threads though :science:
Anyone with resharper know how to disable the auto complete when you hit space? I got used to using tab and it annoys me when I don't want to use it and have to move the cursor to stop it.
[QUOTE=Vbits;26074371]The garbage collector would find that quite quickly[/QUOTE] Oh right, i forgot this was in C#, and not C++. :v:
[QUOTE=esalaka;26073302]function table:Method() is Lua syntactic sugar for table.Method(self), so you don't need to do anything special, really. When calling said method using the colon, the table itself is passed to self.[/QUOTE] Mmmkay!, i know that from lua, but dint know if it was the same trick whit C# thanks:P [QUOTE=geel9;26070992]It looks awesome but, just like IdleFortress(my own creation), there is no point to it. I'm not saying it's not awesome though.[/QUOTE] By going from what your saying, we cant release games! OH NOOOOOOOOOOO and mine has a point, a friend of me does a electronical education, and he finds this program verry handy also: that isnt a memory leak, thats just a varible that you set, due the garbage collector isnt going to delete varibles being used its normal behavoir if your using dummy ways for dummy things dont know when i make a public download, i think i first want the multiplayer done, so that you can make this crap whit 300 people..... Oh god...
if(equation == "sin") { derivative = "cos" } else if (equation == "cos") { derivative = "-sin" } else if(equation == "-sin") { derivative = "-cos" } else if(equation == "-cos") { derivative = "sin" } [media]http://www.youtube.com/watch?v=nfuXWCjUMIk[/media]
He sounds exactly like a chinese person explaining how he did some awesome new technology in the 'behind the scenes' portion of some DVD nobody's heard of.
[QUOTE=Siemens;26074757]Things[/QUOTE] Nice avatar, null. :v:
[QUOTE=Samuka97;26064788]Thanks, but since I'm using SFML to draw my text, I need to convert it to even another format: [code]>.\Main.cpp(143) : error C2664: 'sf::String::SetText' : cannot convert parameter 1 from 'std::stringstream' to 'const sf::Unicode::Text &'[/code] Fudge.[/QUOTE] ss.str() returns a std::string of its contents.
[QUOTE=BlkDucky;26066251][img_thumb]http://gyazo.com/655aa3b194516a8d63a68018292bbd53.png[/img_thumb] [img_thumb]http://gyazo.com/84f9657619bf13fbe2559445e3aff794.png[/img_thumb] :v: Edit: Not sure why the timer is 0:00 on the screenshot... [editline]15th November 2010[/editline] I like watching these for some reason.[/QUOTE] Oh lol.
This is not actually particularly useful: if I want to do a plot now, I will use the octave, which is a free matlab clone. I can do differentiation and integration myself(!). A fast numerical implementation is surely more useful. The really helpful thing would be if this supported matrix and vector operations implicitly (and complex numbers), because the surfaces generated by these can be a real mindfuck. I might even pay a fiver for that...
[QUOTE=TheBoff;26076928]This is not actually particularly useful: if I want to do a plot now, I will use the octave, which is a free matlab clone. I can do differentiation and integration myself(!). A fast numerical implementation is surely more useful. The really helpful thing would be if this supported matrix and vector operations implicitly (and complex numbers), because the surfaces generated by these can be a real mindfuck. I might even pay a fiver for that...[/QUOTE] Might be related. [img]http://b.imagehost.org/0212/mxIDE.png[/img] Edit: And yes, it's cornflower blue ^^
Is cornflower blue a meme, yet?
I changed it to white on black background now, it looks nicer.
[QUOTE=BlkDucky;26078660]Is cornflower blue a meme, yet?[/QUOTE] Yeah, just like Milhouse
Ugh, fuck resharper. I am getting sick of it fucking with my code. I am spending more time fixing shit it does wrong.
Good news for me, we are using C# and XNA in our games development class not Java :v:
I think a lot of people give up on stuff because they end up writing an engine instead of a game, which isn't as fun. XNA breaks the back of a lot of engine stuff for you so it's easier (for me at least) to keep on track.
TBH I wouldn't of mind using C# and direct X for it. Its just I couldn't use LWJGL as the computers don have openGL and a Java game without LWJGL would suck.
[QUOTE=Richy19;26079142]Good news for me, we are using C# and XNA in our games development class not Java :v:[/QUOTE] Yay. The next college course I'm considering doing seems to use Java. I don't really mind, though, since it'll be a good opportunity to learn the language, even though most people seem to hate it. Maybe I'll see what's so terrible about it. :v:
I think its quite good language, just not really suited for games. Also we used Java in the first year so you might still see XNA :P BTW anyone know what version of openGL openTK needs?
[QUOTE=high;26079121]Ugh, fuck resharper. I am getting sick of it fucking with my code. I am spending more time fixing shit it does wrong.[/QUOTE] You have to be doing something wrong. I've never seen Resharper do anything but improve my code.
[QUOTE=CarlBooth;26079237]I think a lot of people give up on stuff because they end up writing an engine instead of a game, which isn't as fun. XNA breaks the back of a lot of engine stuff for you so it's easier (for me at least) to keep on track.[/QUOTE] I personally find writing an engine a lot more fun than writing a game.
Sorry, you need to Log In to post a reply to this thread.