-
Posts
4,127 -
Joined
-
Last visited
Content Type
Blogs
Forums
Store
Gallery
Videos
Blog Comments posted by Canardia
-
-
Mesh::Load() is for the OOP interface, LoadMesh() is for the procedural interface. You make the procedural interface by using the OOP interface internally, just like you did in LE2 with BlitzMax.
-
try/catch is not really meant for actual programming, but only for theoretical programming and teaching purposes. You should rather use checking of NULL pointers in your code, or use references.
-
And I'm the evil Sith Lord of C++
-
Oh, you mean probably extreme OOP, with .Get/.Set style methods, like in C#:
// Define objects Graphics graphics; World world; Mesh box; Camera camera; // Create graphics window graphics.Driver.Set( OpenGLGraphicsDriver() ); graphics.Create(1024,768,4); world.Create(); // Create a box; box.Create(1,1,1); box.Material.Shader.Load("Shaders/minimal.shader"); box.Material.Color.Set(1,0,0,1); camera.Create(); camera.Color.SetClear( Vec4(0,1,0,1) ); box.Position.Set(0,0,-2,false); float yaw = 0.0; while (!window.Closed()) { yaw++; box.Rotation.Set(yaw,0,0,false); camera.Render(); window.Flip(); }
-
I would do it like this:
// Define objects Graphics graphics; World world; Shader shader; Material mat; Mesh box; Camera camera; // Create graphics window graphics.SetDriver( OpenGLGraphicsDriver() ); graphics.Create(1024,768,4); world.Create(); // Load a shader shader.Load("Shaders/minimal.shader"); // Create a material; mat.Create(); mat.SetShader(shader); mat.SetColor(1,0,0,1); // Create a box; box.Create(1,1,1); box.SetMaterial(mat); camera.Create(); camera.SetClearColor( Vec4(0,1,0,1) ); box.SetPosition(0,0,-2,false); float yaw = 0.0; while (!window.Closed()) { yaw++; box.SetRotation(yaw,0,0,false); camera.Render(); window.Flip(); }
-
Most, if not all C++ libraries use their own namespaces and constants. So you could say:
#define LE_NULL NullEntity()
and then use:
TFormPoint( 1, 2, 3, LE_NULL, entity );
You shouldn't worry about C++ features at all, since you need to make a procedural C++ DLL for other languages anyway, just like you needed to with BlitzMax. The BlitzMax DLL had no BlitzMax features either.
-
I wouldn't make things more complicated than they really are. If the user deletes a texture of a material, he should do it from a method of the Material class, which should set the Texture pointer to NULL. Then the Material class can properly check for NULL textures.
When the user destroys a texture which is used by other materials also, they should not stay visible! It would be like, WTF I just deleted the texture from the computer's memory, why is that material on that mesh still showing it, do I have to loop through the whole computer's memory to delete all copies? Why can't the engine do it automatically, since I definitely wanted to delete that texture, and I'm fully aware that it's used in many places?
-
The ambient light areas ruin the overall quality, while the scene quality is very good else.
SSAO tries to fix the quality loss abit, but you could turn off SSAO completely when using spot and pointlights.
I would rather use 0,0,0 ambient light, and use spot and pointlights to illuminate too dark areas.
I've seen some small scenes with a few pointlights, and they look really good when placed right (if you remember the scene with the dead lizardman laying on a stone).
-
Using voxels you wouldn't need much math at all. Subtract and add any 2 or more voxel clouds, and then transform the result to polygons. It would make also 3D textures possible, which you can't do with conventional polygon based CSG.
-
IE9 doesn't work with XP, so it's useless.
-
As long you keep saying developing in C++ is slower than in BlitzMax, then you are not sufficiently skilled in C++ yet, or you haven't written enough own standard functions which BlitzMax has (BlitzMax would be a horror without all the standard functions also).
The main reason why I got pissed with BlitzMax was that it took over 5 minutes to start a real game in debug mode. So I figured BlitzMax is nice for small projects, but when things get real, it's not made for the power which is needed. Besides, I always liked the C++ syntax, even when I was professionally programming in Pascal at work. I always looked at C++ and thought that someday I will convert all my Pascal code to C++.
-
This is not according to global standard:
entity->SetPosition(x,y,z) EntitySetPosition(entity,x,y,z) // error: standard violation!
The standard says when using methods, the object comes first (since it's OOP), followed by the OOP seperator and then verb and subject.
In procedural form verb comes first, then object and then subject (and of course the instance of object as first parameter):
entity->SetPosition(x,y,z) SetEntityPosition(entity,x,y,z)
This is easy to remember, since the procedural form is how you speak in real life too, and the OOP form only puts the object instance in front (so the object instance is not even part of the command, it's just the thing on what you operate).
-
Camp Revolver, because it has 6 slots
-
PC gaming is not dead, it's just that PC games are for people of over 6 years age (they need the motoristic muscle and brain skills to operate a keyboard with 105 keys and a mouse), and consoles are for people of 0-6 years age. Some people still don't follow this rule, I don't know why, because it's so simple.
-
You ask what you are doing, and you write a roman. That's what you are doing. You are thinking, and there's nothing more valuable in life. Thinking is the most powerful tool given to us, to spread godspark's beautiful idea of happiness.
-
@Red: I guess you're not using framework, because particles work fine except over water. So it's not a bug in the engine, but you are not using it correctly.
-
I can write the storyline to the game:
Supernatural Squid approaches girl. Girl tries to lift the massive sword, but it's too heavy for her to even move it an inch. Squid eats the girl as a snack. Game Over.
-
I would use the new C++0x standard, which is implemented in VS2010 C++ and GNU C++. This allows for example the use of rvalue references (&&), which makes code much faster since it implements true moving of references (copying of pointers only), while in the old C++ they were faked by copying (move vs copy constructor). This gives especially a huge speed boost when working with vectors, maps and other STL containers.
See also:
http://www.informit.com/guides/content.aspx?g=cplusplus&seqNum=480
and
http://thbecker.net/articles/rvalue_references/section_01.html
and of course
http://en.wikipedia.org/wiki/C%2B%2B0x#Rvalue_reference_and_move_semantics
-
@Chris:
The transparent GUI is done with SetBlend(BLEND_ALPHA) and DrawImage() commands. It's a custom GUI for LE, which I will include in gamelib 0.0.1.0 also (it's a separate gui.cpp and gui.h file, so it can be used also without gamelib by the infidels).
The building parts are placed on a 1x1x1 meter grid, with an additional Y offset which can be controlled with the cursor up/down, end (=reset) keys. The mouse wheel rotates the part 90° cw/ccw.
-
Yeah, baked AO is the way to go with vertex engines. It takes too much FPS to do as good quality AO with shaders. The FPS can be used for much more important stuff which you can't bake, like raytracing, or at least light bounce and color bleed.
-
I must get a Kinect when it comes out in December. It works on PC also. They say they will price it quite close to the costs, to get maximum impact on the market.
-
They are all the same family: An, Anu, Anunnaki (her children), Anshar, Anubis, ...
-
The lights look amazingly good even without additional translucent cone meshes.
-
LOL, that's the funniest typo I've seen!
Although I think the correct word is invaluable?
Just to say Hi !
in Afke's Blog
A blog by Afke in General
Posted
I agree 100%. Freedom and to be able to make anything you want is the easiest and most powerful game engine.