• What are you working on? November 2011 Edition
    3,673 replies, posted
Should I make a tower defense game or a card game pack (poker, solitaire, etc.) Agree for TD, Winner for card games
[QUOTE=neos300;33376146]Should I make a tower defense game or a card game pack (poker, solitaire, etc.) Agree for TD, Winner for card games[/QUOTE] ..neither?
[QUOTE=Map in a box;33375006]No no, I .accept() new clients, not one socket for the entire session.[/QUOTE] Generally when people want help with some code they provide it.
[img]http://puu.sh/95pb[/img] Shut up, it's a maze as far as I am concerned. Maze generation is something I'll leave for another day. [img]http://puu.sh/95tn[/img] [img]http://puu.sh/95wm[/img] 1600 pixel obstacles, 800 2x2 obstacles, 400 4x4 obstacles, looks pretty neat I reckon. [img]http://puu.sh/95wP[/img] I'll stop spamming 'content' now
[QUOTE=Maurice;33376158]..neither?[/QUOTE] Well then what would you suggest?
So I'm an arsehole and wrote a python program to download music from Grooveshark... [img]http://i.imgur.com/INbcD.png[/img]
[QUOTE=Wyzard;33369548]Hmm, that shouldn't happen. As soon as the process ends, the OS should close the connections automatically (e.g. by sending TCP FIN packets). Check with wireshark and see what's really happening.[/QUOTE] I'm using UDP, but I think I fixed it (I hadn't added anything to forcibly disconnect clients in love.quit)
Tried enabling GL_FOG to give the game I'm working on a bit more atmosphere but it drops the framerate down to <10, no matter what quality settings I use (GL_FASTEST rather than GL_NICER, GL_LINEAR rather than EXP). Anyone know how improve the fog performance? [img_thumb]http://i.cubeupload.com/ltoJ9q.png[/img_thumb]
[QUOTE=ZenX2;33377170]I'm using UDP, but I think I fixed it (I hadn't added anything to forcibly disconnect clients in love.quit)[/QUOTE] Huh? UDP doesn't have connections.
[QUOTE=high;33377341]Huh? UDP doesn't have connections.[/QUOTE] Yeah, it's more like telling the clients that they're not welcome to send mail anymore [editline]21st November 2011[/editline] Also, I went to the doctor this morning and found out that I have minor scholiosis
[QUOTE=ZenX2;33377414]Yeah, it's more like telling the clients that they're not welcome to send mail anymore [editline]21st November 2011[/editline] Also, I went to the doctor this morning and found out that I have minor scholiosis[/QUOTE] Why not have sessions then? So when they aren't welcome anymore you discard their session and drop their packets.
Desurium now builds!
This indexes all of the zombies by how close they are to the player. [IMG]http://img202.imageshack.us/img202/4559/screendistance.png[/IMG] Now all I need to do is write the rest of the movement/other zombie avoidance code. They're going to walk around each-other, (and not on top of), if it kills me.
[QUOTE=high;33377704]Why not have sessions then? So when they aren't welcome anymore you discard their session and drop their packets.[/QUOTE] I think that's what LUBE does. I just checked, it doesn't check if a client is in lube.Server.clients before passing the data they sent into the recv callback :v: [editline]21st November 2011[/editline] Okay, fixed by inserting about 20 characters of code that bartbes should have put in in the first place [editline]21st November 2011[/editline] [img]http://www.imperial-library.info/sites/default/files/gallery_files/valenwood.png[/img] I love this art style. I think I might try to do something similar for the game I'm working on now. (That's TES: Arena, btw) [editline]21st November 2011[/editline] I just found out that IntelliJ has a built in TODO thing It just keeps getting better
[QUOTE=ROBO_DONUT;33375725]I don't think it has anything to do with the actual networking protocol or sockets at this point, likely your code is not set up to handle both clients concurrently. You need to either handle connections in separate threads or switch between connections periodically. This is just a guess though, you're only giving us little bits of information with no code.[/QUOTE] Here is my Server code(accepts clients): [cpp] package wardom.server; import java.io.IOException; import java.net.ServerSocket; import java.net.Socket; import java.util.ArrayList; import org.newdawn.slick.SlickException; import org.newdawn.slick.tiled.TiledMap; import wardom.level.Level; import wardom.states.Game; public class Server { public static Game game; static Server instance; ServerSocket sock; ArrayList<Client>clients=new ArrayList<Client>(); public static Server getInstance(){ return instance; } public Server(int i) throws Throwable { instance=this; //TiledMap.setHeadless(false); game=new Game(); game.isServer=true; game.init(null,null); game.level.loadMap("mainmap"); sock=new ServerSocket(i); new Thread(){ public void run(){ while(true){ try { clients.add(new Client(sock.accept())); System.out.println("Client connected!"); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } } } }.start(); while(true){ game.level.update(1); Thread.sleep(16); } } /** * @param args * @throws */ public static void main(String[] args) throws Throwable { new Server(8777); } } [/cpp]
Does anyone know what this could be due to? It works fine on windows but on linux it just doesnt draw the screen. [video=youtube;IC9K70EnOeg]http://www.youtube.com/watch?v=IC9K70EnOeg[/video]
While posting Valgrind output and filming your screen with a video camera are legitimate ways to ask for help, source code is better.
[QUOTE=Jookia;33379069]While posting Valgrind output and filming your screen with a video camera are legitimate ways to ask for help, source code is better.[/QUOTE] Yea got the wrong post, I have posted some code in WDYNHW
[vid]http://triebr.com/Test2.ogg[/vid] Got my ogg theora working in Chrome. Google did a [I]really[/I] shitty implementation of Theora. :rolleyes:
Integrated version control is amazing I created a repository on github with one click (well, three clicks and some credential entering) So amazing
I just finished up a "Get Out" screen saver I made for the Get Out thread. Thought I'd post it here. [URL="http://www.mediafire.com/?98jhw99ws2s9e9b"]Get_Out_s.scr[/URL] [URL="http://www.filedropper.com/getoutscreen"]get_out_screen.zip[/URL] [URL="http://www.sendspace.com/file/4lmqsd"]get_out_screen.zip[/URL] Mirrors ^ Right click > Install (Win 7) [IMG]http://i.cubeupload.com/MUrM57.png[/IMG]
My nasty "macro all the things" interface thingy... 2000. [cpp] DEFINE_INTERFACE( KESTREL_EXPORT, GraphicsWrapper ) DEFINE_IFUNC( Uint32, Initialize, const Uint32, const Uint32, const Uint32 ) DEFINE_IFUNC( void, Clear, const Uint32, float, float, float, float, float, Uint32 ) DEFINE_IFUNC( void, CreateRenderTarget, Uint32, Uint32, Uint32, ... ) DEFINE_IFUNC( void, ReleaseRenderTarget, void* ) DEFINE_IFUNC( void, SetRenderTarget, void* ) DEFINE_INTERFACE_LOADER() DEFINE_LOAD_IFUNC( Initialize, Wrapper_Initialize ); DEFINE_LOAD_IFUNC( Clear, Wrapper_Clear ); DEFINE_LOAD_IFUNC( CreateRenderTarget, Wrapper_CreateRenderTarget ); DEFINE_LOAD_IFUNC( ReleaseRenderTarget, Wrapper_ReleaseRenderTarget ); DEFINE_LOAD_IFUNC( SetRenderTarget, Wrapper_SetRenderTarget ); END_DEFINE_INTERFACE_LOADER() END_DEFINE_INTERFACE() [/cpp] The aftermath: [cpp] namespace Kestrel { class __declspec(dllexport) GraphicsWrapper { public: GraphicsWrapper() : m_hModule(0) { } ~GraphicsWrapper() { if( m_hModule != 0 ) { FreeLibrary(m_hModule); } } typedef Uint32 (*PFNInitialize)( const Uint32, const Uint32, const Uint32 ); Uint32 (*Initialize)( const Uint32, const Uint32, const Uint32 ); typedef void (*PFNClear)( const Uint32, float, float, float, float, float, Uint32 ); void (*Clear)( const Uint32, float, float, float, float, float, Uint32 ); typedef void (*PFNCreateRenderTarget)( Uint32, Uint32, Uint32, ... ); void (*CreateRenderTarget)( Uint32, Uint32, Uint32, ... ); typedef void (*PFNReleaseRenderTarget)( void* ); void (*ReleaseRenderTarget)( void* ); typedef void (*PFNSetRenderTarget)( void* ); void (*SetRenderTarget)( void* ); bool Load( const Kestrel::String& Filename ) { m_hModule = LoadLibraryA(Filename.c_str()); if( m_hModule == 0 ) return false; if( (Initialize = (PFNInitialize)GetProcAddress(m_hModule, "Wrapper_Initialize")) == 0 ) { return false; }; if( (Clear = (PFNClear)GetProcAddress(m_hModule, "Wrapper_Clear")) == 0 ) { return false; }; if( (CreateRenderTarget = (PFNCreateRenderTarget)GetProcAddress(m_hModule, "Wrapper_CreateRenderTarget")) == 0 ) { return false; }; if( (ReleaseRenderTarget = (PFNReleaseRenderTarget)GetProcAddress(m_hModule, "Wrapper_ReleaseRenderTarget")) == 0 ) { return false; }; if( (SetRenderTarget = (PFNSetRenderTarget)GetProcAddress(m_hModule, "Wrapper_SetRenderTarget")) == 0 ) { return false; }; return true; } private: HMODULE m_hModule; }; } [/cpp] What now null?
[QUOTE=high;33376216]Generally when people want help with some code they provide it.[/QUOTE] Not when they don't have code :v:
[I]Schema [/I](Parsing/totable input)[I]:[/I] [code]<schema> <document name="friends"> <collection name="friend"> <text name="steamID64"/> <text name="onlineState"/> </collection> </document> </schema> [/code] [i]Document:[/i] [code]<friends> <friend> <steamID64>76561198007052759</steamID64> <onlineState>in-game</onlineState> </friend> <friend> <steamID64>76561197998059435</steamID64> <onlineState>in-game</onlineState> </friend> <friend> <steamID64>76561198026187426</steamID64> <onlineState>in-game</onlineState> </friend> <friend> <steamID64>76561197978977007</steamID64> <onlineState>in-game</onlineState> </friend> <friend> <steamID64>76561198018146168</steamID64> <onlineState>in-game</onlineState> </friend> <friend> <steamID64>76561197995197217</steamID64> <onlineState>in-game</onlineState> </friend> </friends> [/code] [I]Output:[/I] [t]http://i.imgur.com/SDW5U.png[/t]
Had to increase the framebuffer to 468Mb to capture this 800x800 video :v: [vid]http://triebr.com/Test5.ogg[/vid] Showing off two projects at the same time :dance: I'll stop spamming content now
Don't stop I love free advertising
I've been making ~1 change in my code an hour I think the only cure might be closing my browser, but it sounds so risky
[QUOTE=DevBug;33379434] What now null?[/QUOTE] now, i post a witty reply on facepunch and continue programming :v:
[QUOTE=icantread49;33380057]now, i post a witty reply on facepunch and continue programming :v:[/QUOTE] how meta
apparently i made $0.02 in ad revenue testing Fabrix Free on my ipod touch and my gf's iphone4 :v: [editline]22nd November 2011[/editline] i might change the name, Fabrix is a big-name company that makes pouches for apple devices
Sorry, you need to Log In to post a reply to this thread.