Jump to content

  • Log In with Google      Sign In   
  • Create Account


EarthBanana

Member Since 18 Mar 2013
Online Last Active Today, 11:18 PM

#5178571 Best 2.5D Game Engine for beginners?(obviously little programming)

Posted by EarthBanana on 06 September 2014 - 01:06 PM

Unity?




#5173692 Normals question

Posted by EarthBanana on 14 August 2014 - 03:01 PM

So I solved the problem - thanks to a closer look at the shader which was inspired by the above post by Buckeye.

 

As mentioned at the end of the last post - the problem was within the normal map reading.. but it wasn't exactly what I thought. In the shader I have a couple bools (hasDiffuseMap, hasNormalMap, hasOpacityMap, etc.. ) that are set on a per material basis..

 

Well in the rendering code I was setting them to true for materials that had it, but not false for materials that didnt.. Since the same GBuffer shader is used for pretty much all materials these bools remained true even when there wasn't a map available.. this resulted in invalid texture reads for the objects that didnt have normal maps

 

I fixed it by setting the hasMap booleans to true or false for every single material

 

This fixed a lot of other strange lighting artifacts I was having with specular also




#5167647 Game engine architecture

Posted by EarthBanana on 18 July 2014 - 11:48 AM

Assimp does not limit 1 material per mesh - very roughly speaking what Assimp calls a Scene is what LSpiro is referring to as a mesh, and what Assimp calls a Mesh is what LSpiro is calling a Subset

 

Assimp loads the "Scene" as an array of "Meshes" which each have an index in to the array of Materials for the scene

 

This translates, in my engine, as a Mesh which contains an array of Submeshes, each with integer handles to the material.. Each Submesh can refer to only 1 material.. Each Material then contains an integer handle to the Shader responsible for drawing the material

 

When using components, don't call your resources components - anything that you have to load could be considered a resource - textures, meshes, animations, audio clips, shaders, etc

You only want to load these things once - and either pass around handles or pointers to these within the engine

 

IE if you want to have a Render component, it should contain a pointer or handle to a mesh rather than the mesh itself




#5167641 Assimp with Visual Studio Express 2013 and CMake

Posted by EarthBanana on 18 July 2014 - 11:08 AM

Why are you building it yourself? It comes with the necessary lib files for x64 and x86 - you simply need to add the libraries to your project..

 

Also you will have to add the assimp32 or assimp64 dll file (located in the bin/x86 or bin/x64 folders respectively) to the same folder where visual studio puts your build exe file

 

To include the libraries just uncompress the sdk to some folder like c:\Assimp

Then add the include path for assimp to the include path for VS2013

To do this right click on your project in solution explorer, go to properties and under Configuration Properties go to VC++ Directories

 

Under "Include Directories" add the c:\Assimp\Include (or wherever yours is at) folder

Now under "Library Directories" add "c:\Assimpl\lib\x86" assuming you want to use the 32 bit version

Now click on "Linker" in the left pane and add "assimp.lib" to the Additional Dependencies section

 

Finally go to your Assimp\bin\x86 folder and grab the Assimp32.dll and put it wherever the program your writing's exe is at

 

I am not using the brand new assimp library - but a recent version (from a few months ago) so the procedure should be the same

 

To use assimp just #include <assimp/whatever assimp file you need>

 

Hope that helps - if you already know all this then sorry!




#5153783 Can a non-programmer make games?

Posted by EarthBanana on 15 May 2014 - 08:30 AM

You know - just thought I would mention - I hated computer science.. It just wasn't a very fun or challenging program at my University. I got my degree in something else instead that I was more interested in while learning to program on my own.

 

I love programming and I have made a lot of stuff by now!

 

My point is that just because you don't like comp sci doesn't mean you don't like programming or coding in games. Go ahead and get your degree in a program that is interesting to you at the University you are attending - but try learning some programming on your own for fun. I think you will be surprised at how much fun stuff you can do without needing a computer science degree.




#5153591 Creating a Data Block Loader or something?

Posted by EarthBanana on 14 May 2014 - 10:14 AM

You can use templated classes to load different types - in fact its how I load different types of components in to one component vector.. just make whatever your container class is (in my case Entity) templated so that it can call new TemplateType() on whatever subclass type you are trying to add to the vector..

 

ie my templated Entity class adds components like this

	template<class CompType>
	CompType * createComponent(NSbool pOverwrite=true)
	{
		CompType * comp = new CompType(this);
		comp->init();
                mComponents[CompType::getType()] = pComp;
		return comp;
	}

 where mComponents is a vector of component pointers (I removed some error checking stuff to make it more readable)... I personally use a known index system so that certain components are always at certain positions in the vector - but that is irrelevant for you - you could just add the new component with a push back

 

Also - when you get you menus.. if you have a templated container class to get them from - you can get them without having to typecast each time... just define a getMenu function and do the typecast within the function returning the templated type.. something like this..

template<class MenuType>	
MenuType * getMenu(std::string & pMenuName)
{
	if (hasMenu<MenuType>(pMenuName)) // check to make sure it has the menu
		return (MenuType*)mMenus.findMenu(pMenuName); // do the typecast here - you might want to use a different type of cast but even this should work
	return NULL; // if no menu was found return NULL
}

Hope that helps




#5151662 What is your opinion and how would you do a structure that has multyple funct...

Posted by EarthBanana on 05 May 2014 - 12:32 PM

It seems like you are trying to implement a component system - I agree that you don't really need bit fields to do that - why don't you do something like make a base struct called Component (or something similar) and then make all of your other structs inherit from that struct?

 

In your objects you could do something like have a vector of pointers to Component structs.. then you can add and remove components dynamically

 

You could either create virtual serialize and deserialize functions in your base component struct that inheriting structs must define for writing and reading their contents to and from file - or if you make all parts of your struct components constant sized (ie no std::string or pointers or anything like that) you could directly read and write them to file as lump memory blocks ( outFile.write((char*) myComponent, sizeof(MyComponent)) )

 

Just an idea




#5150774 What's a good language/engine to try for someone who can animate and lear...

Posted by EarthBanana on 01 May 2014 - 12:21 PM

looks like your answer lies within Unity

 

and yes you can build up as you go, in fact I would argue that is the only way you should do it - just be aware that most code or scripts you make will eventually be replaced no matter how hard you try to make something reusable

 

so avoid trying too hard - reusable stuff can only be made with lots of experience

 

But you should take a look at Unity




#5127364 Hello

Posted by EarthBanana on 29 January 2014 - 09:21 PM

I can say, python was my first language and I don't regret it at all




#5126858 Hello

Posted by EarthBanana on 27 January 2014 - 08:31 PM


I just asked anyway because I thought their might be other languages which might more suitable to my long term goals for my games as I originally mentioned.

 

These languages are suitable for your long term goals - though that doesn't mean you will always use them. Languages are just tools - and if you stick with game dev you will likely learn many languages and when to use them for what.

 

C# is great for the app development world and is what a lot of tools that speed up the game dev process use. Python is just really easy to make things quickly. Both languages are fairly high level and forgiving - they make it harder for you to write bad programs (though of course you still easily can).

 

C++ is kind of a hot word- and its because its one of the most powerful and difficult to use effectively. Beginners are often shooed away from it because the development time for games (even using lots of libraries) is usually very long due to the complex nature of the language.

 

Java is similar to C++ though I have found it has a bit less steep learning curve due to its automatic garbage collection and not using pointers.

 

IMO, if your starting game dev because you love programming then go for c++ - you will do a lot of reinventing the wheel and get less extravagant final projects for equal amounts of time you could put in to developing with other languages/tools, but you will understand programming a lot better. It will also make picking up new languages easy - when you love programming learning c++ is very rewarding.

 

If your in it for making the games - ie your more interested in getting your idea for a game produced and working than you are in understanding the details of how the computer is making the game work - then definitely c# or python are good choices. With these languages you will be able to create games much more quickly than with c++ especially if you use tools such as Unity.

 

In the long road - you will likely use and learn different languages depending on the project your working on




#5125257 First game. Looking for some info/advice

Posted by EarthBanana on 21 January 2014 - 12:54 AM

For sharing files I would recommend Subversion with google code - it will keep track of you commits and changes and such for you




#5124633 Is using Java a good way to create a game?

Posted by EarthBanana on 18 January 2014 - 06:09 AM

You would draw your character sprite sheets (assuming you are talking 2d here) on regular image formats - png, jpg, whatever - then you would render those images on to quads which will have dimensions determined by the vertices that make up the quad.. a quad consists of 2 triangles which is 6 vertices..

 

The process of drawing the quad and rendering a loaded texture to that quad is different if you are using shaders or not - it is at least a few pages to describe these processes but there should be plenty of tutorials on how to do this using java/opengl

 

basically your characters would be sections of a sprite sheet texture rendered on to the quad - you can transform this quad around the screen and cycle through your sprite sheet to animate the character




#5124617 Is using Java a good way to create a game?

Posted by EarthBanana on 18 January 2014 - 03:00 AM

OpenGL is an interface for the video card - so calling opengl functions is the way that you ask the video card to draw stuff - you aren't actually "drawing" anything yourself - you provide opengl with the data by calling functions and then you have it draw using that data by again calling functions




#5124374 Is using Java a good way to create a game?

Posted by EarthBanana on 17 January 2014 - 06:47 AM

yeah java is legit for making games - either using game/rendering libraries or making your own

 

also it is a good beginner language as it does garbage collection for you - it also can be fairly powerful (used to make minecraft with opengl)




#5123513 is there a more confortable way to order tiles in a isometric game?

Posted by EarthBanana on 14 January 2014 - 03:03 AM

I think the first way you did it is most common

 

http://www.gamedev.net/blog/33/entry-2250273-isometric-map-in-sfml/

 

You can also easily do isometric using 3d with a fixed camera - might sound hard to do 3d but it could likely end up being a lot

easier because you wouldnt have to worry about draw order






PARTNERS