• What are you working on? V4 (HTML ISN'T PROGRAMMING)
    2,003 replies, posted
I'm pretty sure math.h defines pi. (No it didn't) [editline]02:47PM[/editline] [QUOTE=Dryvnt;18094196]So, I copy pasted this into my trusty Code::Blocks, but I get a compiling error there. Now I'm a complete retard when it comes to coding, so would someone please enlighten me on what the problem is?[/QUOTE] I'm pretty sure you need to link to the windows libraries or something. I'm not sure though.
[QUOTE=farmatyr;18093613]stuff[/QUOTE] that's pretty cool, you don't need to move the mouse to set pixels at that pos though
[QUOTE=thelinx;18094197]I'm pretty sure you need to link to the windows libraries or something.[/QUOTE] :confused:
I'm at home for the weekend on my Eee PC, My desktop is at my university room. Need an idea for something to occupy me... I was thinking something using SFML and maybe Box 2D, Also want to try out some 2D smoke effects with sprites some time. I could do a GUI type thing like some of you guys have done. Dunno what to make :sigh:
[QUOTE=Jallen;18094378]I'm at home for the weekend on my Eee PC, My desktop is at my university room. Need an idea for something to occupy me... I was thinking something using SFML and maybe Box 2D, Also want to try out some 2D smoke effects with sprites some time. I could do a GUI type thing like some of you guys have done. Dunno what to make :sigh:[/QUOTE] Make a dot-to-dot generator. A user gives an image, selects a rough area to turn into a dot-to-dot. Your program produces an accurate thing for it :)
[QUOTE=Jallen;18094378]I'm at home for the weekend on my Eee PC, My desktop is at my university room. Need an idea for something to occupy me... I was thinking something using SFML and maybe Box 2D, Also want to try out some 2D smoke effects with sprites some time. I could do a GUI type thing like some of you guys have done. Dunno what to make :sigh:[/QUOTE] Make a signature Generator. No I'm joking, work on 2d particle effects for smoke / water / fire/ sparks ect. I've always wanted to do that.
[code]int main(void) { engineProperties* properties = new engineProperties; properties->windowTitle = "DISASTERS IN SPPAAACCCCEEEEE"; properties->width = 1024; properties->height = 768; properties->FOV = 45; IEngineLayer* layer = createEngineLayer(EVideoDriverOpenGL, properties); delete properties; if(layer == 0) return false; mainMenuState* mainState = new mainMenuState(layer->getStateLayer()); subMenuState* subState = new subMenuState(layer->getStateLayer(), mainState); subMenuState2* subState2 = new subMenuState2(layer->getStateLayer(), mainState); layer->getStateLayer()->setCurrentState(mainState); printf("RUN\n"); layer->run(); //while(layer->run() == false); subState2->drop(); printf("RUN\n"); layer->run(); subState->grab(); mainState->removeChild(subState); layer->getStateLayer()->setCurrentState(subState); printf("RUN\n"); layer->run(); mainState->drop(); subState->drop(); layer->drop(); getchar(); return false; }[/code] [code]Created window at 1024x768@32 windowed resolution. Created the OpenGL context. RUN MAINMENU 2 SUBMENU SUBMENU2 RUN MAINMENU 1 SUBMENU RUN SUBMENU[/code] When a child is removed, it gets dropped. If you don't grab it before it gets dropped, it'll be deleted. Yay for reference counting.
Ok, how about: [code]name: SimpleBot; author: Robert64; version: 0.01; chassis: blue; wheel: grey; turret: blue; startai; '-------------------------------------' lable: main; if: this_ang < enemy_dir; turn: right; goto: main; else; if: this_ang > enemy_dir; turn: left; goto: main; end if; end if; if: enemy_dist < 256; shoot; goto: main; end if; move: forward; goto: main;[/code] For instructions for the bots? Should I improve the syntax more?
My friend and I just finished our midterm. We had to make an address book in the console, but we decided to make it have a full gui. We also used Trienodes to quickly sort through the names (+5000 names). If you need to quickly sort through a list of Strings, I highly recommend that you use a Trienode.
[QUOTE=Robert64;18095872]For instructions for the bots? Should I improve the syntax more?[/QUOTE] How about Python? You'll end up coding your scripting language 24/7 because players will want more and more out of it.
Use LUA or SQUIRREL (something embeddable)?
The interpreter and main game are in flash ( AS2 ). I doubt there are any Lua / Squirrel interpreters for AS2 but I'm prepared to be proven wrong. I'm aiming for the finished thing to be flash and PHP based where anyone can upload a bot to compete against each other.
[QUOTE=thelinx;18094197]I'm pretty sure math.h defines pi. (No it didn't) [/QUOTE] It does. It's as M_PI. There are other useful constants and macros in there.
jesus christ, sorry, snip :D
What??
[QUOTE=Robber;18096059]What??[/QUOTE] I accidentally posted my spanish homework. "How do you accidentally post your spanish homework, dumbass?" Well I'm glad you asked, you see, my spanish teacher posts the vocabulary next to pictures and formats it terribly to get it all to fit, so there's a billion spaces. So, I preview post the vocabulary list here on facepunch because it automatically removes extra spaces.
[QUOTE=ryandaniels;18096108]I accidentally posted my spanish homework. "How do you accidentally post your spanish homework, dumbass?" Well I'm glad you asked, you see, my spanish teacher posts the vocabulary next to pictures and formats it terribly to get it all to fit, so there's a billion spaces. So, I preview post the vocabulary list here on facepunch because it automatically removes extra spaces.[/QUOTE] You could just put it in the body of a html file and it would do the same thing. [code] <!DOCTYPE html> <html> <body> Put stuff here. </body> </html>[/code] Actually that would remove line breaks so ignore this.
Currently working on my IRC bot written in PHP. [IMG]http://i36.tinypic.com/ip1r1j.png[/IMG] Currently it can give op using commands, set topic, random quote system, ban system, user control (Add's a user hostname to admin list if they are in a admin nick and have identified with NickServ), Addon system.
[QUOTE=Cathbadh;18096014]It does. It's as M_PI. There are other useful constants and macros in there.[/QUOTE] Some math headers don't, like the one included with the Visual Studio 2010 beta. The math.h with Dev C++ does however, so I had to define it myself when I switched a project from Dev C++ to Visual Studio.
[QUOTE=Cathbadh;18096014]It does. It's as M_PI. There are other useful constants and macros in there.[/QUOTE] Nope, it doesn't.
Well I got my google wave invitation, except the crazy douchebags want a mobile phone to send the activation code to. I don't have my phone at the moment, so now I'm stuck at "enter the activation code, and I don't want to close it because I don't know how to navigate back to the page. When I try to log in it acts as if the account doesn't exist :sigh: Whatever happened to a fucking email verification? It's easier to steal someone's phone than it is to steal their email password. [I]Warning: Have your phone ready before you sign up, guys[/I] [editline]11:59AM[/editline] Also, ryandaniels was already taken :argh: Had to go with roy.dabrowski instead.
[QUOTE=ryandaniels;18097027]Well I got my google wave invitation, except the crazy douchebags want a mobile phone to send the activation code to. I don't have my phone at the moment, so now I'm stuck at "enter the activation code, and I don't want to close it because I don't know how to navigate back to the page. When I try to log in it acts as if the account doesn't exist :sigh: Whatever happened to a fucking email verification? It's easier to steal someone's phone than it is to steal their email password. [I]Warning: Have your phone ready before you sign up, guys[/I] [editline]11:59AM[/editline] Also, ryandaniels was already taken :argh: Had to go with roy.dabrowski instead.[/QUOTE] sorry, irrelevancy was 2 pages ago.
New Project, long story, read here: [url]http://rocklock.tumblr.com/[/url] Working on that :D More specifically working out how pygame masks work. Also: Crappy game start concept: (I really need to work on my pixel art again) [img]http://filesmelt.com/downloader/start1.png[/img] Considering making the whole game only 2 colors :D (Apart from player, important objects, endgame and other people)
[QUOTE=iPope;18097413] [img]http://filesmelt.com/downloader/start1.png[/img][/QUOTE] That looks nice for a start. Keep on it. :buddy:
[QUOTE=AzzyMaster;18096165]Currently working on my IRC bot written in PHP. [IMG_thumb]http://i36.tinypic.com/ip1r1j.png[/IMG_thumb] Currently it can give op using commands, set topic, random quote system, ban system, user control (Add's a user hostname to admin list if they are in a admin nick and have identified with NickServ), Addon system.[/QUOTE] how are you parsing incoming irc commands? my php irc class using some god awful regex that breaks half the time for god knows what reason.
[QUOTE=Torekk;18097539]That looks nice for a start. Keep on it. :buddy:[/QUOTE] Looks way better in only black and white :D Got basic masks working, now to play around with scaling and the likes :D [b]Edit:[/b] Pygame documentation fails, it says you can use Mask.scale((x, y)) on a mask but you can't, it throws an error. I worked it out though, I just scaled the image before I turned it into a mask. Anyway, got it working with mouse clicks. Masks are really awesome because I can have this as a level: [img]http://filesmelt.com/downloader/level.png[/img] But only have collisions with this: [img]http://filesmelt.com/downloader/mask1.png[/img] Oops! Forgot to remove the player.
[QUOTE=gngbng;18097567]how are you parsing incoming irc commands? my php irc class using some god awful regex that breaks half the time for god knows what reason.[/QUOTE] Do you mean things like !op, !voice? [CODE] $socket = fsockopen(GetINI("Network.ini","Address"), GetINI("Network.ini","Port")); //Some other code to join channel, etc while(1) { while($data = fgets($socket)) { CheckDay($SDay, $SMonth); if (GetINI('Bot.ini','Show') == 1) { include "Disp.php"; } flush(); $Seperate = explode("!", $Explosion[0]); $Nick = str_replace(array(chr(10), chr(13), chr(32), chr(58)), "", $Seperate[0]); $Channel = str_replace(array(chr(10), chr(13), chr(32), chr(58)), "", $Explosion[2]); $Explode = explode(' ', $data, 7); $Command = strtolower(str_replace(array(chr(10), chr(13)), '', $Explode[3])); $Command2 = str_replace(array(chr(10), chr(13)), '', $Explode[3]); if($Explode[0] == "PING"){ fputs($socket, "PONG ".$Explode[1]." \n"); } include "CTCP.php"; include "AdditionCtrl.php"; include "Ctrl.php"; include "UserCtrl.php"; } } [/CODE] Inside Ctrl.php: [CODE] if ($Command == $P."kick") { fputs($socket, "KICK $Channel ".RL($Explode[4])." $Nick\n"); fputs($socket, "PRIVMSG $Channel : The user ".RL($Explode[4])." has been kicked.\n"); } [/CODE] May be wrong as I just spliced a load of code from other files to make the main part to show you.
I am completely fucking failing at doing rudimentary gravity simulations in PyGame. Here's my code: [code] def move(self): self.gravity = self.gravity*1+gravity+(self.radius*.1) self.pos[0] = self.pos[0]+self.delta[0] self.pos[1] = self.pos[1]+self.delta[1]+self.gravity if self.pos[0] < self.radius/2: self.delta[0] = -self.delta[0] self.pos[0] = self.radius if self.pos[0] > res[0]-self.radius/2: self.delta[0] = -self.delta[0] self.pos[0] = res[0]-self.radius if self.pos[1] < self.radius/2: self.delta[1] = -self.delta[1]*1.1 self.pos[1] = self.radius if self.pos[1] > res[1]-self.radius/2: self.delta[1] = -self.delta[1]*0.9 self.gravity = 1 self.pos[1] = res[1]-self.radius # print self.gravity pygame.draw.circle(screen, self.color, self.pos, self.radius)[/code] It checks the screen boundaries, makes the ball reverse its direction when it reaches a boundary, but I can't figure out how to include both horizontal acceleration and vertical gravity. All my attempts either leave it flying straight towards the bottom right corner, or it sinks under the bottom of the screen, or it spazzes out and bounces around far too much. What's the proper equasion or whatever for gravity? It's surprising that doing a google search doesn't come up with much useful stuff. Most results link to forum posts which say "OOH JUST USE BOX2D". FUCK Box2D. Box2D won't teach me the underlying physics.
[QUOTE=AzzyMaster;18097900]Do you mean things like !op, !voice? code Inside Ctrl.php: code May be wrong as I just spliced a load of code from other files to make the main part to show you.[/QUOTE] no i mean stuff like ":guy!~teh@isp.com PRIVMSG #somechat :hi", unless that's what that code you pasted does (in that case your code is awful). also, why are you using inis? [b]edit:[/b] after closer looking i have determined that your code is fucking atrocious.
[media]http://www.youtube.com/watch?v=f4pp7AbaNKM[/media] Better video.
Sorry, you need to Log In to post a reply to this thread.