Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 19 Mar 2007
Online Last Active Today, 02:41 AM

#5302137 Polygon Selection

Posted by Amr0 on 23 July 2016 - 04:22 AM

Problem is, I also need to calculate the intersection point. I am using that information to position my 3D cursor. So color picking doesn't really apply here.


You can still use rasterization to find the triangle at the specific point, then you can use math to find the exact intersection point between the selection ray and that specific triangle.


That said, I think it is more reasonable to make distinct separation between working with dense meshes (sculpting) and "regular" meshes modeled by hand. This will make it easier for you as a programmer, and users will not object to having two different workflows for both kinds of models, as that's generally the standard approach.

#5294443 First-person weapon rendering techniques

Posted by Amr0 on 01 June 2016 - 05:23 AM


#5294435 Early Access vs "one shot"

Posted by Amr0 on 01 June 2016 - 04:26 AM

I've never released a game in early access, but I have once released open source software pre version 1.0 that wasn't ready for prime time.

I wanted to get it out to the world and get some feedback, others in the team didn't want to release yet.

The software was so buggy it damaged the softwares reputation and it took from 1.0 to 1.2 to get that back (a space of four whole years).

Tread carefully releasing anything you're not 100% happy for others to see.


I have a feeling that end users expect Early Access products to be more buggy and less complete than public beta? Solid advice though, thank you!


@Envy123: How far away from the beginning of development (or from release) do you release for early access?

#5292655 Shader Node Graph

Posted by Amr0 on 20 May 2016 - 11:23 AM



Do you just categorize this as another "shader permutation" and take an uber shader approach"?


Yes, mostly. If you notice in UE4, the uber shader is represented as a single node, and the user can create a node network to provide inputs for the main uber shader functions. I wrote a short blog post about such a system here. However, I think it doesn't go into enough details to be very useful to you, and also it was just a prototype rather than a real-world solution.

#5292423 Architecture for a C++ Widget Library

Posted by Amr0 on 19 May 2016 - 01:28 AM


The library does not handle drawing by itself. It produces 2D geometry in the form of vertex + index arrays which can be passed by the user to OpenGL or DirectX.


That the library doesn't handle drawing itself is not a bad thing. But instead of being geometry based, why not texture based? Why not asking the client to implement a simple rendering interface, or an entire platform interface for gui event handling/triggering as well as drawing:

class GuiPlatform
	// rendering
	virtual void RenderItem( Rectangle rect, TextureId texture, Rectangle texturePortion ) = 0;
	virtual TextureId LoadTexture( const char* fileName ) = 0;
	// system interaction
	virtual point GetCursorPos() = 0;
	virtual size GetWindowSzie() = 0;
	virtual int HanleEvent( EventType, EventData ) = 0;

bool InitGuiLibrary( GuiPlatform* myGuiPlatform );

Then in your SDK provide sample implementations for DX11, OpenGL, Win32, or whatever.


Edit: Personally I'd name it Open Widget Library (OWL), but that's just me... owls are cool [@v@]

#5290687 Custom editor undo/redo system

Posted by Amr0 on 08 May 2016 - 12:33 PM

In my application (Curver, see signature), I use the third approach. However, it doesn't have to be complicated. For example, to modify the properties of an object, the undoable command class looks like this:

class CmdModifyCurveProperties : public Command
	Curve::Properties m_properties;
	Curve* m_pCurve;
	Execute( Curve& curve )
		m_pCurve = &curve;
		m_properties = curve.properties;
	Undo() { SwitchProperties(); }
	Redo() { SwitchProperties(); }
		Curve::Properties p = m_pCurve->properties;
		m_pCurve->properties = m_properties;
		m_properties = p;

pDocument->AddCommand( (new CmdModifyCurveProperties)->Execute( theCurve ) );
// now we can change the properties however we want and the changes will be
// undone when the command is undone.
theCurve.properties.thickness = 0.5;
theCurve.properties.color = black;

Of course, multiple commands can be grouped together for performing multiple tasks that are to be undone and redone as a unit:

auto cmdGroup = new CommandGroup;
cmdGroup->AddCommand( (new CmdCreateCurve( &theCurve ))->Execute() );
cmdGroup->AddCommand( (new CmdSelectCurve( &theCurve ))->Execute() );
cmdGroup->AddCommand( (new CmdCreateCircle( &theCircle))->Execute() );
cmdGroup->AddCommand( (new CmdSplitCurve( &theCircle, 0.5, &theDetachedPart))->Execute() );
pDocument->AddCommand( cmdGroup );

The approach in Maya seems to be complicated because it is used with scripting as well to implement undoable commands, and the interface is intended for plug-in authors instead of for direct use internally.


But there is no approach that is right for all projects. As Alberth mentioned, you will have to think about of object ownership and guaranteeing existence, so it's not without headaches. Good luck.

#5288413 open source x file format library

Posted by Amr0 on 24 April 2016 - 02:38 AM

The x file format is seemingly deprecated and I recommend you avoid it and move to something else like FBX for example, unless ditching it is not practical for your particular project. You will generally find more support with another format. This thread may be of interest.

#5287726 Native WinAPI Sortable (Button) List Functionality

Posted by Amr0 on 20 April 2016 - 12:56 AM

There is nothing natively available in win32 for this, so you'll have to implement it yourself. May I recommend an alternative GUI library for you that has this functionality and more? Sciter. I've switched from win32 to Sciter and never looked back since then. It's an HTML/JavaScript/CSS engine that is ALSO lightweight and free for commercial and non-commercial use. You can easily setup drag and drop for a button list if you look at the drag-n-drop samples in the SDK.


There is a bit of a learning curve though. One neat characteristic is that you don't have to replace your existing application's GUI completely if your application is not at its development start. You can create Sciter windows in addition to your existing native windows.

p.s: I'm not affiliated with Sciter in any way - I just like it and think it deserves more popularity.

#5287284 Direct3D9 Debugging on windows 10.

Posted by Amr0 on 17 April 2016 - 03:19 AM

If you're developing on NVidia hardware, I think you can still get some useful debugging information from NVidia's PerfHUD or NSight with DX9. Haven't personally tried it yet.

#5287280 Direct3D9 Debugging on windows 10.

Posted by Amr0 on 17 April 2016 - 02:49 AM

I remember reading the DX9 debug runtimes were disabled in Windows 7 SP1 and Windows8, so maybe they are still disabled on Windows 10. See this and this.



Not using DX9 would be a great start.

Only for a new project or a project early in development. Personally my application is nearing release after years of development and I've only recently met with this issue, but switching to DX11 would set me back a few months at least! Thanks but no thanks.

#5276156 VS2015 without internet explorer

Posted by Amr0 on 17 February 2016 - 12:11 PM

If you've already gone through the trouble of installing VS2015, why not also install IE? It's not like you have to use it or anything.

#5276095 Vulkan 1.0

Posted by Amr0 on 17 February 2016 - 01:40 AM

Still having a separate thread to discuss the release is not a bad idea I thithink.

#5272353 Best way to document gamedev progress

Posted by Amr0 on 23 January 2016 - 07:41 AM

I use Workflowy as well to keep track of my progress and planning, but it's for a line-art tool that I try to keep as simple as possible. Here is the project's workflow. I document my progress simply by dragging items from the to-do list to the completed list. But I think you have to decide what exactly you want to document and why. For a one-man team, you have to be careful to balance your time between making actual progress and documenting that progress. I think a simple documentation approach like this is suitable for small and technical progress points, and make a monthly-or-so detailed and well-written blog post to go over what's been done during that month.

#5270250 Want to create a game but can't code, tips appreciated!

Posted by Amr0 on 09 January 2016 - 05:54 AM

You can make a full game in Unreal Engine with all the needed logic and interactions using Blueprints. Blueprints is a great way to program for people who don't want to code. Go ahead and watch a few videos and see if it seems doable to you.

#5267564 Indie Game Company Names

Posted by Amr0 on 22 December 2015 - 05:36 PM

Rose Thorn studios?


Doesn't "studios" imply a company spanning multiple studios? Just curious.