Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

  • Days Won


Article Comments posted by Brain

  1. Hi all,

    I'm putting a post here in this article's comments to just warn anyone from using StartSSL/StartCom for their certificates. Their root certificate was removed from most OSes (including windows and linux) and all browsers some years ago, as they are not to be trusted. A quick google will reveal the reasons why, this was not the case in 2015 when i wrote this article.

    For free webserver SSL there is LetsEncrypt, but they do not as of this date support authenticode.

  2. 9 hours ago, Xest said:

    I have a hard time believing many projects that have been around for decades has had anything other than positive enhancements and has consistently avoided technical debt given the very concept of technical debt, and the will to tackle it has only really come to the for over the last decade. The fact legacy projects have decades of cruft in them is precisely why you often replace them, high levels of technical debt creating high maintenance cost, performance bottlenecks, security issues, and so forth are typically rife in legacy software precisely because they were built before we knew how to make better software. If nothing else, I've yet to see a proprietary project over 15 years old that isn't completely and utterly awful, and I've seen many.

    I maintain one right now that is over ten years old and is still maintainable, neat and tidy.

    The thing to aim for isn't to completely throw away and rewrite from scratch, as in the example i posted, but to treat development like painting the forth rail bridge. It should be rewritten a subsection at a time by careful refactoring, with each refactor considered and ensuring that each component is properly isolated and uses proper object oriented design.

    Methodologies such as agile can and do encourage such refactoring but only if time is put aside to do this as the default of agile is to only accept user stories and bugfixes, so features just pile in, repeatedly, along with their bugs.

    By the time you reach the last component and have signed it off, and everything is "rewritten" (read: nicely refactored) you can start again.

    There are even ways to completely change the paradigm of the program, for example switching from a really simple program where design and layout are badly merged together with business logic, to one that uses for example an MVC design.

    I can't confirm that games do this as they're generally more 'disposable', however its plain to see the source code these days for commercial engines (engines having more longevity than the games that are created in them) such as unreal engine and the source for them has been refactored in this way coming all the way from UE3 to the current UE4, without any complete rewrite. You can even run diffs against the code to still find some remaining ancient code, the adage being "if it ain't broke, don't fix it".


  3. Someone else here mentioned the thrill of gutting out the previous Devs code and solving the problems with your own framework, basically a rewrite.

    I haven't worked for a game development company before in a professional capacity however I have and do work as software lead for several large commercial projects.

    In any large, established commercial software project, a complete rewrite is commercial and professional suicide, by rewriting you throw away years or even decades of development, bug fixes, enhancements and tweaks and it's simply a fallacy to think you can just come in, rewrite it from scratch and retain those many decades of development, you're basically back to square one.

    Here is a good example, one of many on Google: https://www.joelonsoftware.com/2000/04/06/things-you-should-never-do-part-i/

    It's pretty much an open source thing, "I can do much better, throw that old crap away, ooh new and shiny!"

    Every now and again we get some rep drop by saying he can improve our bespoke ERP with several decades of development by replacing it with solution X, we immediately know to show him the door without delay.

    Hope this helps someone else before they make such a fundamental mistake (note: don't confuse refactor with rewrite, they're completely different beasts and refactoring is often a great idea...)

  4. Have you ever combined procedural generation with manual design? E.g. using a procedural generator to generate an initial map, saving it and tidying it up and making it less computer generated by letting an artist loose on it? This also has its advantages and disadvantages which would have been good in this article... good work though!

  5. Yes thanks that makes sense :) I tend to treat member variables like properties and allow changing from blueprint. I find it great that both blueprint and C++ integrate so tightly and it makes for really effective game architecture. Do you have any plans to document any other rpg systems as articles? I was planning on doing one on implementing goal oriented action planners in UE4 (as opposed to BTs for AI) but haven't got code I'm happy sharing just yet...

  6. I've voted to not peer review for now based on two issues;


    firstly there are layout issues with the header tags, something is up and they do not display correctly. Secondly, as a massive wall of text and code i find this to be off-putting. Perhaps this should be broken down into separate articles, and/or as others have stated to provide a download of the complete code, replacing the snippets with pseudocode and diagrams.


    With generic enough pseudocode, the concepts here could be re-implemented in other libraries than SDL quite easily by someone with experience in network programming.


    I will be happy to change my vote to peer reviewed if these issues can be rectified!

  7. Thanks everyone for your feedback, i have amended the article based on discussions here.


    If anyone has any further input i would be happy to hear it.


    @Slayemin, thanks, I was aware of these assets in the open world demo. They are very large though, and it seems that unless i have a GTX Titan and a monster rig, using this in a game and having many thousands of them isnt something i can get right and get performing well. I would be interested in seeing if anyone has ever used these assets in a well-performing open world game outside the kite demo.


    The problem I have with this technique is that the trees look like shit.


    I concur. They do look like shit.


    Here's the quality bar for trees in UE4. (snip)



    Looking at the video these trees are beautiful. There aren't many of them in the scene though. I wonder how powerful your machine would need to be to draw an entire realistic sized forest of them?


    Note that as slayemin indicates (as i understand it) you could use this method to have a billboard as the lowest detail LOD in your LOD chain for static mesh trees. This would be best of both worlds in my opinion.

  9. (my guess would be that the billboards are sufficiently far away that the closer polygonal trees catch the users attention instead).


    This is exactly correct. The billboarded trees are so far away that they can't be distinguished from the models.


    I am using a poor quality tree model in my game (i am restricted to what i can find for free on opengameart for example and don't have speetree) and as stated in the article the quality of the result is directly related to the quality and detail of the mesh you take images of, and the resolution of the image you use.


    Below is a side by side comparison of shaded, lit trees vs unlit billboards:


    Below is an image of the trees at the resolution and size they are designed to be viewed at. The view below contains a mix of meshes (at close range) and billboards (at distant range). It is difficult to tell the two apart, and with high quality images and meshes, the effect would be far superior:
    Do these perhaps belong in the article?


  10. Thanks for the response!


    It would also be clever if when two AI pawns meet in the map, they pause for a few seconds, animation showing they're talking and or gesturing to each other. At this point they exchange known lists of memory markers.


    Basically they talk to each other and share your location so they can gang up on you... :)

  11. It turns out i'm already using this in my game, but havent ever put a name to it.


    This concept of memory markers is a great idea, and does lead for interesting cover-based cat and mouse and trying to get out of the enemies site cone and not make sound so that they just keep looking around where they last saw you.


    I do have a couple of questions; firstly, can this be extended by having a list of memory markers for each NPC, so that in the event there is no player in sight around the most recent memory marker he could start back-tracking along the others, looking where it's seen you in past encounters?


    Secondly, have you tried combining this with audio cues?


    In my game, i am doing so - basically if the NPC hears a sound and cannot see the player, it sets that position as its new 'memory marker' and moves to it. It might be that this sound was purposefully created by the player, e.g. by setting off an explosive spell, or it might even be that the sound was created by an NPC. In the event that the NPC then sees the player on its journey to that sound's location, it engages persuit. If it doesnt find the player there this can be a useful evasion tactic.


    Great article, short and to the point. I also wish more game developers were using this trick too.

  12. Today the primary uses of C++ volatile are (1) unusual hardware values that change behind your back, like a sensor that operates by setting a memory value, (2) unusual hardware that modifies your values after write, such as hardware that automatically clamps values within a range, and (3) unusual memory that has multiple addresses for the same object, which was once common but modern flat memory models have nearly eliminated.


    One place where you will see volatile used in C++ is in operating systems development, most of the memory mapped registers and ranges used by drivers are volatile for this reason as the might read or write those values but hardware can set them too. This falls under your use case (1) about values changing behind your back, but i wouldn't class PC hardware as particularly unusual, just not a known use case for most application developers who deal in higher level abstractions.

  13. This might be of interest to anyone using this article.


    You can also integrate msbuild with your release builder script, to compile the release binary prior to packaging it:


    @echo off
    @echo Setting environment...
    call "C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools\VsDevCmd.bat"
    @echo Compiling program
    cd ..
    msbuild.exe /maxcpucount:6 /property:Configuration=Release
    if errorlevel 1 goto errorDone
    cd Installer
    @echo Building installer...
    "C:\Program Files (x86)\Inno Setup 5\iscc.exe" installscript.iss
    if errorlevel 1 goto errorDone
    @echo Signing installer...
    "C:\Program Files (x86)\Windows Kits\8.0\bin\x64\signtool.exe" sign /d "Your Game Na,e" /t http://timestamp.verisign.com/scripts/timstamp.dll /a ..\Release\yourgame-installer.exe
    if errorlevel 1 goto errorDone
    @echo Uploading installer...
    scp -v -i J:/private.key ../Release/fwf-earlyaccess.exe user@internethost.com:/path/to/directory/


    This also adds a bit of error checking.


    Enjoy! :D

  14. @Endurion, If you go to startssl.com you can register for free and get fully recognised server certificates and email certificates. I used these for years until I also needed to do code signing which is where you start paying. You can find lots of tutorials on the Web about how to install that free certificate. Stay away from cacert though as their certificates although free are not properly recognised by windows. Have fun!



  15. I would like to see further use cases too, maybe some stuff on alignment declarations for structs and classes,also how alignment is important for various types of special values such as sse intrinsics (XMMATRIX and friends) It would also be good to see a section on where it is important to not align structs and how to do it, e.g. #pragma pack for network transmitted and disk stored structs. Apart from that a good article with promise. Looking forwards to future revisions!

  16. [quote name="Joshhua5" timestamp="1426813614"][quote name="braindigitalis" timestamp="1426780063"] This sounds a bit less tidy than the directx way. What do you do if it's an intel card for example?   Surely there is a more portable way? [/quote]   There isn't that I know of, OpenGL doesn't provide information about the memory usage on the GPU, the only way we're able to know is due to vendor specific extensions and I don't think Intel has such an extension or at least that I can find.[/quote] It sounds to me like on windows you might be best using my method If you wanted to check video ram then, and then instantiate opengl afterwards? At least the DirectX way cooperates with all known hardware... As for other platforms I bet you could get this information from /proc on Linux...
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!