|
polygone
|
|
Reply #16 Posted on: November 14, 2012, 09:01:31 am |
|
|
Location: England Joined: Mar 2009
Posts: 794
|
The normals haven't been added to the basic shapes at all, but that is a different story. If you run this 3d example in ENIGMA and GM you will see the difference: http://enigma-dev.org/edc/games.php?game=31Here's a screenshot comparing (ENIGMA on the left, GM on the right): http://i.imgur.com/HkpzC.pngYou will see it with other examples as well on the EDC, it's like the normals aren't being used at all; even though the normals are being set manually in the d3d_model_vertex_normal functions used in the model drawing. I know the normal values in the games are right because they are working fine with GM and the model function calls are fine since everything is in the right position in ENIGMA.
|
|
« Last Edit: November 14, 2012, 09:08:06 am by polygone »
|
Logged
|
I honestly don't know wtf I'm talking about but hopefully I can muddle my way through.
|
|
|
|
Josh @ Dreamland
|
|
Reply #18 Posted on: November 14, 2012, 03:43:56 pm |
|
|
Prince of all Goldfish
Location: Pittsburgh, PA, USA Joined: Feb 2008
Posts: 2950
|
Please stop fucking using get_working_directory(). All of you.
|
|
|
Logged
|
"That is the single most cryptic piece of code I have ever seen." -Master PobbleWobble "I disapprove of what you say, but I will defend to the death your right to say it." -Evelyn Beatrice Hall, Friends of Voltaire
|
|
|
polygone
|
|
Reply #19 Posted on: November 14, 2012, 03:52:36 pm |
|
|
Location: England Joined: Mar 2009
Posts: 794
|
You can macro it and add an option for it if you want it to be sorted.
|
|
|
Logged
|
I honestly don't know wtf I'm talking about but hopefully I can muddle my way through.
|
|
|
polygone
|
|
Reply #20 Posted on: November 14, 2012, 03:58:00 pm |
|
|
Location: England Joined: Mar 2009
Posts: 794
|
And nice one forthevin for sorting out the lighting! Been an annoying problem. I see it's handy having somebody who's actually used opengl lighting before as opposed to me trying to get it to work when I've never worked with opengl before.
I would love to test it right now but it appears that something is going horribly wrong, most like due to one of the recent commits by josh. - to the irc I fly
|
|
|
Logged
|
I honestly don't know wtf I'm talking about but hopefully I can muddle my way through.
|
|
|
polygone
|
|
Reply #21 Posted on: November 14, 2012, 04:26:45 pm |
|
|
Location: England Joined: Mar 2009
Posts: 794
|
That segfault has been sorted, and it looks like the lighting works yay! I shall now come to you with all my problems Ok I'll give you a break so you can get on with your particles. I do have another problem with a collision engine but I'll try and debug that a little myself first as I doubt it's specific to what you committed.
|
|
|
Logged
|
I honestly don't know wtf I'm talking about but hopefully I can muddle my way through.
|
|
|
Josh @ Dreamland
|
|
Reply #22 Posted on: November 14, 2012, 09:50:09 pm |
|
|
Prince of all Goldfish
Location: Pittsburgh, PA, USA Joined: Feb 2008
Posts: 2950
|
I don't want it to have an option; it should never appear in your code. Ever. The operating system handles it. Or at least it should, in a correct implementation, which I WILL have it use in the near future.
Anyway, I saw your request to remove the tracker link from the title bar, and I decided to make titles shiny instead. Also, went ahead and fixed the avatar gallery, since that's been broken for God knows how long.
|
|
« Last Edit: November 15, 2012, 12:43:06 am by Josh @ Dreamland »
|
Logged
|
"That is the single most cryptic piece of code I have ever seen." -Master PobbleWobble "I disapprove of what you say, but I will defend to the death your right to say it." -Evelyn Beatrice Hall, Friends of Voltaire
|
|
|
|
Josh @ Dreamland
|
|
Reply #24 Posted on: November 16, 2012, 10:45:03 am |
|
|
Prince of all Goldfish
Location: Pittsburgh, PA, USA Joined: Feb 2008
Posts: 2950
|
Okay, gentlemen; I just noticed you were talking about move_bounce. I am not privy to how you implemented it or move_contact, but I am hoping that for bbox, you just do some subtraction, and then for precise, you do some subtraction and then do a binary search (add one, add two instead, add four instead, add eight instead, add sixteen instead, add twelve instead, add eleven instead). Otherwise, I have more cleaning up to do when I'm finally free.
|
|
|
Logged
|
"That is the single most cryptic piece of code I have ever seen." -Master PobbleWobble "I disapprove of what you say, but I will defend to the death your right to say it." -Evelyn Beatrice Hall, Friends of Voltaire
|
|
|
forthevin
|
|
Reply #25 Posted on: November 18, 2012, 03:04:50 pm |
|
|
Joined: Jun 2012
Posts: 167
|
Subtraction is used in move_contact and move_bounce in bbox, and I have just added subtraction to move_contact in precise.
The current implementation of move_bounce in precise is similar in behaviour and speed to move_bounce in GameMaker. It only uses a constant number of collision checks, which is fast, but not very accurate. Subtraction would only be useful if move_bounce is made more accurate, but I think that making it more accurate would make it slower than the implementation in GameMaker.
I have thought about using binary search for move_contact as well, but I think it can only be used correctly if the collision mask is "stretched"/repeated along a line for each check. Else, the binary search might skip collisions. Since "stretching" a bit mask along a line is quite slow for medium and large bit masks, it would probably be slow in most cases to use binary search in move_contact in precise. Since a line can be "stretched" quickly, I think binary search could be used for something like collision_line_contact. Certain polygons may also be fast to "stretch".
|
|
|
Logged
|
|
|
|
polygone
|
|
Reply #26 Posted on: November 18, 2012, 03:34:08 pm |
|
|
Location: England Joined: Mar 2009
Posts: 794
|
Note that with precise that the instance could collide with the bbox of an object but then not actually collide with the object in precise when moving forward. You could keep checking to see if the instance moves past the object without colliding then do a further bbox check beyond that; however it's probably not common enough a scenario for that to be efficient.
Looking at your code I'm also confused what this part is doing in there:
double current_dist = DMIN; { double next_x = x + mid_dist*cos_angle; double next_y = y - mid_dist*sin_angle; if (collide_inst_inst(object, solid_only, true, next_x, next_y) == NULL) { inst1->x = next_x; inst1->y = next_y; current_dist = mid_dist; } } I don't think it should be there at all.
|
|
|
Logged
|
I honestly don't know wtf I'm talking about but hopefully I can muddle my way through.
|
|
|
polygone
|
|
Reply #27 Posted on: November 18, 2012, 04:53:17 pm |
|
|
Location: England Joined: Mar 2009
Posts: 794
|
As a testament to the precise collision system working I have posted a sonic engine at the EDC: http://enigma-dev.org/edc/games.php?game=37The slopes and loop seem to be functioning completely correctly.
|
|
|
Logged
|
I honestly don't know wtf I'm talking about but hopefully I can muddle my way through.
|
|
|
polygone
|
|
Reply #28 Posted on: November 18, 2012, 05:32:25 pm |
|
|
Location: England Joined: Mar 2009
Posts: 794
|
Forthevin can I just ask when you tried the house effects demo did you see some bugged random flicking in the candle glow when you moved around the scene? Like this: http://s8.postimage.org/f5f9r238l/Open_GL_Alpha_Primitive_Issue.pngIt's rather annoying. It's being causes because the glow is transparent and being drawn with random scaling each step: d3d_transform_add_scaling(1,.8+random(.1),.9+random(.1)); But yeah this crap isn't happening in GM, I wonder if it can even be fixed or not. There's another small niggle as well, you can see in the image at the candle base there is a kind of white outlining to the bottom of the cone which isn't very pretty. You can see it at the bottom of the curtains as well but not at the bottom of the big cylinder pillars for some reason. I don't know what's causing this, it's not the interpolation this time as it happens when that's turned off as well. EDIT: I see if I get rid of the reflect it goes and I can see it more clearly just drawing the reflect that the white is being drawn at the bottom of the reflected candle cone for some reason. EDIT2: OK I see it's just the z-fighting with the floor meh. OpenGL seems to have much worse z-fighting niggles than DirectX does.
|
|
« Last Edit: November 18, 2012, 06:41:18 pm by polygone »
|
Logged
|
I honestly don't know wtf I'm talking about but hopefully I can muddle my way through.
|
|
|
IsmAvatar
|
|
Reply #29 Posted on: November 19, 2012, 01:31:01 am |
|
|
LateralGM Developer
Location: Pennsylvania/USA Joined: Apr 2008
Posts: 877
|
That looks like Z-fighting. (Edit: Yup, you already figured it out)
As for the binary search, I must be misunderstanding where you plan on applying it, as it wouldn't work for a search loop, simply because of small objects being overlooked that way. A binary search is only useful on sorted data. In a collision search loop, there is no sorting. The data is 1's and 0's (collision or free), in no order.
forthevin: By the way, you can clump a bunch of similar changes together in 1 commit, or even make a group of commits and then squash them before pushing. That way the git doesn't seem flooded with small commits. Just a thought. You can do it however you want, since we're a small team.
|
|
« Last Edit: November 19, 2012, 01:33:33 am by IsmAvatar »
|
Logged
|
|
|
|
|