Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411708 Posts in 69402 Topics- by 58457 Members - Latest Member: FezzikTheGiant

May 20, 2024, 02:26:45 PM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperTechnical (Moderator: ThemsAllTook)The happy programmer room
Pages: 1 ... 252 253 [254] 255 256 ... 279
Print
Author Topic: The happy programmer room  (Read 680353 times)
ferreiradaselva
Level 3
***



View Profile
« Reply #5060 on: October 16, 2017, 03:40:42 AM »

I'm using Godot, which comes with their own physics for now (although vehicle code is almost a direct copy of Bullet's). It's 3D and the only reason why I haven't started a thread is, it doesn't look nice so far. Waiting for Godot 3.0. on that count.

Nice! Godot is really promising. Imo, the 2D is already superior to other engines with built-in editor (GM, Unity).


Happy bc...

I have a reference document almost complete for my gamedev framework: https://github.com/ferreiradaselva/cgdfw/blob/master/REFERENCE.md

And for my math library: https://github.com/ferreiradaselva/mathc/blob/master/REFERENCE.md

Logged

JWki
Level 4
****


View Profile
« Reply #5061 on: October 18, 2017, 02:17:38 AM »

Somewhat inspired by the blog post I posted somewhere else in these forums recently, I'm playing around with a data driven system for generic objects. As in, you feed the system with layout descriptions of your objects and it'll dynamically create them in memory without relying on in-code definitions of the types. For example, here's some code to register a type and create an instance of it:

Code:
PropertyDesc fooProperties[] = {
            { BaseType::FLOAT3, "position" },
            { BaseType::STRING, "description" },
            { BaseType::OBJECT, "parent"}
            
        };
        ObjectTypeDesc fooTypeDesc;
        fooTypeDesc.name = "foo";
        fooTypeDesc.numProperties = 3;
        fooTypeDesc.properties = fooProperties;

        fooType = objDatabase->RegisterType(&fooTypeDesc);
        foo = objDatabase->CreateObjectWithType("foo_instance", fooType);

While this is a manual process, you could as well have it automatically do this, reading the layout from a file.
The instance can then be edited just like a regular struct:



The only difference being that the system manually reserves the memory for all the fields, storing for each field the type and other metadata.

I'm probably going to dig up my old libclang reflection tool and rewrite it to output something that this system can use for some fun times.

Now you might think why the fuck would you want to do something like this - use cases I have in mind are for example allowing tools to edit instances of types that live in entirely different codebases, i.e. allow tools to not have to share code with whatever application data they're editing.
Logged
ferreiradaselva
Level 3
***



View Profile
« Reply #5062 on: October 18, 2017, 11:02:31 AM »

Just had the idea to create a tool to convert 3D .OBJ to C header. I will try to make it human readable on the c-side, too.

edit: oh, there's already something for that: https://github.com/takeiteasy/obj2header/tree/master/example

I will still make it, tho. It would be useful if it's a script (Lua) instead of a program. Quicker for people to use.
Logged

qMopey
Level 6
*


View Profile WWW
« Reply #5063 on: October 18, 2017, 12:16:28 PM »

Quicker for people to use.

Debateable. Personally I would be more likely to use it if it's C, not Lua. Writing it in Lua places a Lua dependency on your code, which is a pretty big dependency. Also, if it's in C you can optionally just write a little Lua binding, making the Lua use-case optional.
Logged
ferreiradaselva
Level 3
***



View Profile
« Reply #5064 on: October 18, 2017, 12:36:02 PM »

I mean writing a Lua script just to convert the files, not embed on your C code. So one can just do that:

Code:
lua ./obj2c.lua ./model.obj ./model.h

Or were you referring to that too?

edit:
welp, i think i got it working already:
Code:
#include <stdint.h>
static uint32_t test_length = 32;
static float test[] = {
/* Face 1*/
1.200001f, 2.000000f, -1.199999f, 0.0000f, -0.1483f, -0.9889f, 0.500000f, 0.666667f,
0.900000f, 0.000000f, -0.900000f, 0.0000f, -0.1483f, -0.9889f, 0.500000f, 0.000000f,
0.000000f, 0.000000f, -0.900000f, 0.0000f, -0.1483f, -0.9889f, 0.750000f, 0.000000f,
/* Face 2*/
0.900000f, 0.000000f, -0.900000f, 0.0000f, -1.0000f, 0.0000f, 0.750000f, 0.666667f,
0.900000f, 0.000000f, 0.000000f, 0.0000f, -1.0000f, 0.0000f, 0.500000f, 0.666667f,
0.000000f, 0.000000f, 0.000000f, 0.0000f, -1.0000f, 0.0000f, 0.500000f, 1.000000f,
/* Face 3*/
1.200001f, 2.000000f, -1.199999f, 0.1622f, 0.9733f, -0.1622f, 0.500000f, 0.666667f,
0.000000f, 2.000000f, -1.200000f, 0.1622f, 0.9733f, -0.1622f, 0.250000f, 0.666667f,
0.000000f, 2.400000f, 0.000000f, 0.1622f, 0.9733f, -0.1622f, 0.250000f, 1.000000f,
/* Face 4*/
0.900000f, 0.000000f, -0.900000f, 0.9889f, -0.1483f, 0.0000f, 1.000000f, 0.000000f,
1.200001f, 2.000000f, -1.199999f, 0.9889f, -0.1483f, 0.0000f, 1.000000f, 0.666667f,
1.200000f, 2.000000f, 0.000000f, 0.9889f, -0.1483f, 0.0000f, 0.750000f, 0.666667f,
/* Face 5*/
0.000000f, 2.458861f, -1.855321f, -0.0000f, 0.8192f, 0.5736f, 0.750000f, 0.666667f,
1.200001f, 2.458861f, -1.855321f, -0.0000f, 0.8192f, 0.5736f, 0.500000f, 0.666667f,
0.800001f, 2.688292f, -2.182982f, -0.0000f, 0.8192f, 0.5736f, 0.501001f, 0.998999f,
/* Face 6*/
0.000000f, 2.000000f, -1.200000f, -0.0000f, 0.8192f, 0.5736f, 0.750000f, 1.000000f,
1.200001f, 2.000000f, -1.199999f, -0.0000f, 0.8192f, 0.5736f, 0.750000f, 0.666667f,
1.200001f, 2.458861f, -1.855321f, -0.0000f, 0.8192f, 0.5736f, 0.500000f, 0.666667f,
/* Face 7*/
1.892841f, 2.397622f, 0.000000f, 0.4967f, -0.8677f, -0.0207f, 0.750000f, 0.666667f,
1.823560f, 2.388115f, -1.241185f, 0.4967f, -0.8677f, -0.0207f, 0.500000f, 0.666667f,
2.193074f, 2.590095f, -0.863477f, 0.4967f, -0.8677f, -0.0207f, 0.500000f, 1.000000f,
/* Face 8*/
1.200000f, 2.000000f, 0.000000f, 0.5122f, -0.8588f, -0.0112f, 0.500000f, 1.000000f,
1.200001f, 2.000000f, -1.199999f, 0.5122f, -0.8588f, -0.0112f, 0.750000f, 1.000000f,
1.823560f, 2.388115f, -1.241185f, 0.5122f, -0.8588f, -0.0112f, 0.750000f, 0.666667f,
/* Face 9*/
-1.200001f, 2.000000f, -1.199999f, 0.0000f, -0.1483f, -0.9889f, 1.000000f, 0.666667f,
0.000000f, 2.000000f, -1.200000f, 0.0000f, -0.1483f, -0.9889f, 0.750000f, 0.666667f,
0.000000f, 0.000000f, -0.900000f, 0.0000f, -0.1483f, -0.9889f, 0.752001f, 0.001001f,
/* Face 10*/
-0.900000f, 0.000000f, -0.900000f, 0.0000f, -1.0000f, 0.0000f, 0.750000f, 0.666667f,
0.000000f, 0.000000f, -0.900000f, 0.0000f, -1.0000f, 0.0000f, 0.750000f, 1.000000f,
0.000000f, 0.000000f, 0.000000f, 0.0000f, -1.0000f, 0.0000f, 0.500000f, 1.000000f,
/* Face 11*/
-1.200001f, 2.000000f, -1.199999f, -0.1622f, 0.9733f, -0.1622f, 0.250000f, 0.666667f,
-1.200000f, 2.000000f, 0.000000f, -0.1622f, 0.9733f, -0.1622f, 0.500000f, 0.666667f,
0.000000f, 2.400000f, 0.000000f, -0.1622f, 0.9733f, -0.1622f, 0.500000f, 1.000000f,
/* Face 12*/
-0.900000f, 0.000000f, -0.900000f, -0.9889f, -0.1483f, 0.0000f, 0.500000f, 0.000000f,
-0.900000f, 0.000000f, 0.000000f, -0.9889f, -0.1483f, 0.0000f, 0.750000f, 0.000000f,
-1.200000f, 2.000000f, 0.000000f, -0.9889f, -0.1483f, 0.0000f, 0.750000f, 0.666667f,
/* Face 13*/
0.000000f, 2.458861f, -1.855321f, -0.0000f, 0.8192f, 0.5736f, 0.750000f, 0.666667f,
0.000000f, 2.688292f, -2.182982f, -0.0000f, 0.8192f, 0.5736f, 0.748999f, 0.998999f,
-0.800001f, 2.688292f, -2.182982f, -0.0000f, 0.8192f, 0.5736f, 0.501001f, 0.998999f,
/* Face 14*/
0.000000f, 2.000000f, -1.200000f, -0.0000f, 0.8192f, 0.5736f, 0.750000f, 1.000000f,
0.000000f, 2.458861f, -1.855321f, -0.0000f, 0.8192f, 0.5736f, 0.500000f, 1.000000f,
-1.200001f, 2.458861f, -1.855321f, -0.0000f, 0.8192f, 0.5736f, 0.500000f, 0.666667f,
/* Face 15*/
-1.892841f, 2.397622f, 0.000000f, -0.4967f, -0.8677f, -0.0207f, 0.750000f, 0.666667f,
-2.239262f, 2.596432f, 0.000000f, -0.4967f, -0.8677f, -0.0207f, 0.750000f, 1.000000f,
-2.193074f, 2.590095f, -0.863477f, -0.4967f, -0.8677f, -0.0207f, 0.500000f, 1.000000f,
/* Face 16*/
-1.200000f, 2.000000f, 0.000000f, -0.5122f, -0.8588f, -0.0112f, 0.500000f, 1.000000f,
-1.892841f, 2.397622f, 0.000000f, -0.5122f, -0.8588f, -0.0112f, 0.500000f, 0.666667f,
-1.823560f, 2.388115f, -1.241185f, -0.5122f, -0.8588f, -0.0112f, 0.750000f, 0.666667f,
/* Face 17*/
1.200001f, 2.000000f, 1.199999f, 0.0000f, -0.1483f, 0.9889f, 0.500000f, 0.666667f,
0.000000f, 2.000000f, 1.200000f, 0.0000f, -0.1483f, 0.9889f, 0.250000f, 0.666667f,
0.000000f, 0.000000f, 0.900000f, 0.0000f, -0.1483f, 0.9889f, 0.250000f, -0.000000f,
/* Face 18*/
0.900000f, 0.000000f, 0.900000f, 0.0000f, -1.0000f, 0.0000f, 0.750000f, 0.666667f,
0.000000f, 0.000000f, 0.900000f, 0.0000f, -1.0000f, 0.0000f, 0.750000f, 1.000000f,
0.000000f, 0.000000f, 0.000000f, 0.0000f, -1.0000f, 0.0000f, 0.500000f, 1.000000f,
/* Face 19*/
1.200001f, 2.000000f, 1.199999f, 0.1622f, 0.9733f, 0.1622f, 0.500000f, 0.666667f,
1.200000f, 2.000000f, 0.000000f, 0.1622f, 0.9733f, 0.1622f, 0.250000f, 0.666667f,
0.000000f, 2.400000f, 0.000000f, 0.1622f, 0.9733f, 0.1622f, 0.250000f, 1.000000f,
/* Face 20*/
0.900000f, 0.000000f, 0.900000f, 0.9889f, -0.1483f, 0.0000f, 0.500000f, -0.000000f,
0.900000f, 0.000000f, 0.000000f, 0.9889f, -0.1483f, 0.0000f, 0.750000f, 0.000000f,
1.200000f, 2.000000f, 0.000000f, 0.9889f, -0.1483f, 0.0000f, 0.750000f, 0.666667f,
/* Face 21*/
0.000000f, 2.458861f, 1.855321f, -0.0000f, 0.8192f, -0.5736f, 0.750000f, 0.666667f,
0.000000f, 2.688292f, 2.182982f, -0.0000f, 0.8192f, -0.5736f, 0.748999f, 0.998999f,
0.800001f, 2.688292f, 2.182982f, -0.0000f, 0.8192f, -0.5736f, 0.501001f, 0.998999f,
/* Face 22*/
0.000000f, 2.000000f, 1.200000f, -0.0000f, 0.8192f, -0.5736f, 0.750000f, 1.000000f,
0.000000f, 2.458861f, 1.855321f, -0.0000f, 0.8192f, -0.5736f, 0.500000f, 1.000000f,
1.200001f, 2.458861f, 1.855321f, -0.0000f, 0.8192f, -0.5736f, 0.500000f, 0.666667f,
/* Face 23*/
1.892841f, 2.397622f, 0.000000f, 0.4967f, -0.8677f, 0.0207f, 0.750000f, 0.666667f,
2.239262f, 2.596432f, 0.000000f, 0.4967f, -0.8677f, 0.0207f, 0.750000f, 1.000000f,
2.193074f, 2.590095f, 0.863477f, 0.4967f, -0.8677f, 0.0207f, 0.500000f, 1.000000f,
/* Face 24*/
1.200000f, 2.000000f, 0.000000f, 0.5122f, -0.8588f, 0.0112f, 0.500000f, 1.000000f,
1.892841f, 2.397622f, 0.000000f, 0.5122f, -0.8588f, 0.0112f, 0.500000f, 0.666667f,
1.823560f, 2.388115f, 1.241185f, 0.5122f, -0.8588f, 0.0112f, 0.750000f, 0.666667f,
/* Face 25*/
-1.200001f, 2.000000f, 1.199999f, 0.0000f, -0.1483f, 0.9889f, 0.000000f, 0.666667f,
-0.900000f, 0.000000f, 0.900000f, 0.0000f, -0.1483f, 0.9889f, 0.000000f, 0.000000f,
0.000000f, 0.000000f, 0.900000f, 0.0000f, -0.1483f, 0.9889f, 0.250000f, -0.000000f,
/* Face 26*/
-0.900000f, 0.000000f, 0.900000f, 0.0000f, -1.0000f, 0.0000f, 0.750000f, 0.666667f,
-0.900000f, 0.000000f, 0.000000f, 0.0000f, -1.0000f, 0.0000f, 0.500000f, 0.666667f,
0.000000f, 0.000000f, 0.000000f, 0.0000f, -1.0000f, 0.0000f, 0.500000f, 1.000000f,
/* Face 27*/
-1.200001f, 2.000000f, 1.199999f, -0.1622f, 0.9733f, 0.1622f, 0.500000f, 0.666667f,
0.000000f, 2.000000f, 1.200000f, -0.1622f, 0.9733f, 0.1622f, 0.250000f, 0.666667f,
0.000000f, 2.400000f, 0.000000f, -0.1622f, 0.9733f, 0.1622f, 0.250000f, 1.000000f,
/* Face 28*/
-0.900000f, 0.000000f, 0.900000f, -0.9889f, -0.1483f, 0.0000f, 1.000000f, 0.000000f,
-1.200001f, 2.000000f, 1.199999f, -0.9889f, -0.1483f, 0.0000f, 1.000000f, 0.666667f,
-1.200000f, 2.000000f, 0.000000f, -0.9889f, -0.1483f, 0.0000f, 0.750000f, 0.666667f,
/* Face 29*/
0.000000f, 2.458861f, 1.855321f, -0.0000f, 0.8192f, -0.5736f, 0.750000f, 0.666667f,
-1.200001f, 2.458861f, 1.855321f, -0.0000f, 0.8192f, -0.5736f, 0.500000f, 0.666667f,
-0.800001f, 2.688292f, 2.182982f, -0.0000f, 0.8192f, -0.5736f, 0.501001f, 0.998999f,
/* Face 30*/
0.000000f, 2.000000f, 1.200000f, -0.0000f, 0.8192f, -0.5736f, 0.750000f, 1.000000f,
-1.200001f, 2.000000f, 1.199999f, -0.0000f, 0.8192f, -0.5736f, 0.750000f, 0.666667f,
-1.200001f, 2.458861f, 1.855321f, -0.0000f, 0.8192f, -0.5736f, 0.500000f, 0.666667f,
/* Face 31*/
-1.892841f, 2.397622f, 0.000000f, -0.4967f, -0.8677f, 0.0207f, 0.750000f, 0.666667f,
-1.823560f, 2.388115f, 1.241185f, -0.4967f, -0.8677f, 0.0207f, 0.500000f, 0.666667f,
-2.193074f, 2.590095f, 0.863477f, -0.4967f, -0.8677f, 0.0207f, 0.500000f, 1.000000f,
/* Face 32*/
-1.200000f, 2.000000f, 0.000000f, -0.5122f, -0.8588f, 0.0112f, 0.500000f, 1.000000f,
-1.200001f, 2.000000f, 1.199999f, -0.5122f, -0.8588f, 0.0112f, 0.750000f, 1.000000f,
-1.823560f, 2.388115f, 1.241185f, -0.5122f, -0.8588f, 0.0112f, 0.750000f, 0.666667f,
};

test_length is the total of faces.

first 3 columns are [X,Y,Z], the next 3 are the normal, and the last 2 are the texture coordinates.


EDIT:

It lives:


Still trying to find the problem with the texture coordinates.
« Last Edit: October 18, 2017, 07:02:17 PM by ferreiradaselva » Logged

qMopey
Level 6
*


View Profile WWW
« Reply #5065 on: October 18, 2017, 08:16:17 PM »

Quote from: ferreiradaselva
Or were you referring to that too?

Referring to written in C, with optional bind to Lua.
Logged
JWki
Level 4
****


View Profile
« Reply #5066 on: October 20, 2017, 03:19:22 AM »

So, uh, I've implemented inheritance (stop me)




Type definition is fed to system at runtime, system creates in-memory representation for each instance. Types can have prototype objects associated with them that serve as default for all objects of that type.
Logged
ferreiradaselva
Level 3
***



View Profile
« Reply #5067 on: October 20, 2017, 06:45:01 AM »

So, uh, I've implemented inheritance (stop me)

Type definition is fed to system at runtime, system creates in-memory representation for each instance. Types can have prototype objects associated with them that serve as default for all objects of that type.

I can't even imagine the level of complexity your project is rn. I've done something a bit like that in the past (Gtk + Lua), but I ended up killing the project (far too much work, and I didn't have inheritance involved).

By the way, does the reflection allows to build the game without traces of the code that integrates it with the editor?

---


Well, I found the texture problem. For some reason, I had to make the Y of the UV negative. I don't know if it's the PNG saving upside-down (which can happen) or something wrong with the OBJ. I'm betting the OBJ, because I didn't have upside-down PNG with other project of mine.

Here's the gif:

Logged

JWki
Level 4
****


View Profile
« Reply #5068 on: October 20, 2017, 08:41:39 AM »

So, uh, I've implemented inheritance (stop me)

Type definition is fed to system at runtime, system creates in-memory representation for each instance. Types can have prototype objects associated with them that serve as default for all objects of that type.

I can't even imagine the level of complexity your project is rn. I've done something a bit like that in the past (Gtk + Lua), but I ended up killing the project (far too much work, and I didn't have inheritance involved).

By the way, does the reflection allows to build the game without traces of the code that integrates it with the editor?

---


Well, I found the texture problem. For some reason, I had to make the Y of the UV negative. I don't know if it's the PNG saving upside-down (which can happen) or something wrong with the OBJ. I'm betting the OBJ, because I didn't have upside-down PNG with other project of mine.

Here's the gif:



It's not too complex actually but has degenerated into some sort of playground currently while I'm trying to figure out wtf I actually wanna do.

Regarding the uvs, probably were meant to be used in d3d instead of opengl.
Logged
oahda
Level 10
*****



View Profile
« Reply #5069 on: October 21, 2017, 12:55:50 PM »

Taking a day off my commissioned web work to spend some time on my own project not to go insane looking at the same code all the time. Being away from it for a while has really made me longing to get back to it!

Leaving the hotloading aside for now to work on the stuff that I really feel like doing: graphics. I'm taking my time engineering the whole thing and so far I've only written boilerplate to block out the things I need before implementing anything. Getting really functional and data-driven in this part of the code, which is fun. Tongue

I've already "gotten things working" many times before so I'm just diving straight into the full implementation now (render queues, ordering by material, batching/instancing; all that stuff), which means I'll have to decide on the final data structure for game entities now too. I'm a bit tired of being stuck in engine phase and I really want to work on my game, so I'm going for it now. I'll brush up on the tools as needed as I go. The most important thing, cross-platform building, is working and that's really all I need. c:
Logged

qMopey
Level 6
*


View Profile WWW
« Reply #5070 on: October 21, 2017, 01:28:13 PM »

So, uh, I've implemented inheritance (stop me)

A really valuable use-case for your system would be editor objects, sometimes called "proxy objects". The last two commercial projects I worked on forced engineers to write run-time objects (with lots of data members), along with "editor objects", which were typically POD and mirrored the data members of the run-time object.

The editor object just sits in memory and holds data members, typically for floats, ints, bools, strings, enums and the like. Then, when the game is launched from the editor, all the editor data members are copied into dynamically allocated run-time objects.

You can probably automate a lot of this mess with your system by algorithmically creating "editor POD objects".
Logged
ferreiradaselva
Level 3
***



View Profile
« Reply #5071 on: October 21, 2017, 05:04:20 PM »


Regarding the uvs, probably were meant to be used in d3d instead of opengl.

It was a couple of problems: the mesh was mirrored and when exporting an OBJ, the program (Blender) assumes that the texture is upside-down (which mine wasn't). The mirror problem I couldn't notice at first because the mesh is symmetric.

But, all solved now.

I've already "gotten things working" many times before so I'm just diving straight into the full implementation now (render queues, ordering by material, batching/instancing; all that stuff), which means I'll have to decide on the final data structure for game entities now too. I'm a bit tired of being stuck in engine phase and I really want to work on my game, so I'm going for it now. I'll brush up on the tools as needed as I go. The most important thing, cross-platform building, is working and that's really all I need. c:

I know the feel. I finally "finished" all the foundation and I'm working on my game(s) now. Some times I have to tweak and improve the framework, but it's minor work compared with what was before.
Logged

JWki
Level 4
****


View Profile
« Reply #5072 on: October 21, 2017, 10:34:41 PM »

So, uh, I've implemented inheritance (stop me)

A really valuable use-case for your system would be editor objects, sometimes called "proxy objects". The last two commercial projects I worked on forced engineers to write run-time objects (with lots of data members), along with "editor objects", which were typically POD and mirrored the data members of the run-time object.

The editor object just sits in memory and holds data members, typically for floats, ints, bools, strings, enums and the like. Then, when the game is launched from the editor, all the editor data members are copied into dynamically allocated run-time objects.

You can probably automate a lot of this mess with your system by algorithmically creating "editor POD objects".

Yep that's precisely the use case I've had in mind for this initially. However this might actually have use cases for the runtime as well which I'm excited about trying out.

Taking a day off my commissioned web work to spend some time on my own project not to go insane looking at the same code all the time. Being away from it for a while has really made me longing to get back to it!

Leaving the hotloading aside for now to work on the stuff that I really feel like doing: graphics. I'm taking my time engineering the whole thing and so far I've only written boilerplate to block out the things I need before implementing anything. Getting really functional and data-driven in this part of the code, which is fun. Tongue

I've already "gotten things working" many times before so I'm just diving straight into the full implementation now (render queues, ordering by material, batching/instancing; all that stuff), which means I'll have to decide on the final data structure for game entities now too. I'm a bit tired of being stuck in engine phase and I really want to work on my game, so I'm going for it now. I'll brush up on the tools as needed as I go. The most important thing, cross-platform building, is working and that's really all I need. c:

Oh god yeah I'm still neck deep in R&D BEFORE I even get to real engine code! Also looking into speeding that process up tho - developing low level stuff more in synch with actual like game stuff.
Having to decide on the the structure for game entities when working on rendering rings an alarm bell though, I propose you instead come up with a rendering side representation of the world that just contains the data required to render everything. Then whenever you have your game-side representation you add synchronization between the two.
Logged
oahda
Level 10
*****



View Profile
« Reply #5073 on: October 21, 2017, 11:56:30 PM »

Oh, I have. The rendering code doesn't need to know about any of that. I just meant since I want to start working on the game I'll need that too. c:
« Last Edit: October 22, 2017, 12:04:03 AM by Prinsessa » Logged

JWki
Level 4
****


View Profile
« Reply #5074 on: October 22, 2017, 12:57:12 AM »

Oh, I have. The rendering code doesn't need to know about any of that. I just meant since I want to start working on the game I'll need that too. c:

Very good!  
Meanwhile I can now have arrays of properties



And as I'm starting to like this object model playground I realize that the best frontend for it (as in, API to work with it) would probably be a small embedded scripting language.
So that's now a bullet point on my R&D list.
Can I just make a game yet please.

EDIT: Speaking of entity models, this is probably going to be mine. In some form. Like. Using this in some form. IDK how yet.
Logged
Ordnas
Level 10
*****



View Profile WWW
« Reply #5075 on: October 23, 2017, 12:06:20 AM »

(...) I'm a bit tired of being stuck in engine phase and I really want to work on my game, so I'm going for it now. (...)

What happened to the prototype you showed to us made in Unity? I was curious why did you not continue to use Unity instead of making an engine from scratch  Smiley You could spend more time on gameplay mechanics otherwise.
Logged

Games:

oahda
Level 10
*****



View Profile
« Reply #5076 on: October 23, 2017, 05:44:14 AM »

Because I can't help myself! Gomez Too much fun.
Logged

Crimsontide
Level 5
*****


View Profile
« Reply #5077 on: October 23, 2017, 06:25:14 AM »

Because I can't help myself! Gomez Too much fun.

I know the feeling Smiley
Logged
JWki
Level 4
****


View Profile
« Reply #5078 on: October 24, 2017, 11:29:02 AM »

Having some fun with hacking together the node graph editor sample omar had for dear imgui, extending it to actually allow to dynamically link nodes together and use my weird object system thingie to define node types - it gets all types that inherit from the base node type, then allows you to pick from them when creating new nodes.
Also already creates some sort of code as output but it doesn't make a lot of sense atm so nevermind that. Finding lots of things I want to add to my object model while doing this, like attributes for example.

Logged
InfiniteStateMachine
Level 10
*****



View Profile
« Reply #5079 on: October 24, 2017, 12:34:52 PM »

I actually found what seems like a elegant use for inheritance yesterday when working on my level editor.

I was getting annoyed at my Level class having methods like EditorDraw, EditorHighlight etc etc.

At first I thought about the proxy object discussion elsewhere on this board but wasn't too familiar on the correct way to implement it so I ended up making a EditorLevel class that extends from Level and put all the editor specific methods in there.

The serialization and other stuff only occurs in the base Level class so in theory I can go nuts adding data members and methods to EditorLevel without worrying about any of it bleeding into my serialization code.

So far it's worked out great. There's one line of code where I have to do a cast for EditorTile (derived from Tile) but I think I can fix that fairly easily.

Anyways I'm going to go with this for now. Will be interesting to see if I paint myself in a corner.

Logged

Pages: 1 ... 252 253 [254] 255 256 ... 279
Print
Jump to:  

Theme orange-lt created by panic