Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 16 Aug 2010
Offline Last Active Jun 17 2015 11:05 AM

Posts I've Made

In Topic: Game in pure C99

12 June 2015 - 08:22 AM

ActiveX components and other similar OLE-based COM objects are initialized differently from DirectX. DirectX has it's own Create*Device function that creates the initial "device" COM object, which you then use to create other COM objects for handling resources.


In order to use ActiveX controls, I think you would need to implement a COM object yourself, which is bound to your window, and provides specific interfaces to the ActiveX objects.


I made my graphics engine as an ActiveX component in C++ because it had a ready to use MFC template in Visual Studio.


Maybe I can just make a multi purpose framework and use it for everything non console like Visual Basic 6 did but static.

In Topic: Need advice on GameObject handling.

11 June 2015 - 12:15 PM

A linked list will make it hard to debug since you need to use pointers instead of indices everywhere in the code. I only use linked lists for memory recycling in C++ since a memory recycler making it's own allocations would defeat it's purpose.


An array based list with an abstraction layer for reference integrity will let you use human readable numbers to access the items so that you can reproduce the bug with pen and paper if you have to. Integers are also easier to save to a file since the old pointer might point to another application's memory after loading it back if you don't convert to indices or a tree syntax.


The type of game is ideal for table driven programming since the game logic is highly repeatable and would mostly consist of gotos if you tried to hard code it instead of reading a goto table from a loop. Storing your game logic in a table will allow you to load and save custom levels.

The paradigm is based on turing machines that switch between different states. http://en.wikipedia.org/wiki/Turing_machine

In Topic: Game in pure C99

10 June 2015 - 09:13 AM

I tried using GetProcAddress a few months ago in an attempt to load an ActiveX component but could not find out how to connect the loaded component to a window.


If it gets messy, I can modify my language to hide the complexity.

In Topic: Game in pure C99

09 June 2015 - 11:02 AM

Are there any good tutorial for calling OpenGL directly without any GLUT or math library?


My compiler only outputs one giant string of C code to be compiled and should not have a too long list of things to do in order to compile the C code on different compilers for the programmer.

In Topic: Game in pure C99

08 June 2015 - 12:10 PM

Without static linking, you have to manually decode a bunch of COM interface details and build function pointer tables. Honestly if you want to do a pure dynamic loader, it will be much easier to use OpenGL, as it is a pure C API.


That could work. smile.png