1. Post #121
    Gold Member
    danharibo's Avatar
    July 2006
    4,498 Posts
    Very nice! There's just one thing holding back the next chapter right now, which is introducing a new scene to work with to introduce the appliances of the stencil buffer.

    If I want to draw a plane with a cube on it, do you think it's acceptable to just link to a file with with the vertex array and element arrays in it and explain that it draws the cube? So, basically treating it as a hardcoded model instead of a specifying how the cube is made.
    Well that might be an option, you could introduce Assimp but that's quite a big jump.

    Model loading could be an extra chapter, but for the purposes of a scene I'd say that giving the arrays for the models would be fine.
    Reply With Quote Edit / Delete Linux United Kingdom Show Events Agree Agree x 1 (list)

  2. Post #122
    This title has been removed due to a copyright claim from Viacom Inc.
    neos300's Avatar
    July 2008
    3,489 Posts
    I'd like to see this go somewhere. What are you planning the distro to be like?
    This is a little bit of a late reply but I'm trying to make gentoo but with binary packages.
    Reply With Quote Edit / Delete Linux United States Show Events

  3. Post #123
    RUBY OVERLORD
    swift and shift's Avatar
    November 2011
    2,115 Posts
    This is a little bit of a late reply but I'm trying to make gentoo but with binary packages.
    http://archlinux.org
    Reply With Quote Edit / Delete Mac Australia Show Events Agree Agree x 9Funny Funny x 1Winner Winner x 1 (list)

  4. Post #124
    This title has been removed due to a copyright claim from Viacom Inc.
    neos300's Avatar
    July 2008
    3,489 Posts
    I'm aware.

    It's more of a learning experience than anything, plus in my distro you have to configure your own kernel (until I figure out how to stick everything in one kernel config that will support everything)
    So I guess it's more like arch with a DIY kernel.
    Reply With Quote Edit / Delete Linux United States Show Events Programming King Programming King x 2 (list)

  5. Post #125
    dajoh's Avatar
    March 2011
    625 Posts
    Been working on C++ library for interfacing with the Steam servers:





    #include <cstdio>
    #include <Rain/IClient.hpp>
    
    
    int main(int argc, char *argv[])
    {
    	Rain::IClient *steamClient = Rain::CreateClient();
    	Rain::IUser *steamUser = steamClient->GetUser();
    	Rain::IFriends *steamFriends = steamClient->GetFriends();
    
    
    	if(!steamClient->Connect())
    	{
    		Rain::DestroyClient(steamClient);
    		return 1;
    	}
    	else
    	{
    		steamUser->LogIn("snip", "snip"");
    	}
    
    
    	steamUser->OnLoginResult.Add([=](Rain::LoginResult result)
    	{
    		steamFriends->SetPersonaName("DVNO");
    		steamFriends->SetPersonaState(Rain::PersonaState_Online);
    		steamFriends->JoinRoom(103582791430091926);
    	});
    
    
    	steamFriends->OnRoomMessage.Add([=](Rain::RoomMessage msg)
    	{
    		printf("Got message: %s\n", msg.message.c_str());
    	});
    
    
    	while(steamClient->IsConnected())
    	{
    		steamClient->Think(true); // true = block
    	}
    
    
    	Rain::DestroyClient(steamClient);
    	return 0;
    }
    


    Note that Rain won't be the library's final name, turns out there's already a Steam related library called that, so I'm going to change it before I put it up on GitHub.
    Edit: For the people that don't know what SteamKit is, it's an independent library (doesn't require the Steam client to be running, unlike OpenSteamworks) to interface with the Steam servers. SteamKit however, is written in C#, and there's a lot of people out there who want a C++ version of it.
    Reply With Quote Edit / Delete Windows 8 Sweden Show Events Winner Winner x 27Dumb Dumb x 2Programming King Programming King x 2 (list)

  6. Post #126
    Gold Member
    Lexic's Avatar
    March 2009
    6,123 Posts
    ^ We definitely didn't spend half an hour trying to get those six words right.

    Incidentally, has anyone got a good/simple/free program for recording video from your desktop? Basically Fraps.
    I'm not interested in making huge screencasts, just short gifs of stuff.
    Reply With Quote Edit / Delete Windows 7 United Kingdom Show Events Agree Agree x 2 (list)

  7. Post #127
    RUBY OVERLORD
    swift and shift's Avatar
    November 2011
    2,115 Posts
    ^ We definitely didn't spend half an hour trying to get those six words right.

    Incidentally, has anyone got a good/simple/free program for recording video from your desktop? Basically Fraps.
    I'm not interested in making huge screencasts, just short gifs of stuff.
    camstudio
    Reply With Quote Edit / Delete Mac Australia Show Events Agree Agree x 4Useful Useful x 1 (list)

  8. Post #128
    This title has been removed due to a copyright claim from Viacom Inc.
    neos300's Avatar
    July 2008
    3,489 Posts
    -nevermind was a weird bug in my code-

    Edited:

    Hm. So I got my package manager install linux headers, but there's a weird bug, demonstrated here:

    As you can see by the blue text, it's the folders that are symlinked, not the actual files in the folders, which could be a problem if 2 packages decide to put files in the same folder.
    Looks like I just need to specify the sub directories explicitly, otherwise bad stuff will happen

    Edited:

    or not, ln has a recursive mode

    Edited:

    nevermind, same problem as before.
    Reply With Quote Edit / Delete Linux United States Show Events Useful Useful x 1 (list)

  9. Post #129
    wow, edge detection..........

    Reply With Quote Edit / Delete Windows 7 Netherlands Show Events Winner Winner x 2Artistic Artistic x 1Zing Zing x 1Informative Informative x 1 (list)

  10. Post #130
    Andrew McWatters
    Dennab
    March 2011
    4,658 Posts
    so edgy
    Reply With Quote Edit / Delete Windows 7 United States Show Events Funny x 19Zing x 5Useful x 3Late x 2Winner x 2Optimistic x 2Informative x 2Friendly x 2Disagree x 2Programming King x 1Agree x 1Dumb x 1Artistic x 1 (list)

  11. Post #131
    This title has been removed due to a copyright claim from Viacom Inc.
    neos300's Avatar
    July 2008
    3,489 Posts

    Hooray, I got it to work!
    Reply With Quote Edit / Delete Linux United States Show Events Informative Informative x 2Friendly Friendly x 1Winner Winner x 1Programming King Programming King x 1 (list)

  12. Post #132
    BMCHa's Avatar
    August 2007
    856 Posts
    ^ We definitely didn't spend half an hour trying to get those six words right.

    Incidentally, has anyone got a good/simple/free program for recording video from your desktop? Basically Fraps.
    I'm not interested in making huge screencasts, just short gifs of stuff.
    Recent version of MSI Afterburner can do that. You just need to make sure it's not hooking into any programs (click the "i" on the main window), then if you use the screenshot or video recording functions it'll capture the desktop. This video http://www.facepunch.com/threads/116...=#post34871939 was recorded with afterburner and then cropped down to just the game window in virtualdub.
    Reply With Quote Edit / Delete Windows 7 United States Show Events

  13. Post #133
    Mr Kirill's Avatar
    January 2008
    333 Posts
    And I'm back to spam this thread with some more of my programs (I hope you don't mind!). This might be my most used application yet - KirAnnotator, a simple software for quick image editing.

    One of the main reasons why it's useful is that you can immediately use the screenshot you made with "Print Screen" and crop/edit/annotate it and export in seconds. The program is very lightweight and launches quickly, so it's a great choice for quick crops and edits.

    Here's a video:


    And here's the page I just published with full list of features, hot keys, FAQ and more:

    www.kircode.com/kirannotator

    Enjoy! Feedback/criticism appreciated!
    Reply With Quote Edit / Delete Windows 7 Latvia Show Events Winner Winner x 3Informative Informative x 1Artistic Artistic x 1 (list)

  14. Post #134
    Gold Member
    Jookia's Avatar
    July 2007
    6,768 Posts
    Incidentally, has anyone got a good/simple/free program for recording video from your desktop? Basically Fraps.
    I'm not interested in making huge screencasts, just short gifs of stuff.
    Fraps + Aero?
    Reply With Quote Edit / Delete Linux Australia Show Events Agree Agree x 2 (list)

  15. Post #135
    Gold Member
    ZenX2's Avatar
    February 2009
    5,119 Posts
    That look pretty cool! The only thing it's missing is labels for the tabs.

    Edited:

    I just added one-way platforms that you can drop through into my game. That means it's that much closer to being an actual platformer!
    Reply With Quote Edit / Delete Windows 7 United States Show Events

  16. Post #136
    Gold Member
    Matte's Avatar
    July 2009
    424 Posts
    Just thought I might post this here too.
    We have made much progress on our voxel engine (besides ray tracing). And after a much-needed break from the GLSL hell that is ray tracing optimization, the engine is now bit by bit becoming scriptable through Lua.
    I have started to move things that should be scripted over to Lua (like the GUI), so that it's not hard coded in the engine anymore, and can be changed/tweaked without having to recompile the entire project.



    Here is a quick screenshot of how the engine currently looks. The compass, crosshair and rudimentary inventory are all scripted with Lua.

    I have also started to make a gamemode framework so it won't be hard to make new gamemodes (much like Garry's Mod). We are making progress on a Form framework similar to Garry's Mod's Derma, as well.

    The FPS could be better, but that is in the domain of ray tracing optimization, and as I mentioned, we sorely need a break from that. Though, after looking again at Ken Silverman's advice, we do have ideas on how we might gain a considerable amount.

    Edited:

    BTW: If you want more frequent updates, check out our thread.
    Reply With Quote Edit / Delete Windows 7 Norway Show Events Winner Winner x 11Friendly Friendly x 1Informative Informative x 1 (list)

  17. Post #137
    Ramdac's Avatar
    June 2012
    47 Posts
    Gah, yesterday my external hdd decided to fail, so i couldnt get my old input wrapper. And today when i rewrote it VS decided to screw me, but now after a couple of non constructive extra hours I got some basic camera movement.
    Dont know what to do next, fixing my timer library would be good, but I will probably start writing on a .bsp loader since its more fun to fly around on a complete map then staring at a palm tree :)
    Reply With Quote Edit / Delete Windows 7 Sweden Show Events

  18. Post #138

    January 2012
    421 Posts
    Gah, yesterday my external hdd decided to fail, so i couldnt get my old input wrapper. And today when i rewrote it VS decided to screw me, but now after a couple of non constructive extra hours I got some basic camera movement.
    Dont know what to do next, fixing my timer library would be good, but I will probably start writing on a .bsp loader since its more fun to fly around on a complete map then staring at a palm tree :)
    Depending on how your drive failed, you could probably recover some data.
    Reply With Quote Edit / Delete Windows 7 Canada Show Events Optimistic Optimistic x 1Friendly Friendly x 1 (list)

  19. Post #139
    Ramdac's Avatar
    June 2012
    47 Posts
    Depending on how your drive failed, you could probably recover some data.
    The drive seems ok, was probably just windows, i could browse all the folders but not any files, worked again after a reeboot(i hate reboots).
    Reply With Quote Edit / Delete Windows 7 Sweden Show Events

  20. Post #140
    Gold Member

    October 2008
    3,838 Posts
    ... the engine is now bit by bit becoming scriptable through Lua.
    Are you using LuaInterface for the scripting? In that case you should be aware that the game won't run on Linux/Mac because it uses mixed .NET and native 32-bit Windows code, instead of P/Invoke. I've had problems with this before, which is why I decided to use Javascript scripting with Jint instead. See http://stackoverflow.com/questions/1...-on-mono-linux

    Alternatively you might want to use https://github.com/jsimmons/LuaSharp instead, but that seems to be still in development.
    Reply With Quote Edit / Delete Windows 7 United States Show Events

  21. Post #141
    Gold Member
    ZenX2's Avatar
    February 2009
    5,119 Posts
    Hnnng now I have the ability for multiple control configurations, I love progress
    Reply With Quote Edit / Delete Windows 7 United States Show Events

  22. Post #142
    Gold Member
    Jookia's Avatar
    July 2007
    6,768 Posts
    Though, after looking again at Ken Silverman's advice, we do have ideas on how we might gain a considerable amount.
    Ken Silverman is the best.
    Reply With Quote Edit / Delete Linux Australia Show Events Agree Agree x 1 (list)

  23. Post #143
    origamiguy's Avatar
    September 2011
    181 Posts
    Thanks to GBDK I've been taking a look at GameBoy homebrew:

    Reply With Quote Edit / Delete Windows 7 United Kingdom Show Events Winner Winner x 17Optimistic Optimistic x 3Useful Useful x 1 (list)

  24. Post #144
    BAZ
    Dav0r, buy me a custom title. I'm far too poor ;_;
    BAZ's Avatar
    July 2005
    12,630 Posts
    I got it working in the most fucked up, retarded way possible. Seriously, my code is retarded-ly stupid, and these are horrible, unstable orbits.
    I noticed when I programmed the same thing a few years back that it was almost impossible to get a good orbit going.

    It was possible elliptically, but still difficult.

    Edited:

    It's the same situation with real solar systems too.
    Reply With Quote Edit / Delete Windows 7 United Kingdom Show Events Friendly Friendly x 1 (list)

  25. Post #145
    DubsHelix's Avatar
    June 2012
    52 Posts
    I noticed when I programmed the same thing a few years back that it was almost impossible to get a good orbit going.

    It was possible elliptically, but still difficult.
    I got it almost perfect last night :D
    Reply With Quote Edit / Delete Windows 7 United States Show Events

  26. Post #146
    Gold Member
    Darwin226's Avatar
    January 2009
    4,158 Posts
    I noticed when I programmed the same thing a few years back that it was almost impossible to get a good orbit going.

    It was possible elliptically, but still difficult.

    Edited:

    It's the same situation in real planets too.
    Unless you use real numbers. In that case it works immediately.
    Reply With Quote Edit / Delete Windows 7 Croatia Show Events Agree Agree x 2 (list)

  27. Post #147
    Ask Rohan about rust keys!
    Bumrang's Avatar
    August 2011
    2,853 Posts


    Finally.
    Reply With Quote Edit / Delete Linux United States Show Events Artistic Artistic x 2 (list)

  28. Post #148
    Gold Member
    s0ul0r's Avatar
    September 2006
    993 Posts
    Started an isometric tower defense, got some game ideas, but first I thought about which art style it should be and how to do the rendering etc...
    For now I have the 2.5D method where each sprite has a diffuse, height and normal map:



    I know the lighting is not completely right, but it's just a test :>

    Oh, it's in XNA.
    Reply With Quote Edit / Delete Windows 7 Germany Show Events Programming King Programming King x 5Winner Winner x 1Artistic Artistic x 1 (list)

  29. Post #149
    Person
    geel9's Avatar
    June 2008
    5,736 Posts
    Oh, it's in XNA.
    Somebody has to say it.
    Reply With Quote Edit / Delete Windows 8 United States Show Events Dumb Dumb x 9Disagree Disagree x 3 (list)

  30. Post #150
    origamiguy's Avatar
    September 2011
    181 Posts
    The classic bouncing box demo. Took longer than expected because I missed the note in the documentation that says the top-left pixel is at (8,16) rather than (0,0). As such I was drawing offscreen and couldn't figure out why nothing was showing up.

    Reply With Quote Edit / Delete Windows 7 United Kingdom Show Events Optimistic Optimistic x 3Winner Winner x 2 (list)

  31. Post #151
    www.bff-hab.de
    Dennab
    February 2009
    7,832 Posts
    Aww you cut it off before it perfectly hit the corner
    Reply With Quote Edit / Delete Windows 7 Germany Show Events Funny Funny x 20Agree Agree x 4Informative Informative x 1 (list)

  32. Post #152
    Andrew McWatters
    Dennab
    March 2011
    4,658 Posts
    Aww you cut it off before it perfectly hit the corner
    I, too, heard the collective sigh before we all left the room.

    Edited:

    Double posting because it's relevant to some programming that I can actually share, I guess.

    So if you've been browsing LMAO Pics today, this went on:

    Is that a fucking facepunch watermark
    Someone should make an auto-watermark script or something for these pictures.
    This wouldn't be too hard for any of us down in the Programming subforum to accomplish. I might take it on later today, but I have two clients to juggle with a third one coming up soon.

    The basic method for this is to copy a set of templated layers over to an extended canvas to produce an end result like this:



    So since all different images have different dimensions, you need to make sure everything is relative to where it needs to be (left, right, so on).

    To do this, we place down the background first, then take the rest of the composite and layer them on using an image library.

    The sprite used for the template above would look like this:



    Put them all together, and you've got a watermark system similar to what's deployed at these other humor sites.

    Now that I think about it, I doubt most of them even wrote their own software to do this.
    And while this went on:

    It wasn't actually generated, until I wrote the script for it later in the day.

    So yeah, today I developed software that makes images on Facepunch even less funny than normal... which is saying something.

    Here's the download link: http://www.mediafire.com/?fsncf4ffam2g775

    GD is a pretty cool library, yo.
    Reply With Quote Edit / Delete Windows 7 United States Show Events Programming King Programming King x 6Friendly Friendly x 1 (list)

  33. Post #153
    Gold Member
    s0ul0r's Avatar
    September 2006
    993 Posts
    Just found out that the reason why the lighting is incorrect, because the normal maps I use are rendered in camera (screen-) space, but I need to have them rendered in world space, so that no matter from which angle I render, up f.e. is always the same color.
    Does anyone know how to do that in blender?
    Reply With Quote Edit / Delete Windows 7 Germany Show Events

  34. Post #154
    chimitos's Avatar
    September 2010
    2,370 Posts


    I had all sorts of fun today getting texture alpha's to play nice with sprite depth.
    I ended up just turning off depth-testing, and manually sorting all of the draw calls.

    Now I can call the draw functions in any order, and have them be in the correct sequence.
    ~50% speed improvement too!
    Reply With Quote Edit / Delete Windows 7 United States Show Events Programming King Programming King x 1 (list)

  35. Post #155
    Gold Member
    dije's Avatar
    December 2008
    4,759 Posts
    I need to tweak this a bit so that the FOV of the light rendered on the scene corresponds to what I rendered to the framebuffer and then to the texture:

    Reply With Quote Edit / Delete Windows 7 Sweden Show Events

  36. Post #156
    Gold Member
    Matte's Avatar
    July 2009
    424 Posts
    Are you using LuaInterface for the scripting? In that case you should be aware that the game won't run on Linux/Mac because it uses mixed .NET and native 32-bit Windows code, instead of P/Invoke. I've had problems with this before, which is why I decided to use Javascript scripting with Jint instead. See http://stackoverflow.com/questions/1...-on-mono-linux

    Alternatively you might want to use https://github.com/jsimmons/LuaSharp instead, but that seems to be still in development.
    Ah, I didn't know that. Yes, we're using LuaInterface. We have gotten some tips about LuaJIT, though, so we might look into migrating to that.

    Ken Silverman is the best.
    He sure is.
    Reply With Quote Edit / Delete Windows 7 Norway Show Events

  37. Post #157
    Crescent fresh
    Perl's Avatar
    January 2011
    1,034 Posts
    woo, isometric rendering with proper tile size accounting

    fucking finally

    Reply With Quote Edit / Delete Windows 7 Estonia Show Events Winner Winner x 6 (list)

  38. Post #158
    Gold Member
    Jookia's Avatar
    July 2007
    6,768 Posts
    I need to tweak this a bit so that the FOV of the light rendered on the scene corresponds to what I rendered to the framebuffer and then to the texture:

    When I first saw this I thought I saw something weird about it, then I realized that it was because everything else wasn't illuminated. But just now I realized that it's because the back of the cube is illuminated.
    Reply With Quote Edit / Delete Linux Australia Show Events

  39. Post #159
    Gold Member
    s0ul0r's Avatar
    September 2006
    993 Posts
    Now this looks alot better:


    Had to bake the normals in world space to a texture and assign it...
    (The light is right in the middle of the screen)
    Reply With Quote Edit / Delete Windows 7 Germany Show Events Artistic Artistic x 4Agree Agree x 1 (list)

  40. Post #160
    Crescent fresh
    Perl's Avatar
    January 2011
    1,034 Posts


    Now with bricks and more than one Z level!
    And as an accidental bonus, proper drawing order

    edit:

    fort-tower-thing
    Reply With Quote Edit / Delete Windows 7 Estonia Show Events Artistic Artistic x 28Programming King Programming King x 2Winner Winner x 1 (list)