1. Post #2001
    Gold Member
    Xeon06's Avatar
    September 2005
    1,221 Posts
    visual basic
    Oh ok. Added the option.
    Reply With Quote Edit / Delete Windows 7 Canada Show Events Funny Funny x 6Dumb Dumb x 1Programming King Programming King x 1 (list)

  2. Post #2002
    Follow me on github!
    benjojo's Avatar
    January 2009
    2,551 Posts
    Na mate.
    Brainfuck.
    Reply With Quote Edit / Delete United Kingdom Show Events Agree Agree x 12Programming King Programming King x 1 (list)

  3. Post #2003
    Richy19's Avatar
    May 2010
    5,266 Posts
    Does anyone have any multipass GLSL/SFML shader bloom effect that I can borrow *steal*
    Reply With Quote Edit / Delete Windows XP United Kingdom Show Events Programming King Programming King x 1 (list)

  4. Post #2004
    Gold Member
    Smashmaster's Avatar
    April 2005
    1,471 Posts
    Does anyone have any multipass GLSL/SFML shader bloom effect that I can borrow *steal*
    It's really not that hard. You'll learn a lot more if you do it yourself.

    Render the world, store image (do not clear.)

    Shader 1: Threshold (make anything below a certain brightness black), blur horizontal.
    Shader 2: Blur verticle.

    Add starting image.

    Of course, this would give you a box blur. If you want, you can box blur again (before you add the starting image) to approximate a gaussian blur.

    EDIT: For more street credz, make the blur size based on the pixel brightness. Also, make the threshold smooth. (Either do a lovely s-curve or linearly interpolate between some minimum and maximum value.)
    Reply With Quote Edit / Delete Windows 7 United States Show Events Programming King Programming King x 2Agree Agree x 1 (list)

  5. Post #2005
    www.bff-hab.de
    Dennab
    February 2009
    7,832 Posts
    Does anyone have any multipass GLSL/SFML shader bloom effect that I can borrow *steal*
    Reply With Quote Edit / Delete Windows 7 Germany Show Events Funny Funny x 43Programming King Programming King x 1 (list)

  6. Post #2006
    Gold Member
    Smashmaster's Avatar
    April 2005
    1,471 Posts
    Actually, wait, you can't threshold in the same pass as you blur horizontally. They need to be seperate.

    However, this means you can store the threshold pass as another texture, and sample from it to determine how much to blur each pixel.
    Reply With Quote Edit / Delete Windows 7 United States Show Events Programming King Programming King x 1 (list)

  7. Post #2007
    Gold Member
    Darwin226's Avatar
    January 2009
    3,867 Posts
    Actually, wait, you can't threshold in the same pass as you blur horizontally. They need to be seperate.

    However, this means you can store the threshold pass as another texture, and sample from it to determine how much to blur each pixel.
    Wait, can't you blur just by sampling pixels in a circle (or square for performance) around the current pixel?

    Edited:

    I was thinking about what would be a great feature in a scripting language.
    Imagine if you could do something like this:
    maze = new Maze(50, 50)
    maze.Start = new Point(0, 0)
    maze.Walls.Add(new Point(10, 10), new Point(20, 20))
    
    pathFinder = new PathFinder(maze)
    path = pathFinder.GetPathTo(49, 49)
    
    foreach (step in path) Output(step)
    

    Without defining any of the classes or structures.
    It obviously doesn't do what you want. Yet.

    The classes are generated automatically.
    Maze class has a constructor that takes two number (assumes ints), it needs a public Point Start and public Something Walls.
    The type of Walls is not named yet, but it exists and has a method Add that takes two points (the idea is that it takes a variable amount of points but that can't be inferred).

    Similarly PathFinder needs to be able to output the path and the path has to be a collection of some sort whose members can be written as strings.

    The environment (the whole thing is probably more of an IDE feature than a language one) would have a Generate missing command that parses the code and for each variable or member looks through the code for all the ways it's used, then generates a new type that supports all of those if there already isn't one.
    Then you can just go through those generated classes and implement the actual algorithms in them (and name the ones that don't have a name yet)
    Reply With Quote Edit / Delete Windows 7 Croatia Show Events Dumb Dumb x 2Programming King Programming King x 1 (list)

  8. Post #2008
    Andrew McWatters
    Dennab
    March 2011
    4,658 Posts
    Ugh. More research this morning over an empty stomach. I'm too head deep into productivity to properly take care of myself.

    One great thing about Source is that if you want to do something, there are enough resources out there for a smart person to utilize to bend Source to their will. This can be done by a single person, or a team of modders.

    I'm looking into getting saverestore data to work properly with multiplayer. But I can't do it plainly with Source's (public) SDK, in the cooperative play manner I'd like (for the Campaign gamemode we have). This lies in the engine. Specifically, this bit:

    //-----------------------------------------------------------------------------
    // Purpose: 
    // Output : int
    //-----------------------------------------------------------------------------
    int CSaveRestore::IsValidSave( void )
    {
    	if (cmd_source != src_command)
    		return 0;
    
    	// Don't parse autosave/transition save/restores during playback!
    	if ( Demo_IsPlayingBack() )
    	{
    		return 0;
    	}
    
    	if (!sv.active)
    	{
    		Con_Printf ("Not playing a local game.\n");
    		return 0;
    	}
    
    	if (cls.state != ca_active)
    	{
    		Con_Printf ("Can't save if not active.\n");
    		return 0;
    	}
    
    	if (svs.maxclients != 1)
    	{
    		Con_Printf ("Can't save multiplayer games.\n");
    		return 0;
    	}
    
    	if ( svs.clients[0].active )
    	{
    		Assert( serverGameClients );
    		CPlayerState *pl = serverGameClients->GetPlayerState( svs.clients[0].edict );
    		if ( !pl )
    		{
    			Con_Printf ("Can't savegame without a player!\n");
    			return 0;
    		}
    			
    		if ( pl->deadflag != false )
    		{
    			Con_Printf ("Can't savegame with a dead player\n");
    			return 0;
    		}
    	}
    	
    	// Passed all checks, it's ok to save
    	return 1;
    }
    

    Though, as the code clearly states, this is only to validate if we should be -able- to save.

    The string "Can't save multiplayer games." never pops up in Synergy. Fuck. Okay, so they're sigscanning or using their Steamworks leverage to get multiplayer to work. It's unlikely the latter, because Synergy wasn't always a Steamworks mod. So they're writing over memory in engine.dll. It's not like Half-Life 2: Sandbox doesn't already do questionable shit like this already, but it's annoying to have to do, and puts modders in a situation where only the most dedicated and talented of programmers are able to do anything decently practical with Source. I don't really know for sure, maybe they've rewritten the save system using leaked code to assist them or something of the sort. Okay. That's fine, I'm a decent programmer, I can grab the signatures and fuck with functions if I need to, and I can accept that significant progress for anything will always be made by the people most dedicated to their respective projects and goals.

    The thing is, some of the more notable mods and addons in the Source modding community are packed with hacks like this sort of shit. You'd think that maybe more small fragments of code would be exposed to not create nearly explicitly defined hell for modders, but there are things like these which create thresholds for developers to break through. Things like these separate the boys from the men in the development community, but even then I wonder if such accomplishments go noticed by Valve, or if they even care.

    More what am I doing, with a dash of ranting, but I guess I'm just getting tired of certain things with Source development being awkward. You need at least a small arsenal of questionable things in your toolbox to get good work done, and some of these things are like the Valve codebase leak, your own sort of signature scanning package with maybe some vtable work on the side (though generally you never have to use this), and it's annoying.
    Reply With Quote Edit / Delete Windows 7 United States Show Events Programming King Programming King x 6Friendly Friendly x 2Dumb Dumb x 1Funny Funny x 1 (list)

  9. Post #2009
    Dotmister's Avatar
    May 2008
    898 Posts
    Wait, can't you blur just by sampling pixels in a circle (or square for performance) around the current pixel?
    By doing horizontal and vertical passes you reduce the number of samples you do dramatically. If you did a 7x7 sample size, you'd need to do 49 lookups per pixel. However if you do horizontal, then vertical, you only do 14 per pixel.
    Reply With Quote Edit / Delete Windows 7 United Kingdom Show Events Agree Agree x 3Informative Informative x 1Programming King Programming King x 1 (list)

  10. Post #2010
    Awesome ConsoleSweeper


    Nuu
    Reply With Quote Edit / Delete Windows 8 Netherlands Show Events Funny Funny x 21Agree Agree x 1Programming King Programming King x 1 (list)

  11. Post #2011
    itty-bitty pretty kitty
    supersnail11's Avatar
    September 2008
    8,779 Posts
    I know absolutely nothing about how to source engine works, but if sv.maxplayers isn't read only, then you might be able to set sv.maxplayers to 1, save the game, and then set it to whatever again before it kicks everyone.

    Again, I know nothing about the source engine, but that's what I'd do if it's possible.
    Reply With Quote Edit / Delete Windows 7 United States Show Events Programming King Programming King x 2 (list)

  12. Post #2012
    Gold Member
    Catdaemon's Avatar
    February 2005
    2,821 Posts
    Decided to pick up my C++ project again. I haven't written any code for a while.


    I decided that the first thing I'd do is plug my console library into GWEN. Was surprisingly easy, and more astoundingly my old code works

    Can someone explain GWEN_CONTROL_INLINE to me? I can't figure out how it works, only how it's used.
    Reply With Quote Edit / Delete Windows 7 Show Events Programming King Programming King x 3 (list)

  13. Post #2013
    Gold Member
    Darwin226's Avatar
    January 2009
    3,867 Posts
    By doing horizontal and vertical passes you reduce the number of samples you do dramatically. If you did a 7x7 sample size, you'd need to do 49 lookups per pixel. However if you do horizontal, then vertical, you only do 14 per pixel.
    You're right!
    That's actually pretty smart.
    Reply With Quote Edit / Delete Windows 7 Croatia Show Events Agree Agree x 1Friendly Friendly x 1Programming King Programming King x 1 (list)

  14. Post #2014
    Andrew McWatters
    Dennab
    March 2011
    4,658 Posts
    I know absolutely nothing about how to source engine works, but if sv.maxplayers isn't read only, then you might be able to set sv.maxplayers to 1, save the game, and then set it to whatever again before it kicks everyone.

    Again, I know nothing about the source engine, but that's what I'd do if it's possible.
    Just by looking at this code, it's one of the few things people would instantly assume to be possible. So I can understand that but "sv" is an engine value. No matter what, I'd need to do something to obtain a memory address and write over where that memory is - it if I took that path. So it's not something I can cleanly take on.

    Edited:

    I have reason to believe that Source is able to restore multiplayer states, but the engine won't allow saving them:

    void CEntitySaveRestoreBlockHandler::Restore( IRestore *pRestore, bool createPlayers )
    {
    ...
    			else if ( (pEntInfo->edictindex > 0) && (pEntInfo->edictindex <= gpGlobals->maxClients) )
    			{
    				if ( !(pEntInfo->flags & FENTTABLE_PLAYER) )
    				{
    					Warning( "ENTITY IS NOT A PLAYER: %d\n" , i );
    					Assert(0);
    				}
    
    				edict_t *ed = INDEXENT( pEntInfo->edictindex );
    
    				if ( ed && createPlayers )
    				{
    					// create the player
    					pent = CBasePlayer::CreatePlayer( STRING(pEntInfo->classname), ed );
    				}
    				else
    					pent = NULL;
    			}
    ...
    }
    

    why

    why

    [h2]why[/h2]
    Reply With Quote Edit / Delete Windows 7 United States Show Events Funny Funny x 5Programming King Programming King x 1 (list)

  15. Post #2015
    Gold Member
    BackwardSpy's Avatar
    May 2008
    6,123 Posts
    Reply With Quote Edit / Delete Windows 7 United Kingdom Show Events Agree Agree x 1Programming King Programming King x 1 (list)

  16. Post #2016
    jonnopon3000's Avatar
    August 2009
    380 Posts
    Spent the last couple of days working intensively at finishing my coursework videogame project, Maze Blitz.
    Designed by my friend, written and implemented by myself while learning the Java language, overall a project I'm proud of, despite level one just simply being broken.

    To mark the finishing of the project, I made a dev diary containing detailed comments, time-lapsed development with music, and game footage.
    Do enjoy watching; I'll post the game itself soon :)

    Reply With Quote Edit / Delete Windows 7 United Kingdom Show Events Programming King Programming King x 2Friendly Friendly x 1 (list)

  17. Post #2017
    Andrew McWatters
    Dennab
    March 2011
    4,658 Posts
    in today's episode of "source engine gems":

    int C_PlayerResource::GetFrags(int index )
    {
    	return 666;
    }
    

    so classy, so ~source~
    Reply With Quote Edit / Delete Windows 7 United States Show Events Funny Funny x 20Programming King Programming King x 1 (list)

  18. Post #2018
    Slaaf van EternalFlamez.Ik wilde heel graag de laatste Indie Bundle, en ik kreeg deze kuttitel er gratis bij.
    Staneh's Avatar
    March 2010
    4,030 Posts

    My game with Bob Marley song, recorded.
    Reply With Quote Edit / Delete Windows 7 Netherlands Show Events Funny Funny x 2Programming King Programming King x 2 (list)

  19. Post #2019
    itty-bitty pretty kitty
    supersnail11's Avatar
    September 2008
    8,779 Posts

    My game with Bob Marley song, recorded.
    FLOPPY RED DICK ATTACK GO!
    Reply With Quote Edit / Delete Windows 7 United States Show Events Funny Funny x 6Agree Agree x 1Artistic Artistic x 1Programming King Programming King x 1 (list)

  20. Post #2020
    LOL
    Dennab
    August 2009
    2,070 Posts
    Oh ok. Added the option.
    thanks I prefer visual basic for its superior speed, syntax and features

    Edited:

    this isn't FUNNY damned
    Reply With Quote Edit / Delete Windows 7 United States Show Events Funny Funny x 21Programming King Programming King x 2Agree Agree x 1Dumb Dumb x 1 (list)

  21. Post #2021
    Gold Member
    BlkDucky's Avatar
    May 2008
    6,420 Posts
    thanks I prefer visual basic for its superior speed, syntax and features

    Edited:

    this isn't FUNNY damned
    superior speed uh
    superior syntax uh
    superior features (what) uh

    yeah, taking all bets: troll or just ignorant?
    Reply With Quote Edit / Delete Windows 7 United Kingdom Show Events Agree Agree x 2Programming King Programming King x 1 (list)

  22. Post #2022
    itty-bitty pretty kitty
    supersnail11's Avatar
    September 2008
    8,779 Posts
    thanks I prefer visual basic for its superior speed, syntax and features

    Edited:

    this isn't FUNNY damned
    i can't tell if you're being sarcastic
    Reply With Quote Edit / Delete Windows 7 United States Show Events Agree Agree x 4Informative Informative x 1Programming King Programming King x 1 (list)

  23. Post #2023
    Gold Member
    robmaister12's Avatar
    January 2008
    4,951 Posts
    speed and features are identical to C# as they both produce the same CIL bytecodes (minus a few minor features exclusive to C# or VB). The syntax is awful though.
    Reply With Quote Edit / Delete Windows 7 United States Show Events Agree Agree x 2Programming King Programming King x 1 (list)

  24. Post #2024
    Gold Member
    BlkDucky's Avatar
    May 2008
    6,420 Posts
    i can't tell if you're being sarcastic
    this isn't the first time he's done the whole "vb is better" thing, so I doubt it's sarcasm.

    Edited:

    speed and features are identical to C# as they both produce the same CIL bytecodes (minus a few minor features exclusive to C# or VB). The syntax is awful though.
    yeah, but he doesn't even say what he's comparing it to.
    Reply With Quote Edit / Delete Windows 7 United Kingdom Show Events Agree Agree x 1Programming King Programming King x 1 (list)

  25. Post #2025
    Map in a box's Avatar
    July 2009
    6,577 Posts
    Why don't we just have a "passing" thing for each language? First C#, then Lua, then other languages people would like to use such as Java, Python, Visual Basic(god forbid), etc.

    Edited:

    Am I the only one that likes working with grids to make every little detail perfect, but only on the computer, not so much in real life(Probably because I can't make straight lines at all, they always look slanted)
    Reply With Quote Edit / Delete Windows XP United States Show Events Programming King Programming King x 2Agree Agree x 1 (list)

  26. Post #2026
    itty-bitty pretty kitty
    supersnail11's Avatar
    September 2008
    8,779 Posts
    Why don't we just have a "passing" thing for each language? First C#, then Lua, then other languages people would like to use such as Java, Python, Visual Basic(god forbid), etc.
    Then the program would be slow as fuck and buggy.
    Reply With Quote Edit / Delete Windows 7 United States Show Events Programming King Programming King x 1 (list)

  27. Post #2027
    Gold Member
    BackwardSpy's Avatar
    May 2008
    6,123 Posts
    Then the program would be slow as fuck and buggy.
    I'm pretty sure he meant a DIFFERENT program for each language...
    Reply With Quote Edit / Delete Windows 7 United Kingdom Show Events Agree Agree x 2Programming King Programming King x 1 (list)

  28. Post #2028
    Gold Member
    Jookia's Avatar
    July 2007
    6,511 Posts
    holyshitholyshitholyshit in sdl 2.0 you can alt+tab in fullscreen on linux
    Reply With Quote Edit / Delete Linux Australia Show Events Winner Winner x 4Funny Funny x 3Dumb Dumb x 1Programming King Programming King x 1 (list)

  29. Post #2029
    itty-bitty pretty kitty
    supersnail11's Avatar
    September 2008
    8,779 Posts
    I'm pretty sure he meant a DIFFERENT program for each language...
    I know.

    It's a lot slower to have to start a bunch of different processes to run your program than to do it all in the same program. Bonus slowness if each process is a child of the process before it, meaning each process has to exist for the duration of the program.
    Reply With Quote Edit / Delete Windows 7 United States Show Events Dumb Dumb x 10Programming King Programming King x 1 (list)

  30. Post #2030
    Gold Member
    Darwin226's Avatar
    January 2009
    3,867 Posts
    I know.

    It's a lot slower to have to start a bunch of different processes to run your program than to do it all in the same program. Bonus slowness if each process is a child of the process before it, meaning each process has to exist for the duration of the program.
    I'm sorry, what?
    Reply With Quote Edit / Delete Windows 7 Croatia Show Events Agree Agree x 11Dumb Dumb x 1Programming King Programming King x 1 (list)

  31. Post #2031
    Gold Member
    BackwardSpy's Avatar
    May 2008
    6,123 Posts
    I know.

    It's a lot slower to have to start a bunch of different processes to run your program than to do it all in the same program. Bonus slowness if each process is a child of the process before it, meaning each process has to exist for the duration of the program.
    No you're still not getting it, it's not a bunch of processes running for ONE program, it's multiple DIFFERENT programs, each one written in a different language and gets passed around to whoever wants to work on it next.

    Edited:

    Are you high?
    Reply With Quote Edit / Delete Windows 7 United Kingdom Show Events Agree x 4Optimistic x 1Informative x 1Useful x 1Funny x 1Programming King x 1 (list)

  32. Post #2032
    itty-bitty pretty kitty
    supersnail11's Avatar
    September 2008
    8,779 Posts
    I'm sorry, what?
    If it was in separate programs for each programming language used, if each program is a child of the program before it (I.E. parent closes, child closes), that means that you'll have to have every program running at once. That'll use up a lot of memory.

    Edited:

    No you're still not getting it, it's not a bunch of processes running for ONE program, it's multiple DIFFERENT programs, each one written in a different language and gets passed around to whoever wants to work on it next.

    Edited:

    Are you high?
    Oh
    Nevermind.
    Reply With Quote Edit / Delete Windows 7 United States Show Events Funny Funny x 6Programming King Programming King x 1 (list)

  33. Post #2033
    Gold Member
    BackwardSpy's Avatar
    May 2008
    6,123 Posts
    Who in their right mind would try and create a game using that many seperate processes all written in all of those different languages? It would be completely pointless, not to mention extremely difficult and slow
    Reply With Quote Edit / Delete Windows 7 United Kingdom Show Events Agree Agree x 5Programming King Programming King x 1 (list)

  34. Post #2034
    RUBY OVERLORD
    swift and shift's Avatar
    November 2011
    2,115 Posts
    Who in their right mind would try and create a game using that many seperate processes all written in all of those different languages? It would be completely pointless, not to mention extremely difficult and slow
    linus torvalds
    Reply With Quote Edit / Delete Australia Show Events Zing x 18Funny x 3Agree x 2Disagree x 1Programming King x 1 (list)

  35. Post #2035
    chimitos's Avatar
    September 2010
    2,149 Posts



    My game with Bob Marley song, recorded.
    You need to make the enemies get pushed back when you hit them, like at 6:12 in this:
    Reply With Quote Edit / Delete Windows Vista United States Show Events Programming King Programming King x 1 (list)

  36. Post #2036
    Gold Member
    Xeon06's Avatar
    September 2005
    1,221 Posts
    Much to my chagrin, it seems that Lua wins:

    Reply With Quote Edit / Delete Windows 7 Canada Show Events Disagree x 8Agree x 8Funny x 1Winner x 1Programming King x 1 (list)

  37. Post #2037
    www.bff-hab.de
    Dennab
    February 2009
    7,832 Posts
    So Lua + Love it is then :D

    Edited:

    We should make a game similar to rythm heaven
    Reply With Quote Edit / Delete Windows 7 Germany Show Events Disagree Disagree x 4Agree Agree x 1Programming King Programming King x 1 (list)

  38. Post #2038
    open.gl
    Overv's Avatar
    February 2007
    7,431 Posts
    Much to my chagrin, it seems that Lua wins:
    Don't worry, we both know deep in our hearts that Javascript is vastly superior.
    Reply With Quote Edit / Delete Windows 7 Netherlands Show Events Agree Agree x 14Disagree Disagree x 4Programming King Programming King x 2 (list)

  39. Post #2039
    hOnK :o)
    i300's Avatar
    December 2009
    3,987 Posts
    OK so who is going to start this out? It sounds really fun!
    Reply With Quote Edit / Delete Windows 7 United States Show Events Programming King Programming King x 1 (list)

  40. Post #2040
    BOSSMAN
    leontodd's Avatar
    January 2009
    4,385 Posts
    Xeon06 because he made the poll.
    Reply With Quote Edit / Delete Windows 7 United Kingdom Show Events Programming King Programming King x 1 (list)