Jump to content
  • Advertisement

Search the Community

Showing results for tags 'Open Source'.

The search index is currently processing. Current results may not be complete.


More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Categories

  • Audio
    • Music and Sound FX
  • Business
    • Business and Law
    • Career Development
    • Production and Management
  • Game Design
    • Game Design and Theory
    • Writing for Games
    • UX for Games
  • Industry
    • Interviews
    • Event Coverage
  • Programming
    • Artificial Intelligence
    • General and Gameplay Programming
    • Graphics and GPU Programming
    • Engines and Middleware
    • Math and Physics
    • Networking and Multiplayer
  • Visual Arts
  • Archive

Categories

  • Audio
  • Visual Arts
  • Programming
  • Writing

Categories

  • Game Developers Conference
    • GDC 2017
    • GDC 2018
  • Power-Up Digital Games Conference
    • PDGC I: Words of Wisdom
    • PDGC II: The Devs Strike Back
    • PDGC III: Syntax Error

Forums

  • Audio
    • Music and Sound FX
  • Business
    • Games Career Development
    • Production and Management
    • Games Business and Law
  • Game Design
    • Game Design and Theory
    • Writing for Games
  • Programming
    • Artificial Intelligence
    • Engines and Middleware
    • General and Gameplay Programming
    • Graphics and GPU Programming
    • Math and Physics
    • Networking and Multiplayer
  • Visual Arts
    • 2D and 3D Art
    • Critique and Feedback
  • Community
    • GameDev Challenges
    • GDNet+ Member Forum
    • GDNet Lounge
    • GDNet Comments, Suggestions, and Ideas
    • Coding Horrors
    • Your Announcements
    • Hobby Project Classifieds
    • Indie Showcase
    • Article Writing
  • Affiliates
    • NeHe Productions
    • AngelCode
  • Topical
    • Virtual and Augmented Reality
    • News
  • Workshops
    • C# Workshop
    • CPP Workshop
    • Freehand Drawing Workshop
    • Hands-On Interactive Game Development
    • SICP Workshop
    • XNA 4.0 Workshop
  • Archive
    • Topical
    • Affiliates
    • Contests
    • Technical
  • GameDev Challenges's Topics
  • For Beginners's Forum

Calendars

  • Community Calendar
  • Games Industry Events
  • Game Jams
  • GameDev Challenges's Schedule

Blogs

There are no results to display.

There are no results to display.

Product Groups

  • GDNet+
  • Advertisements
  • GameDev Gear

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


About Me


Website


Role


Twitter


Github


Twitch


Steam

Found 57 results

  1. I have prepared a video tutorial that explains how you can make a game in 5 minutes with LGCK builder. This small video is a quick introduction to use this amazing tool that can be used to make any kind of 2D games. https://www.youtube.com/watch?v=lN3gkZWr-PM&t=2s Okay, You have watched the video and still have questions. Maybe you want to create a top down 2D map. There is an option to disable gravity on each given level. You simply right-click your level in the Toolbox and select Edit Level. On the Advanced tab, there is a no gravity checkbox. There are two main requirements for a given level to work. First, you must include a Player Sprite. This is easily solved by creating it with the Sprite Wizard and drag & dropping your player into your newly created level. Second, you need at least one goal. The easiest way to solve that problem is use the Sprite Wizard and select Object as the sprite type. There is a checkbox called Automatic goal that you can check and this will mark any instance of this sprite as an objective going toward the completion of the level. Objects die when they are touched by the player and you can set several options including points, health rewards and sound to play by right clicking your object and selecting Edit Sprite. If you didn't check automatic goal, you can always right click on any of those Sprites on your level and select Customize in the context menu. Once you are in the property box just check the attribute Goal. If you don't have sprites of your own, LGCK builder comes with some sprites in the tutorial folder. It also comes with a sample demo game that highlight some of the engine capabilities and how to use the event model to do some neat tricks (like breakable bridges, animated lava, or squares that change colors when you step on them etc.). You can find more sprites and sounds here: https://sourceforge.net/projects/lgck/files/Resources/ Please note that many of the sprites you can find on the web come in the form of sprite sheets. LGCK builder can import most of them with minimal intervention. Go to File, Import, Import Images. Click the + button to add a new png file. Once the sprite sheet is in the box, right click on it and select Split image from the context menu. You'll be given the choice of picking the right tile size (16x16, 24x24, 32x32 etc.). If you need to edit this image set further, LGCK builder IDE comes with it's own Sprite Editor. You can download LGCK builder from freewarefiles: https://www.freewarefiles.com/Lgck-Builder-Game-Construction-Kit-_program_112323.html You can find more information at the official site: https://cfrankb.com/lgck
  2. I have prepared a video tutorial that explains how you can make a game in 5 minutes with LGCK builder. This small video is a quick introduction to use this amazing tool that can be used to make any kind of 2D games. https://www.youtube.com/watch?v=lN3gkZWr-PM&t=2s Okay, You have watched the video and still have questions. Maybe you want to create a top down 2D map. There is an option to disable gravity on each given level. You simply right-click your level in the Toolbox and select Edit Level. On the Advanced tab, there is a no gravity checkbox. There are two main requirements for a given level to work. First, you must include a Player Sprite. This is easily solved by creating it with the Sprite Wizard and drag & dropping your player into your newly created level. Second, you need at least one goal. The easiest way to solve that problem is use the Sprite Wizard and select Object as the sprite type. There is a checkbox called Automatic goal that you can check and this will mark any instance of this sprite as an objective going toward the completion of the level. Objects die when they are touched by the player and you can set several options including points, health rewards and sound to play by right clicking your object and selecting Edit Sprite. If you didn't check automatic goal, you can always right click on any of those Sprites on your level and select Customize in the context menu. Once you are in the property box just check the attribute Goal. If you don't have sprites of your own, LGCK builder comes with some sprites in the tutorial folder. It also comes with a sample demo game that highlight some of the engine capabilities and how to use the event model to do some neat tricks (like breakable bridges, animated lava, or squares that change colors when you step on them etc.). You can find more sprites and sounds here: https://sourceforge.net/projects/lgck/files/Resources/ Please note that many of the sprites you can find on the web come in the form of sprite sheets. LGCK builder can import most of them with minimal intervention. Go to File, Import, Import Images. Click the + button to add a new png file. Once the sprite sheet is in the box, right click on it and select Split image from the context menu. You'll be given the choice of picking the right tile size (16x16, 24x24, 32x32 etc.). If you need to edit this image set further, LGCK builder IDE comes with it's own Sprite Editor. You can download LGCK builder from freewarefiles: https://www.freewarefiles.com/Lgck-Builder-Game-Construction-Kit-_program_112323.html You can find more information at the official site: https://cfrankb.com/lgck View full story
  3. So, I developed an engine a while back following ThinMatrix's tutorials and it worked perfectly. However, upon trying to create my own simple lightweight game engine from scratch, I hit a snag. I created an engine that only wants to render my specified background color, and nothing else. I first tried to render just one cube, and when that failed I figured that i probably just had the incorrect coordinates set, so I went and generated a hundred random cubes... Nothing. Not even a framerate drop. So I figure that they aren't being passed through the shaders, however the shaders are functioning as I'm getting no errors (to my knowledge, I can't be sure). The engine itself is going to be open source and free anyways, so I don't mind posting the source here. Coded in Java, using OpenGL (from LWJGL), and in Eclipse (Neon) format. Warning: When first running the engine, it will spit out an error saying it couldn't find a config file, this will then generate a new folder in your %appdata% directory labeled 'Fusion Engine' with a Core.cfg file. This file can be opened in any old text editor, so if you aren't comfortable with that just change it in the source at: "src/utility/ConfigManager.java" before running. Just ask if you need more info, please I've been trying to fix this for a month now. Fusion Engine V2.zip
  4. JSCF is an open source, lightweight 2D canvas library based on vanilla JS and CanvasInput. Its approach is to allow extendibility while adhering to concepts from popular engines like Unity. It's still in prototype and is looking to get help and feedback from programmers. Check it out at https://github.com/g--o/JSCF. Update: now added API docs! (working with jsdoc)
  5. Hi, I'm currently working on a lightweight 2D canvas library called JSCF. It's got a lot of cool features but is still in prototype and I'd be glad to have more hands on this project + getting some feedback from programmers like you. This is an open-source project so no rev involved at all, but I think anyone knowledgable or interested in getting involved with a cool native JS 2D engine is welcome. For full feature list, contribution, prototype build and more please visit the github repo here: https://github.com/g--o/JSCF Thanks for reading ūüėÉ
  6. JSCF is an open source, lightweight 2D canvas library based on vanilla JS and CanvasInput. Its approach is to allow extendibility while adhering to concepts from popular engines like Unity. It's still in prototype and is looking to get help and feedback from programmers. Check it out at https://github.com/g--o/JSCF. Update: now added API docs! (working with jsdoc) View full story
  7. Hello everyone! First time posting in the forum. I've just completed my first game ever ( C++ / SDL ), and I am feeling utterly proud. It is a small game resembling Missile Command. The code is a mess, but it is my mess! In the process of making the game, I developed my own little game engine. My question is, where would be a good place to spread the news to at least get some people to try the game?
  8. This is a rescore of several Sin scenes from Final Fantasy X, put into an epic cinematic with accompanying, original soundtrack!
  9. I've just finished a proof-of-concept and I'm looking for feedback. The world takes place in a terminal and the user hacks through systems for some end goal (the first scenario is to hack your way through a network and kill a drone passenger by killing the drone's autopilot). The user discovers/purchases exploits (future) which can then be used on systems to gain control over them. One of the areas I find difficult is balancing measures vs. counter-measures, though this simple prototype doesn't get there yet. Levels will be defined by networks that have collections of interconnected systems that can be hacked, allowing access to systems deeper in the network (the target). It's developed in C on Linux (using ncurses). The image shows illustrates a sample scenario for stealing bitcoin from a system. Full source is available at https://github.com/mtimjones/spectre. Thanks, Tim.
  10. So I'm making this basic 2D engine using Haxe Kha, and i just need to integrate some physics. Just basic collision detection and gravity on basic shapes, nothing too detailed. But i want to try not to write it myself, so i just want suggestions on what open source phyisics engines i could use, and that wont be impossible to integrate. Thanks in advance.
  11. Hi! So, I've recently thought of a nice twist to a hack and slash-type zombie game that I'd love to make (mostly so that no one can steal the idea I'm not gonna elaborate to much on the story, but that should be no issue to help me, I think). But my problem here is that I have little to no knowledge of coding. I AM willing to learn, but I'd rather not have to develop 50 games before I've learned how to develop the game I actually wanna make. I'm just a hobbyist. I don't have that kind of endurance for this. The game I'm looking to develop is basically just your typical Player having to fight their way through masses of zombies in a city towards a certain safe place, going from location (check-point) to location. The only controls I really want for the player to have are: -to interact with objects (like talk to people aka trigger a dialogue or cutscene, pick up objects like weapons, have commentary appear when interacting with something (like the player clicking on a corpse and triggering the player thinking "Please, don't attack me to. ... Thank you very much, Sir.". All of this could be established with simply triggering a cutscene though.), -move with the arrow keys or ASWD, -have a health bar (not necessarily displayed, I just want the player to actually be able to die if they get gnawed by too many zombies) -and hack away at zombies coming towards the player. Just let out all your frustration by bashing in their faces, maybe have a satisfyingly-bloody animation when they die. -Hopefully have companion characters fight zombie hordes with you. (Although I could get creative and find excuses not to have the side-characters fight with you) -No jumping required. -Inventory would be nice but not necessary either. -Saving your current game progression manually would be great, but could be done with check-points, too. Primary focus of the game would be just having fun hacking away at zombies and getting to know the characters, who I hope to make worth getting to know. I've been researching the internet for game engines for weeks now but I haven't really found one that seemed helpful to me, mostly because the reviews are full of vocabulary that as an absolute newbie I understand none of. So, whenever I read the cons for an engine in the review I understand very little of it. Although an engine that requires absolutely no coding and still be able to perform all of this would be an absolute dream come true, I believe that's quite impossible to find. The only non-coding engines I've come across so far are absolute garbage due to limits, buggy, underdeveloped, or abandoned by their creators. I'm willing to learn coding, I'm not afraid of it as long as there are tutorials and templates out there, too. As I'm a hobbyist I'd rather not pay for an engine or to export my game. I'm most-likely not going to sell my game for money and if I do it won't be expensive at all no matter how much time I'd invest in it. Obviously the game would need to either be open source or let me publish and distribute the game freely. The only game engine I've found so far that I believe I'd understand is Adventure Game Studio, but I haven't used it much yet, just watched a couple tutorials on youtube. But it's a point-and-click only engine as it seems so it won't be of much help for this type of game, unless I get really creative with my controls (I'll keep this engine in mind for other possible projects in the future, though). I've tried Godot as well, which seems to be really hard to learn for a beginner of my level, especially as the coding language is completely unique to the engine from what I've read (and noticed myself). I did come across Unity and UE (Unreal Engine) and from what I've read it seems that Unity is better, but, again, I understand very little of any reviews I've read. What's mostly scaring me away is that services that have Premium possibilities you pay for are usually really limited in a stupid way. But if this is not the case, hey, let me know! Pixel-art-ish animation would work well, too, so an alternative to RPG Maker would be fine (or at the very least a cheap alternative where I don't have to pay monthly for). The art for the game I can provide and create completely by myself if it's 2D. I'm an artist mostly and I have experience with making comics and digital drawings (fanart mostly hahaha) and I've gotten into animation which I'm fairly decent at (I'd be willing to learn 3D animation, though!). So, that's about all the info I think might be of importance, but if there's anything more you need to know to help me, I'll answer as quick as I can!! And if you tell me I gotta give up on some of the features I want the game to have, I'd be willing to listen to suggestions. Thanks in advance to everyone who is willing to help me!
  12. I have some texture files I got from open game art alas they have no texture atlas file and I would like to make texture atlas for them. Does any one know a way to EASILY split a file up into 32*32 tiles or make a texture atlas for a a already packed image with out one.
  13. Hello, i am trying to write a game architecture. I have the script and story planned, scene by scenes, moments by moments. The game age and replayabilty has also been planned... However i lack the skill of building the AI and how it should operate against the players(wandering around for strategic positions), random number generations for attacks and combos, multiplayer features(between mobile devices or within servers), and simple things like realistic fx fire or thunder generations, screen noises and distortions... i am using Openspace 3d. Can i get some pointers on how to do each of these? The game i want to make is like digimon world PS1, xenogears, ff7... those games has all the things i want to show as the aboves.
  14. I'm an indie game development from Serbia. And yes, I'm shamelessly promoting my own open source project... As stated in the title, it's a library of data structures for constant time insertion, erasure, lookup, and fastest possible iteration. These data structures I needed on many occasions while writing both engine and gameplay code. I couldn't find any open source implementation online, so I decided to implement them myself. You can look at the code here : https://github.com/im95able/Rea
  15. GlPortal is a free and open source first person 3D teleportation puzzle-platformer written in C++ using modern OpenGL and SDL2 and its own engine. We have integrated a physics engine and a scripting engine. - Tasks from beginner to expert level - Focus on 2D, 3D, gameplay, sound, physics or logic - Contributing is as easy as fork, compile and push Stuck? We help you develop your skills. Contact us on reddit, gitter or irc! Benefits - Pressure-free environment - Space for creativity - Learn with and from your peers More Information Get more information about GlPortal at http://glportal.de and http://www.lgdb.org/game/glportal See a video at https://vimeo.com/163973907 or go to youtube and search for glportal. Contact - IRC #glportal on freenode or webchat on http://kiwiirc.com/client/irc.freenode.com/#glportal. - Reddit https://www.reddit.com/r/RadixEngine/ - Gitter https://gitter.im/GlPortal/glPortal This ad stinks? Help us improve it: https://github.com/GlPortal/ads/edit/master/developer.md
  16. I have recently created my own Sound Effects plateform: http://www.ogsoundfx.com Have a look ! There are basically 2 options that you can chose from: Packs or Single tracks. 1/ Sound effect packs/Full albums: Their price range from a few dollars up to $29 for huge collections of hundreds of sounds. If you have the budget, these packs are really worth the money. You can also wait for discounts if you are not in a hurry. 2/ Single tracks. The prices start at $0,99. The aim is to offer game developers or film makers the possibility to acquire specific sound effects for the lowest budget possible. At the moment I am offering a 50% discount for purchases of a minimum value of $10 on single tracks. So if you have $5 to spare on super high quality and professional sound effects, you get $10 worth of a selection of your choice ! I am planning on creating a permanent volume discount scheme on those single tracks. The more you buy, the bigger the discount. For now, I am only selling my own sounds, but I want to expand by allowing other sound designers to sell their sounds on www.ogsoundfx.com. What do you think ? Any opinion or advice you want to give on the presentation, the content, navigation and so on, are most welcome. And I would be happy to compensate any feedback with a nice coupon code. Oh and by the way, if you subscribe to the newsletter, you will not only be the first ones informed of great deals, but you will also receive 120 MB of free high quality sounds ! I hope to see you at http://www.ogsoundfx.com Olivier Girardot Music Composer & Sound Designer PS. Let me share latest youtube video too:
  17. Recently a long-awaited event has happen - Unity Technologies uploaded the C# source code of the game engine, available for free download on Github. The code of the engine and the editor is available. Of course, we couldn't pass up, especially since lately we've not written so many articles about checking projects on C#. Unity allows to use the provided sources only for information purposes. We'll use them exactly in these ways. Let's try out the latest version PVS-Studio 6.23 on the Unity code. Introduction Previously we've written an article about checking Unity. At that time so much C#-code was not available for the analysis: some components, libraries and examples of usage. However, the author of the article managed to find quite interesting bugs. How did Unity please us this time? I'm saying "please" and hope not to offend the authors of the project. Especially since the amount of the source Unity C#-code, presented on GitHub, is about 400 thousand lines (excluding empty) in 2058 files with the extension "cs". It's a lot, and the analyzer had a quite considerable scope. Now about the results. Before the analysis, I've slightly simplified the work, having enabled the mode of the code display according to the CWE classification for the found bugs. I've also activated the warnings suppression mechanism of the third level of certainty (Low). These settings are available in the drop-down menu of PVS-Studio in Visual Studio development environment, and in the parameters of the analyzer. Getting rid of the warnings with low certainty, I made the analysis of the Unity source code. As a result, I got 181 warnings of the first level of certainty (High) and 506 warnings of the second level of certainty (Medium). I have not studied absolutely all the warnings, because there were quite a lot of them. Developers or enthusiasts can easily conduct an in-depth analysis by testing Unity themselves. To do this, PVS-Studio provides free trial and free modes of using. Companies can also buy our product and get quick and detailed support along with the license. Judging by the fact that I immediately managed to find couple of real bugs practically in every group of warnings with one or two attempts, there are a lot of them in Unity. And yes, they are diverse. Let's review the most interesting errors. Results of the check Something's wrong with the flags PVS-Studio warning: V3001 There are identical sub-expressions 'MethodAttributes.Public' to the left and to the right of the '|' operator. SyncListStructProcessor.cs 240 MethodReference GenerateSerialization() { .... MethodDefinition serializeFunc = new MethodDefinition("SerializeItem", MethodAttributes.Public | MethodAttributes.Virtual | MethodAttributes.Public | // <= MethodAttributes.HideBySig, Weaver.voidType); .... } When combining enumeration flags MethodAttributes, an error was made: the Public value was used twice. Perhaps, the reason for this is the wrong code formatting. A similar bug is also made in code of the method GenerateDeserialization: V3001 There are identical sub-expressions 'MethodAttributes.Public' to the left and to the right of the '|' operator. SyncListStructProcessor.cs 309 Copy-Paste PVS-Studio warning: V3001 There are identical sub-expressions 'format == RenderTextureFormat.ARGBFloat' to the left and to the right of the '||' operator. RenderTextureEditor.cs 87 public static bool IsHDRFormat(RenderTextureFormat format) { Return (format == RenderTextureFormat.ARGBHalf || format == RenderTextureFormat.RGB111110Float || format == RenderTextureFormat.RGFloat || format == RenderTextureFormat.ARGBFloat || format == RenderTextureFormat.ARGBFloat || format == RenderTextureFormat.RFloat || format == RenderTextureFormat.RGHalf || format == RenderTextureFormat.RHalf); } I gave a piece of code, preliminary having formatted it, so the error is easily detected visually: the comparison with RenderTextureFormat.ARGBFloat is performed twice. In the original code, it looks differently: Probably, another value of enumeration RenderTextureFormat has to be used in one of two identical comparisons. Double work PVS-Studio warning: V3008 CWE-563 The 'fail' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 1633, 1632. UNetWeaver.cs 1633 class Weaver { .... public static bool fail; .... static public bool IsValidTypeToGenerate(....) { .... if (....) { .... Weaver.fail = true; fail = true; return false; } return true; } .... } The true value is assigned twice to the value, as Weaver.fail and fail is one and the same static field of the Weaver class. Perhaps, there is no crucial error, but the code definitely needs attention. No options PVS-Studio warning: V3009 CWE-393 It's odd that this method always returns one and the same value of 'false'. ProjectBrowser.cs 1417 // Returns true if we should early out of OnGUI bool HandleCommandEventsForTreeView() { .... if (....) { .... if (....) return false; .... } return false; } The method always returns false. Pay attention to the comment in the beginning. A developer forgot about the result PVS-Studio warning: V3010 CWE-252 The return value of function 'Concat' is required to be utilized. AnimationRecording.cs 455 static public UndoPropertyModification[] Process(....) { .... discardedModifications.Concat(discardedRotationModifications); return discardedModifications.ToArray(); } When concatenating two arrays discardedModifications and discardedRotationModifications the author forgot to save the result. Probably a programmer assumed that the result would be expressed immediately in the array discardedModifications. But it is not so. As a result, the original array discardedModifications is returned from the method. The code needs to be corrected as follows: static public UndoPropertyModification[] Process(....) { .... return discardedModifications.Concat(discardedRotationModifications) .ToArray(); } Wrong variable was checked PVS-Studio warning: V3019 CWE-697 Possibly an incorrect variable is compared to null after type conversion using 'as' keyword. Check variables 'obj', 'newResolution'. GameViewSizesMenuItemProvider.cs 104 private static GameViewSize CastToGameViewSize(object obj) { GameViewSize newResolution = obj as GameViewSize; if (obj == null) { Debug.LogError("Incorrect input"); return null; } return newResolution; } In this method, the developers forgot to consider a situation where the variable objis not equal to null, but it will not be able to cast to the GameViewSize type. Then the variable newResolution will be set to null, and the debug output will not be made. A correct variant of code will be like this: private static GameViewSize CastToGameViewSize(object obj) { GameViewSize newResolution = obj as GameViewSize; if (newResolution == null) { Debug.LogError("Incorrect input"); } return newResolution; } Deficiency PVS-Studio warning: V3020 CWE-670 An unconditional 'return' within a loop. PolygonCollider2DEditor.cs 96 private void HandleDragAndDrop(Rect targetRect) { .... foreach (....) { .... if (....) { .... } return; } .... } The loop will execute only one iteration, after that the method terminates its work. Various scenarios are probable. For example, return must be inside the unit if, or somewhere before return, a directive continue is missing. It may well be that there is no error here, but then one should make the code more understandable. Unreachable code PVS-Studio warning: V3021 CWE-561 There are two 'if' statements with identical conditional expressions. The first 'if' statement contains method return. This means that the second 'if' statement is senseless CustomScriptAssembly.cs 179 public bool IsCompatibleWith(....) { .... if (buildingForEditor) return IsCompatibleWithEditor(); if (buildingForEditor) buildTarget = BuildTarget.NoTarget; // Editor .... } Two identical checks, following one after another. It is clear that in case of buildingForEditor equality to the true value, the second check is meaningless, because the first method terminates its work. If the value buildingForEditor is false, neither then-brunch nor if operator will be executed. There is an erroneous construction that requires correction. Unconditional condition PVS-Studio warning: V3022 CWE-570 Expression 'index < 0 && index >= parameters.Length' is always false. AnimatorControllerPlayable.bindings.cs 287 public AnimatorControllerParameter GetParameter(int index) { AnimatorControllerParameter[] param = parameters; if (index < 0 && index >= parameters.Length) throw new IndexOutOfRangeException( "Index must be between 0 and " + parameters.Length); return param[index]; } The condition of the index check is incorrect - the result will always be false. However, in case of passing the incorrect index to the GetParameter method, the exception IndexOutOfRangeException will still be thrown when attempting to access an array element in the return block. Although, the error message will be slightly different. One has to use || in a condition instead of the operator && so that the code worked the way a developer expected: public AnimatorControllerParameter GetParameter(int index) { AnimatorControllerParameter[] param = parameters; if (index < 0 || index >= parameters.Length) throw new IndexOutOfRangeException( "Index must be between 0 and " + parameters.Length); return param[index]; } Perhaps, due to the use of the Copy-Paste method, there is another the same error in the Unity code: PVS-Studio warning: V3022 CWE-570 Expression 'index < 0 && index >= parameters.Length' is always false. Animator.bindings.cs 711 And another similar error associated with the incorrect condition of the check of the array index: PVS-Studio warning: V3022 CWE-570 Expression 'handle.valueIndex < 0 && handle.valueIndex >= list.Length' is always false. StyleSheet.cs 81 static T CheckAccess<T>(T[] list, StyleValueType type, StyleValueHandle handle) { T value = default(T); if (handle.valueType != type) { Debug.LogErrorFormat(.... ); } else if (handle.valueIndex < 0 && handle.valueIndex >= list.Length) { Debug.LogError("Accessing invalid property"); } else { value = list[handle.valueIndex]; } return value; } And in this case, a release of the IndexOutOfRangeException exception is possible.As in the previous code fragments, one has to use the operator || instead of && to fix an error. Simply strange code Two warnings are issued for the code fragment below. PVS-Studio warning: V3022 CWE-571 Expression 'bRegisterAllDefinitions || (AudioSettings.GetSpatializerPluginName() == "GVR Audio Spatializer")' is always true. AudioExtensions.cs 463 PVS-Studio warning: V3022 CWE-571 Expression 'bRegisterAllDefinitions || (AudioSettings.GetAmbisonicDecoderPluginName() == "GVR Audio Spatializer")' is always true. AudioExtensions.cs 467 // This is where we register our built-in spatializer extensions. static private void RegisterBuiltinDefinitions() { bool bRegisterAllDefinitions = true; if (!m_BuiltinDefinitionsRegistered) { if (bRegisterAllDefinitions || (AudioSettings.GetSpatializerPluginName() == "GVR Audio Spatializer")) { } if (bRegisterAllDefinitions || (AudioSettings.GetAmbisonicDecoderPluginName() == "GVR Audio Spatializer")) { } m_BuiltinDefinitionsRegistered = true; } } It looks like an incomplete method. It is unclear why it has been left as such and why developers haven't commented the useless code blocks. All, that the method does at the moment: if (!m_BuiltinDefinitionsRegistered) { m_BuiltinDefinitionsRegistered = true; } Useless method PVS-Studio warning: V3022 CWE-570 Expression 'PerceptionRemotingPlugin.GetConnectionState() != HolographicStreamerConnectionState.Disconnected' is always false. HolographicEmulationWindow.cs 171 private void Disconnect() { if (PerceptionRemotingPlugin.GetConnectionState() != HolographicStreamerConnectionState.Disconnected) PerceptionRemotingPlugin.Disconnect(); } To clarify the situation, it is necessary to look at the declaration of the methodPerceptionRemotingPlugin.GetConnectionState(): internal static HolographicStreamerConnectionState GetConnectionState() { return HolographicStreamerConnectionState.Disconnected; } Thus, calling the Disconnect() method leads to nothing. One more error relates to the same method PerceptionRemotingPlugin.GetConnectionState(): PVS-Studio warning: V3022 CWE-570 Expression 'PerceptionRemotingPlugin.GetConnectionState() == HolographicStreamerConnectionState.Connected' is always false. HolographicEmulationWindow.cs 177 private bool IsConnectedToRemoteDevice() { return PerceptionRemotingPlugin.GetConnectionState() == HolographicStreamerConnectionState.Connected; } The result of the method is equivalent to the following: private bool IsConnectedToRemoteDevice() { return false; } As we can see, among the warnings V3022 many interesting ones were found. Probably, if one spends much time, he can increase the list. But let's move on. Not on the format PVS-Studio warning: V3025 CWE-685 Incorrect format. A different number of format items is expected while calling 'Format' function. Arguments not used: index. Physics2D.bindings.cs 2823 public void SetPath(....) { if (index < 0) throw new ArgumentOutOfRangeException( String.Format("Negative path index is invalid.", index)); .... } There is no error in code, but as the saying goes, the code "smells". Probably, an earlier message was more informative, like this: "Negative path index {0} is invalid.". Then it was simplified, but developers forgot to remove the parameter index for the method Format. Of course, this is not the same as a forgotten parameter for the indicated output string specifier, i.e. the construction of the type String.Format("Negative path index {0} is invalid."). In such a case, an exception would be thrown. But in our case we also need neatness when refactoring. The code has to be fixed as follows: public void SetPath(....) { if (index < 0) throw new ArgumentOutOfRangeException( "Negative path index is invalid."); .... } Substring of the substring PVS-Studio warning: V3053 An excessive expression. Examine the substrings 'UnityEngine.' and 'UnityEngine.SetupCoroutine'. StackTrace.cs 43 static bool IsSystemStacktraceType(object name) { string casted = (string)name; return casted.StartsWith("UnityEditor.") || casted.StartsWith("UnityEngine.") || casted.StartsWith("System.") || casted.StartsWith("UnityScript.Lang.") || casted.StartsWith("Boo.Lang.") || casted.StartsWith("UnityEngine.SetupCoroutine"); } Search of the substring "UnityEngine.SetupCoroutine" in the condition is meaningless, because before that the search for "UnityEngine." is performed. Therefore, the last check should be removed or one has to clarify the correctness of substrings. Another similar error: PVS-Studio warning: V3053 An excessive expression. Examine the substrings 'Windows.dll' and 'Windows.'. AssemblyHelper.cs 84 static private bool CouldBelongToDotNetOrWindowsRuntime(string assemblyPath) { return assemblyPath.IndexOf("mscorlib.dll") != -1 || assemblyPath.IndexOf("System.") != -1 || assemblyPath.IndexOf("Windows.dll") != -1 || // <= assemblyPath.IndexOf("Microsoft.") != -1 || assemblyPath.IndexOf("Windows.") != -1 || // <= assemblyPath.IndexOf("WinRTLegacy.dll") != -1 || assemblyPath.IndexOf("platform.dll") != -1; } Size does matter PVS-Studio warning: V3063 CWE-571 A part of conditional expression is always true if it is evaluated: pageSize <= 1000. UNETInterface.cs 584 public override bool IsValid() { .... return base.IsValid() && (pageSize >= 1 || pageSize <= 1000) && totalFilters <= 10; } Condition for a check of a valid page size is erroneous. Instead of the operator ||, one has to use &&. The corrected code: public override bool IsValid() { .... return base.IsValid() && (pageSize >= 1 && pageSize <= 1000) && totalFilters <= 10; } Possible division by zero PVS-Studio warning: V3064 CWE-369 Potential division by zero. Consider inspecting denominator '(float)(width - 1)'. ClothInspector.cs 249 Texture2D GenerateColorTexture(int width) { .... for (int i = 0; i < width; i++) colors[i] = GetGradientColor(i / (float)(width - 1)); .... } The problem may occur when passing the value width = 1 into the method. In the method, it is not checked anyway. The method GenerateColorTexture is called in the code just once with the parameter 100: void OnEnable() { if (s_ColorTexture == null) s_ColorTexture = GenerateColorTexture(100); .... } So, there is no error here so far. But, just in case, in the method GenerateColorTexture the possibility of transferring incorrect width value should be provided. Paradoxical check PVS-Studio warning: V3080 CWE-476 Possible null dereference. Consider inspecting 'm_Parent'. EditorWindow.cs 449 public void ShowPopup() { if (m_Parent == null) { .... Rect r = m_Parent.borderSize.Add(....); .... } } Probably, due to a typo, the execution of such code guarantees the use of the null reference m_Parent. The corrected code: public void ShowPopup() { if (m_Parent != null) { .... Rect r = m_Parent.borderSize.Add(....); .... } } The same error occurs later in the code: PVS-Studio warning: V3080 CWE-476 Possible null dereference. Consider inspecting 'm_Parent'. EditorWindow.cs 470 internal void ShowWithMode(ShowMode mode) { if (m_Parent == null) { .... Rect r = m_Parent.borderSize.Add(....); .... } And here's another interesting bug that can lead to access by a null reference due to incorrect check: PVS-Studio warning: V3080 CWE-476 Possible null dereference. Consider inspecting 'objects'. TypeSelectionList.cs 48 public TypeSelection(string typeName, Object[] objects) { System.Diagnostics.Debug.Assert(objects != null || objects.Length >= 1); .... } It seems to me that Unity developers quite often make errors related to misuse of operators || and && in conditions. In this case, if objects has a null value, then this will lead to a check of second part of the condition (objects != null || objects.Length >= 1), which will entail the unexpected throw of an exception. The error should be corrected as follows: public TypeSelection(string typeName, Object[] objects) { System.Diagnostics.Debug.Assert(objects != null && objects.Length >= 1); .... } Early nullifying PVS-Studio warning: V3080 CWE-476 Possible null dereference. Consider inspecting 'm_RowRects'. TreeViewControlGUI.cs 272 public override void GetFirstAndLastRowVisible(....) { .... if (rowCount != m_RowRects.Count) { m_RowRects = null; throw new InvalidOperationException(string.Format("....", rowCount, m_RowRects.Count)); } .... } In this case, the exception throw (access by the null reference m_RowRects) will happen when generating the message string for another exception. Code might be fixed, for example, as follows: public override void GetFirstAndLastRowVisible(....) { .... if (rowCount != m_RowRects.Count) { var m_RowRectsCount = m_RowRects.Count; m_RowRects = null; throw new InvalidOperationException(string.Format("....", rowCount, m_RowRectsCount)); } .... } One more error when checking PVS-Studio warning: V3080 CWE-476 Possible null dereference. Consider inspecting 'additionalOptions'. MonoCrossCompile.cs 279 static void CrossCompileAOT(....) { .... if (additionalOptions != null & additionalOptions.Trim().Length > 0) arguments += additionalOptions.Trim() + ","; .... } Due to the fact that the & operator is used in a condition, the second part of the condition will always be checked, regardless of the result of the check of the first part. In case if the variable additionalOptions has the null value, the exception throw is inevitable. The error has to be corrected, by using the operator && instead of &. As we can see, among the warnings with the number V3080 there are rather insidious errors. Late check PVS-Studio warning: V3095 CWE-476 The 'element' object was used before it was verified against null. Check lines: 101, 107. StyleContext.cs 101 public override void OnBeginElementTest(VisualElement element, ....) { if (element.IsDirty(ChangeType.Styles)) { .... } if (element != null && element.styleSheets != null) { .... } .... } The variable element is used without preliminary check for null. While later in the code this check is performed. The code probably needs to be corrected as follows: public override void OnBeginElementTest(VisualElement element, ....) { if (element != null) { if (element.IsDirty(ChangeType.Styles)) { .... } if (element.styleSheets != null) { .... } } .... } In code there are 18 more errors. Let me give you a list of the first 10: V3095 CWE-476 The 'property' object was used before it was verified against null. Check lines: 5137, 5154. EditorGUI.cs 5137 V3095 CWE-476 The 'exposedPropertyTable' object was used before it was verified against null. Check lines: 152, 154. ExposedReferenceDrawer.cs 152 V3095 CWE-476 The 'rectObjs' object was used before it was verified against null. Check lines: 97, 99. RectSelection.cs 97 V3095 CWE-476 The 'm_EditorCache' object was used before it was verified against null. Check lines: 134, 140. EditorCache.cs 134 V3095 CWE-476 The 'setup' object was used before it was verified against null. Check lines: 43, 47. TreeViewExpandAnimator.cs 43 V3095 CWE-476 The 'response.job' object was used before it was verified against null. Check lines: 88, 99. AssetStoreClient.cs 88 V3095 CWE-476 The 'compilationTask' object was used before it was verified against null. Check lines: 1010, 1011. EditorCompilation.cs 1010 V3095 CWE-476 The 'm_GenericPresetLibraryInspector' object was used before it was verified against null. Check lines: 35, 36. CurvePresetLibraryInspector.cs 35 V3095 CWE-476 The 'Event.current' object was used before it was verified against null. Check lines: 574, 620. AvatarMaskInspector.cs 574 V3095 CWE-476 The 'm_GenericPresetLibraryInspector' object was used before it was verified against null. Check lines: 31, 32. ColorPresetLibraryInspector.cs 31 Wrong Equals method PVS-Studio warning: V3115 CWE-684 Passing 'null' to 'Equals' method should not result in 'NullReferenceException'. CurveEditorSelection.cs 74 public override bool Equals(object _other) { CurveSelection other = (CurveSelection)_other; return other.curveID == curveID && other.key == key && other.type == type; } Overload of the Equals method was implemented carelessly. One has to take into account the possibility of obtaining null as a parameter, as this can lead to a throw of an exception, which hasn't been considered in the calling code. In addition, the situation, when _other can't be cast to the type CurveSelection, will lead to a throw of an exception. The code has to be fixed. A good example of the implementation of Object.equals overload is given in the documentation. In the code, there are other similar errors: V3115 CWE-684 Passing 'null' to 'Equals' method should not result in 'NullReferenceException'. SpritePackerWindow.cs 40 V3115 CWE-684 Passing 'null' to 'Equals' method should not result in 'NullReferenceException'. PlatformIconField.cs 28 V3115 CWE-684 Passing 'null' to 'Equals' method should not result in 'NullReferenceException'. ShapeEditor.cs 161 V3115 CWE-684 Passing 'null' to 'Equals' method should not result in 'NullReferenceException'. ActiveEditorTrackerBindings.gen.cs 33 V3115 CWE-684 Passing 'null' to 'Equals' method should not result in 'NullReferenceException'. ProfilerFrameDataView.bindings.cs 60 Once again about the check for null inequality PVS-Studio warning: V3125 CWE-476 The 'camera' object was used after it was verified against null. Check lines: 184, 180. ARBackgroundRenderer.cs 184 protected void DisableARBackgroundRendering() { .... if (camera != null) camera.clearFlags = m_CameraClearFlags; // Command buffer camera.RemoveCommandBuffer(CameraEvent.BeforeForwardOpaque, m_CommandBuffer); camera.RemoveCommandBuffer(CameraEvent.BeforeGBuffer, m_CommandBuffer); } When the camera variable is used the first time, it is checked for null inequality. But further along the code the developers forget to do it. The correct variant could be like this: protected void DisableARBackgroundRendering() { .... if (camera != null) { camera.clearFlags = m_CameraClearFlags; // Command buffer camera.RemoveCommandBuffer(CameraEvent.BeforeForwardOpaque, m_CommandBuffer); camera.RemoveCommandBuffer(CameraEvent.BeforeGBuffer, m_CommandBuffer); } } Another similar error: PVS-Studio warning: V3125 CWE-476 The 'item' object was used after it was verified against null. Check lines: 88, 85. TreeViewForAudioMixerGroups.cs 88 protected override Texture GetIconForItem(TreeViewItem item) { if (item != null && item.icon != null) return item.icon; if (item.id == kNoneItemID) // <= return k_AudioListenerIcon; return k_AudioGroupIcon; } An error, that in some cases leads to an access by a null link. The execution of the condition in the first block if enables the exit from the method. However, if this does not happen, then there is no guarantee that the reference item is non-zero. Here is the corrected version of the code: protected override Texture GetIconForItem(TreeViewItem item) { if (item != null) { if (item.icon != null) return item.icon; if (item.id == kNoneItemID) return k_AudioListenerIcon; } return k_AudioGroupIcon; } In the code there are 12 similar errors. Let me give you a list of the first 10: V3125 CWE-476 The 'element' object was used after it was verified against null. Check lines: 132, 107. StyleContext.cs 132 V3125 CWE-476 The 'mi.DeclaringType' object was used after it was verified against null. Check lines: 68, 49. AttributeHelper.cs 68 V3125 CWE-476 The 'label' object was used after it was verified against null. Check lines: 5016, 4999. EditorGUI.cs 5016 V3125 CWE-476 The 'Event.current' object was used after it was verified against null. Check lines: 277, 268. HostView.cs 277 V3125 CWE-476 The 'bpst' object was used after it was verified against null. Check lines: 96, 92. BuildPlayerSceneTreeView.cs 96 V3125 CWE-476 The 'state' object was used after it was verified against null. Check lines: 417, 404. EditorGUIExt.cs 417 V3125 CWE-476 The 'dock' object was used after it was verified against null. Check lines: 370, 365. WindowLayout.cs 370 V3125 CWE-476 The 'info' object was used after it was verified against null. Check lines: 234, 226. AssetStoreAssetInspector.cs 234 V3125 CWE-476 The 'platformProvider' object was used after it was verified against null. Check lines: 262, 222. CodeStrippingUtils.cs 262 V3125 CWE-476 The 'm_ControlPoints' object was used after it was verified against null. Check lines: 373, 361. EdgeControl.cs 373 The choice turned out to be small PVS-Studio warning: V3136 CWE-691 Constant expression in switch statement. HolographicEmulationWindow.cs 261 void ConnectionStateGUI() { .... HolographicStreamerConnectionState connectionState = PerceptionRemotingPlugin.GetConnectionState(); switch (connectionState) { .... } .... } The method PerceptionRemotingPlugin.GetConnectionState() is to blame here. We have already come across it when we were analyzing the warnings V3022: internal static HolographicStreamerConnectionState GetConnectionState() { return HolographicStreamerConnectionState.Disconnected; } The method will return a constant. This code is very strange. It needs to be paid attention. Conclusions I think we can stop at this point, otherwise the article will become boring and overextended. Again, I listed the errors that I just couldn't miss. Sure, the Unity code contains a big number of the erroneous and incorrect constructions, that need to be fixed. The difficulty is that many of the issued warnings are very controversial and only the author of the code is able to make the exact "diagnosis" in each case. Generally speaking about the Unity project, we can say that it is rich for errors, but taking into account the size of its code base (400 thousand lines), it's not so bad. Nevertheless, I hope that the authors will not neglect the code analysis tools to improve the quality of their product. Use PVS-Studio and I wish you bugless code!
  18. Hi everyone, I'm a very proficient C++ programmer looking to build my portfolio by contributing to projects for free. I have been programming for about 4 years now. I have experience working with OpenGL and I'm willing to adapt to a wide variety of technologies as I learn really fast. I can also give 20 - 25 hrs weekly on the project. Contact me if you have something for me to work on. Thanks.
  19. Hi, i wanted to present you my recent project i am working on which is a platform abstraction library. This library is designed to be simple, non-bloated, can be included however you want and do not require any thirdparty libraries at all. It will simply abstract away all relevant platform specific things in a simple to use api without hiding any data. The main focus is game/media/simulation development, so you get a window, audio playback and a rendering context. Why: - Moving away from object orienation to handmade programming - Most platform abstraction libraries are bloated, have a bad api, cannot be debugged, are slow, has bad memory management - I dont want to write platform specific code anymore, just once for each platform with a fixed set of features and thats it. - Learning C99 low level programming Mindset: - Its written in C99 but is C++ compatible - There is just a single header file you have to include and thats it. - C-Runtime support can be disabled - The code style is simple and clean - Its full open source, so you can use and extend it however you want - Uses just the built-in operating system functions/libraries - Works well with other libraries as well (ImGUI, Box2D, Glew, STL, etc.) - Some features can be compiled out as needed (Window, OpenGL, etc.) - Fixed and small memory footprint - Easy to use api - Can be debugged Features: - Window creation and handling - OpenGL legacy and modern rendering context creation - Memory allocation and deallocation - Timing operations - Threading and syncronisation - File/Path IO - String conversion functions - Atomic operations - Dynamic library loading - Console out - Gamepad input - Audio playback History: Initially the project was fully written with 100% C/89 compability in mind without needing the c-runtime library, but as i see myself always fighting against C or missing any features like console output, i decided to move to a minimal C++ version. After a while i upgraded to C++/11, but felt there was no need for C++ at all... Now its written in C99 and it was the best choice ever. Current state: - Win32 support is complete - Linux support is almost complete Planned: - More video drivers (Direct2D/3D/Vulcan) - More audio drivers (XAudio, Wasapi) - More platforms (MacOSX, maybe Android not sure) - More docs & tutorials - More tests Source: https://github.com/f1nalspace/final_game_tech Feedback/Comments: I would like to know what you think about, what is missing, how can i improve it, what do you want from it, etc. Greetings, Final
  20. I publishing for manufacturing our ray tracing engines and products on graphics API (C++, Vulkan API, GLSL460, SPIR-V): https://github.com/world8th/satellite-oem For end users I have no more products or test products. Also, have one simple gltf viewer example (only source code). In 2016 year had idea for replacement of screen space reflections, but in 2018 we resolved to finally re-profile project as "basis of render engine". In Q3 of 2017 year finally merged to Vulkan API.
  21. Get the code HERE. This project is a nod to those 1990 pocket games that were all the rage in the day. The eTamagotchi features P2P networking showcasing how you can have a single application be both the client and the server at runtime. It features a random digimon (digital monster) that keeps track of all battles it has. The code is meant for demonstration and learning purposes only. The README lists each point that can be improved upon including gameplay mechanics.
  22. I found this demo a long time ago and I love it. I was wondering if it could be improved/expanded somehow. I plugged it into CodeBlocks to try to get a bigger resolution and x64 but it hollered GLU errors. I do not program but put some years in on a chess GUI dev team. Coder is cool with the use of the code. Best Regards SubAtomic2.zip
  23. GlPortal is a free and open source first person 3D teleportation puzzle-platformer written in C++ using modern OpenGL and SDL2 and its own engine. We have already integrated a physics engine and are planning to add some physics based puzzles. - Tasks from beginner to expert level - Focus on 2D, 3D, gameplay, sound, physics or logic - Contributing is as easy as fork, compile and push **Stuck? We help you develop your skills. Contact us on reddit, gitter or irc!** ## Benefits - Pressure-free environment - Space for creativity - Learn with and from your peers ## More Information Get more information about GlPortal at http://glportal.de and http://www.lgdb.org/game/glportal See a video at https://vimeo.com/163973907 or go to youtube and search for glportal. ## Contact - **IRC** #glportal on freenode or webchat on http://kiwiirc.com/client/irc.freenode.com/#glportal. - **Reddit** https://www.reddit.com/r/RadixEngine/ - **Gitter** https://gitter.im/GlPortal/glPortal This ad stinks? Help us improve it: https://github.com/GlPortal/ads/edit/master/developer.md
  24. BenchmarkNet is a console application for testing the reliable UDP networking solutions. Features: Asynchronous simulation of a large number of clients Stable under high loads Simple and flexible simulation setup Detailed session information Supported networking libraries: ENet (C# Wrapper) UNet LiteNetLib Lidgren MiniUDP Hazel Photon Neutrino DarkRift More information and source code on GitHub. You can find the latest benchmark results on the wiki page.
  25. _Engine_

    Atum Engine

    Atum engine is a newcomer in a row of game engines. Most game engines focus on render techniques in features list. The main task of Atum is to deliver the best toolset; that’s why, as I hope, Atum will be a good light weighted alternative to Unity for indie games. Atum already has fully workable editor that has an ability to play test edited scene. All system code has simple ideas behind them and focuses on easy to use functionality. That’s why code is minimized as much as possible. Currently the engine consists from: - Scene Editor with ability to play test edited scene; - Powerful system for binding properties into the editor; - Render system based on DX11 but created as multi API; so, adding support of another GAPI is planned; - Controls system based on aliases; - Font system based on stb_truetype.h; - Support of PhysX 3.0, there are samples in repo that use physics; - Network code which allows to create server/clinet; there is some code in repo which allows to create a simple network game I plan to use this engine in multiplayer game - so, I definitely will evolve the engine. Also I plan to add support for mobile devices. And of course, the main focus is to create a toolset that will ease games creation. Link to repo on source code is - https://github.com/ENgineE777/Atum Video of work process in track based editor can be at follow link:
  • Advertisement
√ó

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!