Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!

1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


Member Since 14 May 2006
Offline Last Active Today, 07:02 AM

#5199372 How can I create an installer for my game?

Posted by CRYP7IK on 21 December 2014 - 12:43 AM

nsis is awesome, however if you are going cross platform route:




Is where it's at (IMO).

#5195179 Critique My Implementation Of Pong?

Posted by CRYP7IK on 28 November 2014 - 07:35 AM


You have non-game specific code in your pong implementation please separate 'engine' code out into it's own module or library

Seems like a complete waste of time as well as overengineering for the sake of "ideal" correctness.

Separate your header and source files into different folders (include and source)

For a game? Why? He's not writing a library here, who is going to be including these headers besides the game itself?

A Paddle shouldn't handle it's input, take that out into a PaddleController class so you can easily add AI to your paddle.

Does he WANT to add AI?

Remove boiler plate code from main and turn it into a Game class, inherit from that when making Pong

While I agree about moving code out of main I don't really get where the assumption would be that he should make a game class and then inherit from it. He could just as easily have a "Game" class by itself.

Remove all magic number values from code and put them in json or xml files that describe things like game specific data (Paddle initial positions) and engine data (window size, title etc)

Removing magic numbers, sure. He could just as easily make them constants and should make that decision based on his usage, not simply throwing a bunch of random and possibly useless settings in an xml or json file and then getting library code together to load it and parse settings.

If theres one thing that wastes just as much time as bad code its overengineering code just because its the "pretty" thing to do.



Over engineering? It's simply making it easier for a reader to see what is actually game code and what isn't, seeing as he isn't the only person reading the code it isn't a complete waste of time. Good structure is rarely a waste of time, even in small projects.


For the same reason above, so people reading it can directly go to src or inc for whatever they want to look at. I didn't say he was writing a library. I don't know why you wouldn't do this 'for a game'.


Well, AI is just an example what if he wants to add a networked controller so another application could control a paddle via some port? It's all about SRP and makes it well designed, it is also maybe 10 minutes of work.


I was just following his other design patterns (i.e movable which things inherit from) and I think it fits.


Sure, constants would work, but require a recompilation every time, why aren't his shaders, materials etc constants as well? Again following what he already had in his game.


You want to see over-engineered?


  • Factories for everything, remove public constructors
  • Separate rendering and logic
  • Normalise all namespaces and add missing namespaces, make sure they have proper and long names.
  • Use premake or cmake (Preferably both) for agnostic compiler \ IDE project setup
  • Separate engine and game into different git repositories making use of sub-module
  • Add an asset database for handling resources (config files, materials, mesh etc)
  • Engine should definitely be it's own library(rather than just some code) and be seperated into core, math, render, physics, input, network, UI and game (WorldObject and Game class)
  • Input should be more generic and be loaded through a config file for ease of changing actions
  • Write a C interface for everything
  • Add a plugin system for mods (Allow use of hot-loaded dlls and scripts for at least 4 languages, make use of SWIG)
  • Capture metrics of players and send back to database using pig, hadoop and map reduce.

(Please continue this list)

#5195121 Critique My Implementation Of Pong?

Posted by CRYP7IK on 28 November 2014 - 02:15 AM

Hrm, I am also going to critique your file structure while trying to not change your design decisions too much:


  • You have non-game specific code in your pong implementation please separate 'engine' code out into it's own module or library
  • Separate your header and source files into different folders (include and source)
  • Remove dlls from your source folders and put them in their own external library folder
  • Shader, material, texture and other resources should be in their own resources folder
  • A Paddle shouldn't handle it's input, take that out into a PaddleController class so you can easily add AI to your paddle.
  • Remove boiler plate code from main and turn it into a Game class, inherit from that when making Pong
  • Remove all magic number values from code and put them in json or xml files that describe things like game specific data (Paddle initial positions) and engine data (window size, title etc)

Once you do this a better critique can be done.

#5192558 Game engine architecture

Posted by CRYP7IK on 12 November 2014 - 07:57 PM

I don't really know if I see your problem.


Let's see:


  • Physics system can have data that it will simulate physics and collision with
  • Render system can have data that it will render images with.
  • AI system can have data that it will path find with.

The main point is the data part. Lets take terrain as an example:

GameObject* myObject = new GameObject("name");

// I don't really know how your component system is working, but I'll go with a simple version
// Here is one solution, bring out the data structures into their own DLL that others depend on.
myObject->AddComponent(new TerrainData("data/myTerrain.tdata")) // (From DataStructs.dll)
myObject->AddComponent(new TerrainRenderer()) // Requires TerrainData (From Render.dll)
myObject->AddComponent(new TerrainCollider()) // Requires TerrainData (From Physics.dll)
myObject->AddComponent(new TerrainPathFinder()) // Requires TerrainData (From AI.dll)

// OR

// All use the same data file, but have it separately in their own data structures.
myObject->AddComponent(new TerrainRenderer("data/myTerrain.tdata")) // Requires data file \ array or something (From Render.dll)
myObject->AddComponent(new TerrainCollider("data/myTerrain.tdata")) // Requires data file \ array or something (From Physics.dll)
myObject->AddComponent(new TerrainPathFinder("data/myTerrain.tdata")) // Requires data file \ array or something (From AI.dll)

#5184702 LOL - I wrote a poem about OpenGL

Posted by CRYP7IK on 02 October 2014 - 10:35 PM

OpenGL you know I love you, but like all lovers you're a.... difficult person!


My favourite part.

#5183368 CMake - ExternalProject targets slowing down everything

Posted by CRYP7IK on 27 September 2014 - 06:25 PM

You can just check if you have already downloaded or built it by creating a file after download or build steps and checking for that file later on.


Here is where I got this code from: https://projects.kde.org/projects/kde/superbuild/repository/revisions/master/entry/SuperBuild.cmake

# are we building a source package or should we download from the internet ?
if(EXISTS ${CMAKE_SOURCE_DIR}/ThisIsASourcePackage.valid )	
  set(buildFromSourcePackage TRUE)
  set(buildFromSourcePackage FALSE)

#5171988 Funniest line of code ever ?

Posted by CRYP7IK on 06 August 2014 - 09:53 PM



This whole fizz buzz implementation is hilarious.

#5157777 Creating a code editor/IDE

Posted by CRYP7IK on 03 June 2014 - 05:00 AM

There are two projects that use wxWidgets \ scintilla for a code editor or IDE and they both have some form of auto-complete and snippets, they are also open source. They also show off plugin architecture and pretty much everything to do with getting your own IDE up.




#5156885 Creating a code editor/IDE

Posted by CRYP7IK on 29 May 2014 - 10:25 PM

I would use wxWidgets. Mostly because it comes with an easy to use cross platform scintilla like API and an example using it. So I would use wxSTC with wxAUI with dynamic notebooks.


wxSTC handles a lot of the things you would need in a code editor have a look at:





for features and the API.

#5143468 Linux development...

Posted by CRYP7IK on 31 March 2014 - 08:10 AM

code::blocks - great, some issues with autocompletion sometimes

codelite - pretty awesome, some plugins aren't free

vim+spf13 - very good historical fuzzy auto-complete + snippets main<ctrl+k> will give you a full int main(..). or class<ctrl+k>ClassName<ctrl+k> will fill out a simple class def and impl and a lot more

eclipse - awesome auto-complete lots of different languages

#5098060 How to do starcraft 2 pathfinding?

Posted by CRYP7IK on 01 October 2013 - 08:30 AM

Well, I am no expert but I actually have pondered this myself and the following are my conclusions:




And how does it deal with dynamic obstacles like idle units?


Well this is easy, and you answer it yourself with 'boid steering' but I will explain that further. So each unit has some kind of inner area of influence and an outer area of influence, see my mspaint picture:




Now one can, using math, get a value of 0.0 - 1.0 of your position between those area of influences! So using this 0.0-1.0 value you can slowly steer the units steering vector away based on how close you are to another units inner area of influence. E.g:




Now buildings can easily mark A* nodes as closed \ open on demand with little performance impact and if A* can't find a way out it just gives back the path up until it deemed the end point impossible to get to.




What exactly are the nodes of A* on navmesh?


Well nodes of A* are generally just a grid representing passable \ not passable terrain and that can be enhanced with a navmesh that basically says all of this is a node and matches an area precisely (or more precise than a grid)...hang on there is an article I read about this a few years ago:




There you go! Have a read of that it should answer the rest of your questions I think. Digest that information and ask more!

#5098052 proTile Map Editor for Unity

Posted by CRYP7IK on 01 October 2013 - 07:20 AM

Wow, that is pretty amazing!


The only thing I could think while watching the video is being able to automatically create 'patterns' on the fly by multi-selecting things and right clicking or something. Other than that though pretty impressive.

#5077727 Game Engine Layout

Posted by CRYP7IK on 14 July 2013 - 06:05 PM

I have a question: Is this supposed to be used in one game? If so this engine seems fine, minus having no alpha which might be on purpose.


However if you then tried to adapt it to some other game the GameEngine class leaves much to be desired especially if the update function gets too large with too many different states. You can fix that with a slightly more advanced state machine to look after the states(Which would then be a separate class).


I was writing up a StateMachine example class when I remembered about the crazy number of gdnet articles, check these out:










Although, again your engine is very nice and if it works for your purpose don't over-engineer it.




#5041008 Article Inspiration

Posted by CRYP7IK on 08 March 2013 - 06:47 PM

I think this is a great idea, however I think the delivery of these articles does need to be discussed as well as ease of writing an article, how easy to find and accessible the articles are. What is the stance on Localisation? Are we going to bother with it?


First of all, should it be standard practice to include videos with the article (I think it should be, some people require visual and audio aids to learn)? Does GameDev have the bandwidth or do we host those videos with youtube and link to them? Are we even allowed to include videos in an article or is this supposed to be book-like only? Some serious thought should be put into this as we are using the web, why limit ourselves to being a book, why not a super-book! Obviously we would still have to make sure we have lo-fi versions(No automatically loaded video and make this easily accessible) to bring in those with limited bandwidth.


We should also think about the writing process of the articles, if you want more people writing articles you should make it easier to write them, so I have thought up of a few ideas to help in that regard, here is one. Make articles more of a collaboration rather than one author does one topic. You would probably have to limit collaborators to a few people, or have something like a 'pull request' on articles. This would alleviate the problem of  an Author feeling overwhelmed with writing (Well, if someone actually contributes).


Some topics I think should be covered include waterfall all the way to all the agile project management techniques and what free sites \ programs are available to use to handle projets (Trello, smartsheet etc).


Sidenote: Until I saw the board this was posted in and the title I saw development libraries and thought a GameDev.net engine! Then got super excited until 1 second later when I actually started reading things. sad.pngtongue.png







#4987807 AI Creation

Posted by CRYP7IK on 07 October 2012 - 06:28 PM

Wod, have you ever tried to use AI that learns on it's own, even within very limited parameters they will usually fail spectacularly or in weird uncontrollable ways.

If you then add any tweaking you may as well have just done your own logic to get the behaviour you want much faster and with more control.

I have heard stories of completely learning AI in military, such as one that learnt to detect hidden tanks, they taught it using millions of pictures. Then when they took it out into the field to test it, it gave completely messed up readings: tanks were everywhere! After many programmers poured through many logs they found that the AI had actually picked up a specific shape in clouds that it thought was a tank, basically a waste of money.

You have a (completely) learning AI and vs it against my fully scripted AI and mine will beat yours the first million times while also acting more like an adult human.