1. Past hour
2. ## Polygons and the Separating Axis Theorem

I have programmed an implementation of the Separating Axis Theorem to handle collisions between 2D convex polygons. It is written in Processing and can be viewed on Github here. There are a couple of issues with it that I would like some help in resolving. In the construction of Polygon objects, you specify the width and height of the polygon and the initial rotation offset by which the vertices will be placed around the polygon. If the rotation offset is 0, the first vertex is placed directly to the right of the object. If higher or lower, the first vertex is placed clockwise or counter-clockwise, respectively, around the circumference of the object by the rotation amount. The rest of the vertices follow by a consistent offset of TWO_PI / number of vertices. While this places the vertices at the correct angle around the polygon, the problem is that if the rotation is anything other than 0, the width and height of the polygon are no longer the values specified. They are reduced because the vertices are placed around the polygon using the sin and cos functions, which often return values other than 1 or -1. Of course, when the half width and half height are multiplied by a sin or cos value other than 1 or -1, they are reduced. This is my issue. How can I place an arbitrary number of vertices at an arbitrary rotation around the polygon, while maintaining both the intended shape specified by the number of vertices (triangle, hexagon, octagon), and the intended width and height of the polygon as specified by the parameter values in the constructor? The Polygon code: class Polygon { PVector position; PShape shape; int w, h, halfW, halfH; color c; ArrayList<PVector> vertexOffsets; Polygon(PVector position, int numVertices, int w, int h, float rotation) { this.position = position; this.w = w; this.h = h; this.halfW = w / 2; this.halfH = h / 2; this.c = color(255); vertexOffsets = new ArrayList<PVector>(); if(numVertices < 3) numVertices = 3; shape = createShape(); shape.beginShape(); shape.fill(255); shape.stroke(255); for(int i = 0; i < numVertices; ++i) { PVector vertex = new PVector(position.x + cos(rotation) * halfW, position.y + sin(rotation) * halfH); shape.vertex(vertex.x, vertex.y); rotation += TWO_PI / numVertices; PVector vertexOffset = vertex.sub(position); vertexOffsets.add(vertexOffset); } shape.endShape(CLOSE); } void move(float x, float y) { position.set(x, y); for(int i = 0; i < shape.getVertexCount(); ++i) { PVector vertexOffset = vertexOffsets.get(i); shape.setVertex(i, position.x + vertexOffset.x, position.y + vertexOffset.y); } } void rotate(float angle) { for(int i = 0; i < shape.getVertexCount(); ++i) { PVector vertexOffset = vertexOffsets.get(i); vertexOffset.rotate(angle); shape.setVertex(i, position.x + vertexOffset.x, position.y + vertexOffset.y); } } void setColour(color c) { this.c = c; } void render() { shape.setFill(c); shape(shape); } } My other issue is that when two polygons with three vertices each collide, they are not always moved out of collision smoothly by the Minimum Translation Vector returned by the SAT algorithm. The polygon moved out of collision by the MTV does not rest against the other polygon as it should, it instead jumps back a small distance. I find this very strange as I have been unable to replicate this behaviour when resolving collisions between polygons of other vertex quantities and I cannot find the flaw in the implementation, though it must be there. What could be causing this incorrect collision resolution, which from my testing appears to only occur between polygons of three vertices? Any help you can provide on these issues would be greatly appreciated. Thank you.
3. Today
4. ## Beginning developing

I was making once with a kid boy a shooting game in Scratch at Coder Dojo. When the staff said everyone to have a break to pick some sweets, that boy kept staying with Scratch. When his mother came to take it home, I told her that it is not normal for a kid to skip sweets because of Scratch(almost every other kid left Scratch and gone to the table with the sweets). I advised her to not bring that kid more and to not let it become a programmer.
5. ## Suggestion for choosing challenges

is a cheat or pre make deterrent as to not nullify the challenge duration contract. lol... I would argue that the list should be quite large and one new one pushed for every one poped. That could add new flavor to potentials and still keep it a mystery. Epic Ninja Coder.
6. ## shooting bullets

why did downvote me I am asking a very simple question
7. ## GameplayList of gaming pages of Xilvan Design for 2018!

Hi everybody, Me, Xylvan, announces Xilvan Design are building 3D games. Since 1993, our kindly official gaming related pages (please click on each links): Soul of Sphere Platinum v3.75. Age of Dreams:Abyss of Atlantis v1.5. Lights of Dreams IV: Far Above the Clouds v9.17. Candy World II: Another Golden Bones v9.37. Candy Racing Cup: The Lillians Rallies v2.97. Candy World Adventures IV: A Cloud of Starfield v6.57. Candy to the Rescue IV: The Scepter of Thunders v7.07. Candy in Space III: A dog to the Space v5.47. Candy's Space Adventures: The Messages from the Lillians v17.27. Candy's Space Mysteries II: New Mission on the Earthlike Planets v7.27. Discover more than 10 games which are coded in Blitz3D by Xylvan(Alexandre) from Xilvan Design. Download them on my new websites: Plenty of games wait you HERE: - New Xilvan Design Website - Hope you will like them all! To watch the videos of our games: - Xilvan Design Youtube Channel - You may need to Subscribe to our channel for more infos about our new releases! Friendly, Alexandre L., Xilvan Design.
8. ## Suggestion for choosing challenges

Whatever system goes in place is fine by me because at the end of the day I'm just wanting to make a small game within a short period of time, no matter the game choice.
9. ## Suggestion for choosing challenges

I wonder whether having a random item from approved list might take some of the potential fun out of choosing challenges? I'm sure a voting system could be figured out. If there was a large choice at the start, say 20 choices, each voter could maybe have a vote worth 5, 4, 3, 2 and 1, and assign them to their favourites in order. Then the winning challenge would need at least 2 people to have given it a vote, or there could be a second stage as tiebreaker. We could if necessary even do the voting manually, like the eurovision song contest!
10. ## Suggestion for choosing challenges

The need to join the group is also an obstacle. It took me some time to figure out why i was unable to reply here. (Also i did not notice a new baseball challange at all just by looking at the front page and 'unread content' which is what i usually do.)
11. ## FBX SDK skinned animation

No problem! I will try to help. Let's talk about the basic algorithm first, this should give you an idea what information/data you need. This should make it much easier for you to navigate the FBX file and retrieve the data you need. Finally we can talk about implementation details and common pitfalls and mistakes. There are four principal data elements 1) A transform hierarchy (skeleton) 2) An animation clip 3) One or more meshes 4) A binding for each mesh to the skeleton (cluster) The first thing you need is the skeleton. I already posted some code how to retrieve the skeleton, but let me know if you need more detail. There are two ways to describe a skeleton: hierarchical or linear. The hierarchical representation is a classic tree structure and could look something like this: struct Bone { Vector Translation; Quaternion Rotation; Matrix4x4 RelativeTransform; Matrix4x4 AbsoluteTransform; Matrix4x4 BindPose; Bone* Parent; std::vector< Bone* > Children; }; struct Skeleton { Bone* Root; }; The second option is to 'linearize' the transform hierarchy. This is usually done by traversing in DFS or BFS order. This assures that the parent bone is located before all children in the array. The linear representation can look something like this: struct Transform { Vector Translation; Quaternion Rotation; }; struct Skeleton { int BoneCount; std::vector< std::string > BoneNames; std::vector< int > BoneParents; std::vector< Transform > BoneBindPoses; }; struct Pose { Skeleton* Skeleton; std::vector< Transform > RelativeTransforms; std::vector< Transform > AbsoluteTransforms; }; Note that I skipped scale as this would only unnecessarily make things more complicated here. The next thing is the animation clip which you sample at each frame to retrieve a pose for the skeleton. A simple animation structure looks like this struct Animation { int FrameCount; float FrameRate; std::vector< Vector > TranslationKeys; std::vector< Quaternion > RotationKeys; }; So each frame you get translation and rotation of each bone and write it into Bone structure (hierarchical representation) or better you just extract the current Pose (linear representation). The next step is to deform the mesh using the new skeleton pose. This is where the skeleton/mesh binding comes in. This binding is often referred to as skin and it tells you how much a bone influences a vertex of the mesh. Again there are two ways to describe the data based on the association. E.g. either each bone knows which vertices it deforms or each vertex knows by which bone it is deformed. This looks something like this: struct Cluster { Bone* Bone; std::vector< int > VertexIndices; std::vector< float > VertexWeight; }; #define MAX_BONE_COUNT 4 struct Vertex { Vector Position; Vector Normal; // ... int BoneIndex[ MAX_BONE_COUNT ]; float BoneWeight[ MAX_BONE_COUNT ]; }; The final step is to apply the new pose to the mesh. For the cluster this looks something like this: std::vector< Vector > DeformMeshPositions( int ClusterCount, const Cluster* Clusters, const Mesh* Mesh ) { std::vector< Vector > VertexPositions; VertexPositions.resize( Mesh->VertexCount ); std::fill( VertexPositions.begin(), VertexPositions.end(), Vector::Zero ); for ( int i = 0; i < ClusterCount; ++i ) { const Cluster* Cluster = Clusters[ i ]; const Bone* Bone = Cluster->Bone; Matrix4x4 BoneTransform = Bone->AbsoluteTransform; Matrix4x4 BindPose = Bone->BindPose; Matrix4x4 Transform = BoneTransform * Inverse( BindPose ); for ( int k = 0; k < Cluster->VertexCount; ++k ) { int VertexIndex = Cluster->VertexIndex[ k ]; int VertexWeight = Cluster->VertexWeight[ k ]; VertexPositions[ VertexIndex ] += VertexWeight * Transform * Mesh->VertexPositions[ VertexIndex ]; } } return VertexPositions; }; The algorithm takes a vertex in model space into the local space of the bone at bind time. Then it moves to the new location of the bone and transforms it back to model space. Think of it as if you are attaching the vertex to the bone, then move the bone, and finally detach the vertex and release it at the new location. Finally apply a weight to this new vertex position and sum it up. HTH, -Dirk PS: IIRC the geometric transform is a concept from 3D MAX. It is a special transform which is applied to the associated shapes of a node, but it is not propagated down the hierarchy. This means you cannot just bake it into your bone transform. The simplest way to deal with it is to ignore it when retrieving the skeleton and then apply it to the mesh vertices when you read them. I look up some code and post it here. It is really simple.

13. ## Suggestion for choosing challenges

I was thinking there could be an approved challenge queue list and every challenge a random item is picked and removed from the queue. This would eliminate the problem with voting and either having a tie or everyone voting for their own idea, otherwise maybe only allow two ideas per vote, and increase that amount as more people jump on board.
14. ## Suggestion for choosing challenges

There's quite a bit of complication in the grab bag idea for certain. I feel it would be a lot to ask from the web gurus here to implement. If this direction was desired, the community would have to self manage until site functionality could trickle in based on what worked. Or so I would imagine. back on topic, I for one am still curious for other challenge ideas even if they seem way out there or weird to broaden this discussion.
15. ## Beginning developing

One day long years ago i has so intrasting task and it has progress so fast, so i ever forgot to sleep for 3 days. But really productivity begin to decrease after 8 hours. After 16 hours it decreases dramatically. Also short breaks every hour hepls to save productivity longer. Also a phisical excercises required to keep head clear and productivity longer and have a good mood. Ever not hard exercises but regular. So each morning and eavning i'm sit to bike and 15 minutes pedal around neigborghood buildings. Also it help to save lile bit more health. Cat can make a significant help with it. Especially ledy-cat. Its cudate tiny teammate highly require a attention to his persone, so when you ignore she to long time, she began to attract your attention. My little black home devil already invent triks for it like "to turn router off", "to drop keyboard from a table", "to catch a fingers that type on his favorite pillow". And of course cat is endless source of a good mood. Just stop to drop cigarette stubs directly to floor first. Good trik for it - when you eat during coding, leave a empty plate on table and use it as ashtray. It is very hard to overflow it ever on 3 days. Also it is good idea to hire cleaner that will be clean at least working cabinet at least weekly. It usualy cost no so high, but can significantly impove look of working place so will improve your mood. Also it good idea to remove enything unnessesary for development from working room. I really have on working room only gamers armchair and big 1.8x0.5 meters table that have no any mood collectors like drawers, and with installed on it computer tower with 3 27" monitors and projector have a free desk space that can fit no more then 2 plates, cup, keyboard, 2 joystics, 2 usb hubs, wireless mouse and one black cat at time. So it just have no corners where mood and garbage can be collected in big quantities. Really womens can be obsessed too. I know one family where husbend and wife both obsessed by competition who of them better in programming since his first university year. And i guess their little doughter will join it competition very soon.
16. ## Beginning developing

We swim in an ocean, we have to adapt or die. Ocean says: "you need a career and income to proof your as a human being! nobody cares about your inventions nobody paid you for!" If a person loses the social touch with external world, he could lose his social skills(i open the mouth and everybody instantly hates me. what did i say?!?!). If a person is not able to work in a team, he very very very hardly will find a job in programming. Modern programming practices expect people to work in teams. Everywhere, i was told by everyone like: "even if you are the best programmer out there(i am not, just saying), if you can not work in a team, you will not find work, you will have no money, no money no worth as a human being, antidepressant pills, anime, hikikomori, hentai, basement.."
17. ## Suggestion for choosing challenges

I know I put in far too many suggestions but the Atari list is a long list!! We might need a special polling system to allow us each multiple votes otherwise we will end up with just a few games with 1 vote each, I hope the forum supports this lol. And maybe 2 rounds of voting. Good idea about artists and assets. A global grab bag of assets would be fun, especially if there were not enough artists to e.g. randomly assign artist to a programmer. Might need some kind of pre-agreement for the programmer to be able to distribute the game, like they were licensed as free as long as credit given, one of the creative commons licenses.
18. ## Android NDK with Visual Studio 2015

I'm trying to expand my framework to run on Android NDK as well. Obviously I'm running in a few discrepancies between MSVC, UWP, NSK and Android NDK. I already ironed out a few other issues where Clang (3.8) needs things adjusted to compile. One error has me stumped: I'm using a #define to declare and implement cloning methods (insert boo,hiss here) This one works fine on all but Android NDK. The call inside a class called Component looks like this: DECLARE_CLONEABLE( Component, "Component" ) The define looks like this: #define DECLARE_CLONEABLE( xClass, strClassName ) virtual ICloneAble* Clone() \ { \ xClass* pNewClass = new xClass( *this ); \ pNewClass->m_ClassName = strClassName; \ return pNewClass; \ } \ \ static ICloneAble* CreateNew##xClass##() \ {\ xClass* pNewClass = new xClass(); \ pNewClass->m_ClassName = strClassName; \ return pNewClass;\ } I'm using the first passed string to concat a function name (CreateNew##xClass##(). For some reason Clang complains: error : pasting formed 'CreateNewComponent(', an invalid preprocessing token 1> DECLARE_CLONEABLE( Component, "Component" ) 1> ^ 1> p:/common\Interface/ICloneAble.h(15,74) : note: expanded from macro 'DECLARE_CLONEABLE' 1> static ICloneAble* CreateNew##xClass##() \ It seems it's irritated by the opening/closing parenthesis, but why? Besides the ugliness of this macro, can you show me how to avoid that error? Edit: I've managed to work around the issue by using a fixed name (CreateNewInstance instead of CreateNew##xClass##) but I'd still like to know why one is a problem and the other isn't.
19. ## Beginning developing

A healthy obsession with keeping yourself in shape is not a problem, but obsession with sport itself is more questionable as a pursuit to spend all your time on than programming imo. Sports are often full of random chance that you have no control over, there are unlikely to be rewards except for a few lucky ones, and any day you can have an injury that will end a sport career, rendering all that effort wasted. Whereas with programming, in nearly all circumstances you will still be able to use the skill you have gained. It is like the difference between putting your savings in a bank for high interest, or gambling them at a casino. Who cares what women think who are not right for you? Don't waste time trying to impress them. Just find one (or several) that want you for who you are and what you enjoy. Good quote here:
20. ## Beginning developing

i am most of the time doing investigation. If i tried to code known techniques from a technical papers, i would finish a 3D engine in less than one year. But this, constant experimenting is eating 90% of my time. I would not try to code yet another engine/app if there were nothing new i think i could "invent". We have already too many engines out there. Today i forgot to eat again, got very hungry and my head started hurting. "i will just do that, i will just finish that chunk here..and go to eat". The working places at home of some programmers look (sorry for saying that) miserable and depressing. The monitors hurts too. Having to dig inside the corners of a 3D model inside the modeling software is painful to the eyes. I turn and turn and turn it until i find a corner from where i have visibility. It gives me headaches. If i were a woman, i would not date somebody obsessed with something so much. Somebody could say that the problem is i am too obsessive, but what if i were obsessive with sports, not programming? I would have a sixpack and medals. Now i have a basement....
21. ## Terrain Bump Mapping - but not everywhere please

You could show the whole code (and screenshots for comparison), maybe we see something. Misplaced renormalization ? PS: As an aside: One can avoid the manuel format conversion (2*n -1, etc), at least with DX11 signed formats.
22. ## Terrain Bump Mapping - but not everywhere please

Thanks guys, I tried lerping between the normal and the bumpmapped normal but I must have put it in the wrong place. Works pretty nicely now. Weirdly with bump mapping on the whole terrain seems slightly darker even where the bump mapped (blue) texture isn't being used in the splat/blend map but I can live with that.
23. ## Programming and Higher Mathematics

Becouse standart mathematical libraries have a 4x4 matrices only becouse both AVX and GPU use 4 component vectors. Also 2D rotation is just a 3D rotation around z axe only, so can be performed using same mechanizm. Also matrices have feature to accumulate transformations. So you no need a code to perform a each kind of transformation with vertex buffer. Yo can just accumulate required sequence of transformations on single matix and then apply it all to vertices by single vector to matrix multiplication per vertex. In example that only translate a vertices it may look a really stupid. But on real usage where it unknown what same transformations matrix has accumulated, it just much simply to apply any kind of transformation to vertices by single kind of operation. So thay just follow a concept of superposition that says that optiaml elements not varranty a optimal composition. Or by other worlds to win in big it require to sacrafice in little. Other similar example - search in sorted array. Linear search is chache friendly but have O(n) complexity. Binary search is not chache friendly but have a O(log n) complexity. So to have much faster algo we have to sacrafice hardware optimization. With matrices it little bit complexive - it sacrafice a small algo and memory optimization to win both algo and hardware optimisation in much large scale.
24. ## Terrain Bump Mapping - but not everywhere please

Blend between vertex normal and bumpmapped according to the road/blue channel ? normalFromMap = lerp(PSIn.Normal, bumpMapped, splat.b); Could give a smoother transition given the splat is fine. PS: JoeJ just beat me to it
25. ## Terrain Bump Mapping - but not everywhere please

Simply finalNormal = normalize (bumpedNormal * blue + upVector * (1-blue)) should work. The value of upVector depends on the space you work in, maybe (0,0,1).
26. ## Beginning developing

It's great to hear I'm not the only one. That is not true in my experience, but you need to think long term and keep at it. My general advice would be to keep programming on the side, and one day you will be good. But don't just wait for it, you need to practice, practice, practice, and apply for jobs, that's how you will know when you are good enough. Also try to keep a balance, and practice/pursue other interests. For me, this is drawing and martial arts (tae kwon-do) at the moment. Both of these can also be mastered with a lot of practice, and they really help to stay motivated and not burnt out with programming.

29. ## [Rev-Share] Looking For Low Poly 3D Artists For Survival RPG

Hey all! we are a team of 3 looking for more members, we are making an isometrical Survival RPG. we are looking For Members who can make low poly 3D artists who can do character models, environments, tools and more. if interested and want to know more email me at rioishere14@gmail.com
30. ## Programming and Higher Mathematics

For some years, I worked in mission critical distributed computing systems in Investment Banks. At one point I was responsible for the system side (the code for the distributed computing engine, data gathering and such) of a system that ran on a farm of 2000 machines and did distributed calculations of the value of custom Financial Instruments (specifically, Over The Counter Stock Derivatives) which were held in the books of Traders in a whole department of the bank (total values adding up to many millions, even billions of dollars). Each node in our farm had a calculation engine which implementated the formulas that calculated the estimated values of those financial instruments (as they where not in an open market so their values had to be estimated), said calculation engines done and maintained by a team of specialists called Quants, which were more Mathematicians than Programmers. One day, just before the crash of 2008,our whole computing farm went down. We would restart it and after a while all nodes would die. It turns out, the calculation engine in the nodes was crashing and taking down the rest of the program. The night before, the value of Bear Stearns stock had gone down massively and the whole company became worth something like 1 dollar (not 1 dollar per-stock, 1 dollar for ALL stocks), so I suggested that maybe some of the calculations used the first order derivative of the price of that stock, which because of the extremely fast and big change was basically infinity, thus causing either a crash directly or if used in the wrong side of a division would cause a divide-by-zero error which would crash the calculation engine (which was a C++ library). The Quants checked it and I was right. Their reason for not having put an exception check around the code that used that 1st order derivative was "we never thought this would happen" (Yes, the very same excuse for most of the massive losses in the 2008 crash). So THIS is what Advanced Financials is and this is also my example of how a programmer who wasn't even on the Mathematical heavy side, by knowing Mathematics saved the whole team a lot of time and headaches and possibly saved the banks millions (as that calculation engine was mission critical and it being down meant that the Traders would not know what was the right price to sell or buy certain things). That said, the bank is was working with, Lehman Brothers, went bankrupt a week later, so it didn't really matter all that much in the end 😛
31. ## Programming and Higher Mathematics

This is a good point. It's perfectly possible to be decent at actual mathematics, but not particularly familiar with the notation that mathematicians use to express it. I had a lot of trouble when I was in my first couple of years of university that way. I could understand the concepts just fine, but I sometimes I felt as though I was drowning in the notation my instructors were using. I have been programming since I was 9 years old (before I even started learning algebra), so I "think in code" rather than in notation. As soon as I saw the same concepts implemented in a programming language I knew, I often suddenly "got" it. In a school environment, one could easily mistake a trouble with notation for a trouble with mathematics.
32. ## Beginning developing

No need to travel (easy to say from me when I'm right now 8,946 km away from home on holiday), but doing a bit of high powered rocketry can help with that! I noticed one thing, the more I spend just in front of the computer working on a hobby project (doing work is just doing work) - the more distracted I am. Suddenly I'm bored of the project and I eventually start procrastinating. On the other hand if I keep myself doing other things (going for walk with dog is major thing, but there are lots of others) - I'm indeed less distracted or bored from the project and keep it pushing forward (at quite large speed). As OP mentioned I do know some developers who see just source code all day long, they're very good developers. Also, sometimes I'm questioning myself whether they are mentally healthy or already went nuts. Those people may eventually be ruined by coding.
33. ## Programming and Higher Mathematics

sorry i hit ctrl something...
34. ## Programming and Higher Mathematics

When i publish my next demo, i will challenge you to get half near to its quality. It is pointless to argue. You don't think in a way a computer thinks. (My collisions are working greatly) Sorry, i hit enter here.... I wanted to say that in some very advanced and official technical papers, i have read like: "for those who can not read mathematical equations, here is the SAME algorithm in C".
35. ## Programming and Higher Mathematics

I think we may have another language difficulty here that we should really clear up. Yes, algorithms are technically "mathematics" in the sense that they are ultimately a formalized process, but they don't seem (at first glance) to be quite like what many North Americans think of as "math." The colloquial meaning of "math" in North America refers to a specific subset of mathematics that is taught up to high school and in a way that emphasizes doing lots of manual calculations on paper, often without a whole lot of explanation of the theory behind the calculations. I find when someone over here says that they "aren't good at math", usually what they really mean is, "I am not good at solving equations written with some Greek letters, by hand, in a classroom setting." Arguably, the colloquial meaning of "math" in English is now closer to "manual computation" than what mathematicians mean by "math!" In my experience, actual programming (in the sense of formalizing a process) doesn't involve a lot of the kind of thing we do in high school, which is why many programmers say that you don't have to be good at "math" (note quotation marks) in order to be a programmer. Those of us who have our undergrads in a field like computer science know that mathematics is a lot more expansive than that (remember, I said earlier in the thread that CS is really a branch of math), but to those of us who grew up in a North American school system, a lot of CS math doesn't really feel like the "math" we did in high school. There is much more focus on proofs, understanding the concepts, and formalizing your thinking rather than memorizing equations and types of problems you can apply them to.
36. ## Base class variables in inherited

Errr sorry. We kind of hijacked your thread. You probably didn't mean to to code what you coded. I was just so surprised it actually compiled that I wanted to know why. The way you declared pInt, it's simply a local variable of function. It's of a very odd type, one that most programmers would never use, but a local variable none the less. Putting the type int in front of it in the function makes it local to that function. Perhaps you meant to put it in class A which would make it a member of A which you could access from function since B inherits from A as follows: class A { protected: int *pInt; }; class B : public A { public: void function() { pInt = new int(); } }; I'm not really sure what you are tying to do, but you stumbled across a seldom used feature of the language.
37. ## Reverse Engineering .RAW files from PS2 game

Gamedev.net does not condone reverse engineering of commercial games. While it can be done, your efforts are generally better spent on literally anything else.
38. ## Beginning developing

This is very nice for you! Keep adding more interests! I have the modeling/programming programs open all the time, but i code not all the time. For example, chatting here in the forum from time to time is improving my codding. If i am 10hours codding in a row, most probably i will go to sleep and at the next morning i would delete it all for being a completely nonsense. I easily get stuck and blinded from concentration itself. Distractions ire very beneficent for me. And the act of playing with a cat could give me ideas about codding too. I bought a cheap electric piano to learn to play, but finally programming won and it is now in its box. I try it, but there is always so much work to do on front of the screen. The worst is even if i try to do other things, i am still thinking in the problem to solve. I wish to travel a bit. Maybe proving/disproving the Earth is flat That would be great!

40. ## Programming and Higher Mathematics

@JoeJ I am not algebra-blind. I just struggle a lot with it. I often do a research about what is already done in order to not lose time reinventing the wheel. If i decide that FFT is worthy i am able to learn it, understand it and implement it myself without libraries. Many(if not most of) problems people solve in a very complex way are actually very simple. I will mention ASM not as an language, but as an ideology. Any of those fancy math libraries are reduced down to simple operations and can be solved with 20years old computers lacking most of modern instruction set. I am inherently(from ASM) very good at breaking down problems. Alice could use her library, but for the computational time her library copies data around, my app will have solved the movement of the camera already. Most of the time studying PDFs about fancy algorithms, i am like: "why would they do that?!?! I can make it simpler!!" The simplest example is people using 4x4 matrices to translate 2D shapes around.....WHY?!?! just supply new x/y!!! When i talk to hardcore mathematicians, they seem to me like locked in their dimension. Lacking imagination, having very few points of view. In Shadow of Tomb Raider, Tomb Raider is still getting stuck in bounding boxes. WHY?! I am sure mathematicians did the algorithms, not googlers. Ultimately, the quality of the final product matters the most. If i had a company and a mathematician with 4 diplomas fails at solving a problem but a newcoming googler solves it and it works, i will give that newcomer a bonus, not to the mathematician. Specifically, in 3D i value more a coder with artistic skills than a mathematician. I am not banning math. I am just saying you dont need to be good at math in order to program good stuff. Best option would be Alice to work with me, because we can complement each other. Is Alice hot?
41. ## Base class variables in inherited

@Zaoshi Kaba thanks for the code, but why would I have to do this. Can't I just use "int *pInt2 = &A::foo;" instead of giving it "A::"? Oh, I see, than I could not use "a.*pInt = 5;". Now I'm confused even more. ".*pInt" is not defined in A but we still use a dot "." for it?? So I guess, only B::function() thinks A has a member pInt, if I'm right. So what's the use of all this?
42. ## Share a pointer

Yeah, i get you i already have such things, but i had to make a break from writing to realize that i dont even have a valid pointer.... Too much writing and one way thinking burns the head, i definetly spend too much time programming...
43. ## Mobile touchscreen performance expectation.

First you need to know whenever youre using java and override touch events they are spawned in another thread than main one so they are separated from drawing thread etc. Maybe you have synchronization problems. Another thing would be to to poll events in main game loop so each frame you draw you first process the input then draw.

45. ## X64 GCC native CallFunction gives invalid this pointer

Hi, I have been trying to track down a crash in my game and I think I have narrowed it down to X64_CallFunction in as_callfunc_x64_gcc.cpp. The function CallSystemFunction (above in the callstack) is given the object as (void *) 0x559ee40 but when my native function is called (it is a member function) I get (Leviathan::Physics * const) 0x565ff08 which is invalid as when I inspect the members they are garbage. But if I try *(Leviathan::Physics * const) 0x559ee40 that has the correct values. So AngelScript does something to the object pointer. Additionally if I change the registration to use asCALL_GENERIC the issue goes away and my function is given the right this pointer. Other member functions on that type work fine. For some reason it is just this one. // This crashes if(engine->RegisterObjectMethod("Physics", "Float3 ClearVelocity() const", asMETHOD(Physics, ClearVelocity), asCALL_THISCALL) < 0) { ANGELSCRIPT_REGISTERFAIL; } // This doesn't // if(engine->RegisterObjectMethod("Physics", "Float3 ClearVelocity() const", // WRAP_MFN(Physics, ClearVelocity), asCALL_GENERIC) < 0) { // ANGELSCRIPT_REGISTERFAIL; // } And here is a callstack of the crash: 0 in Leviathan::Physics::ClearVelocity() of /home/hhyyrylainen/Projects/Leviathan/Engine/Entities/Components.cpp:369 1 in X64_CallFunction of /home/hhyyrylainen/Projects/Leviathan/ThirdParty/angelscript/sdk/angelscript/source/as_callfunc_x64_gcc.cpp:74 2 in CallSystemFunctionNative of /home/hhyyrylainen/Projects/Leviathan/ThirdParty/angelscript/sdk/angelscript/source/as_callfunc_x64_gcc.cpp:468 3 in CallSystemFunction(int, asCContext*) of /home/hhyyrylainen/Projects/Leviathan/ThirdParty/angelscript/sdk/angelscript/source/as_callfunc.cpp:730 4 in asCContext::ExecuteNext of /home/hhyyrylainen/Projects/Leviathan/ThirdParty/angelscript/sdk/angelscript/source/as_context.cpp:2557 5 in asCContext::Execute() of /home/hhyyrylainen/Projects/Leviathan/ThirdParty/angelscript/sdk/angelscript/source/as_context.cpp:1324 6 in Leviathan::ScriptExecutor::RunScript<void, thrive::CellStageWorld*> of /usr/include/c++/8/ext/atomicity.h:96 7 in Leviathan::ScriptExecutor::RunScript<void, thrive::CellStageWorld*> of /home/hhyyrylainen/Projects/thrive/ThirdParty/Leviathan/Engine/Script/ScriptExecutor.h:86 8 in Leviathan::GameModule::ExecuteOnModule<void, thrive::CellStageWorld*> of /home/hhyyrylainen/Projects/thrive/ThirdParty/Leviathan/Engine/Addons/GameModule.h:63 9 in thrive::ThriveGame::startNewGame() of /home/hhyyrylainen/Projects/thrive/src/ThriveGame.cpp:329 10 in thrive::ThriveJSMessageHandler::OnProcessMessageReceived(scoped_refptr<CefBrowser>, cef_process_id_t, scoped_refptr<CefProcessMessage>) of /home/hhyyrylainen/Projects/thrive/src/thrive_js_interface.cpp:142 11 in Leviathan::GlobalCEFHandler::HandleCustomExtensionProcessMessage(scoped_refptr<CefBrowser>, cef_process_id_t, scoped_refptr<CefProcessMessage>) of /home/hhyyrylainen/Projects/Leviathan/Engine/GlobalCEFHandler.cpp:282 12 in Leviathan::GUI::View::OnProcessMessageReceived(scoped_refptr<CefBrowser>, cef_process_id_t, scoped_refptr<CefProcessMessage>) of /home/hhyyrylainen/Projects/Leviathan/Engine/GUI/GuiView.cpp:634 13 in (anonymous namespace)::client_on_process_message_received of /home/hhyyrylainen/Projects/Leviathan/ThirdParty/CEF/libcef_dll/cpptoc/client_cpptoc.cc:269 14 in OnProcessMessageReceived of ../../cef/libcef_dll/ctocpp/client_ctocpp.cc:237 15 in OnRequest of ../../cef/libcef/browser/browser_host_impl.cc:3006 16 in DispatchToMethodImpl<CefBrowserHostImpl*, void (CefBrowserHostImpl::*)(Cef_Request_Params const&), std::__1::tuple<Cef_Request_Params>, 0> of ../../base/tuple.h:52 17 in DispatchToMethod<CefBrowserHostImpl*, void (CefBrowserHostImpl::*)(Cef_Request_Params const&), std::__1::tuple<Cef_Request_Params> > of ../../base/tuple.h:60 18 in DispatchToMethod<CefBrowserHostImpl, void (CefBrowserHostImpl::*)(Cef_Request_Params const&), void, std::__1::tuple<Cef_Request_Params> > of ../../ipc/ipc_message_templates.h:51 19 in Dispatch<CefBrowserHostImpl, CefBrowserHostImpl, void, void (CefBrowserHostImpl::*)(Cef_Request_Params const&)> of ../../ipc/ipc_message_templates.h:146 20 in OnMessageReceived of ../../cef/libcef/browser/browser_host_impl.cc:2849 21 in OnMessageReceived of ../../content/browser/web_contents/web_contents_impl.cc:791 22 in OnMessageReceived of ../../content/browser/renderer_host/render_view_host_impl.cc:739 23 in OnMessageReceived of ../../content/browser/renderer_host/render_widget_host_impl.cc:594 24 in OnDispatchMessage of ../../ipc/ipc_channel_proxy.cc:320 25 in Run of ../../base/callback.h:65 26 in RunTask of ../../base/debug/task_annotator.cc:55 27 in RunTask of ../../base/message_loop/message_loop.cc:399 28 in DeferOrRunPendingTask of ../../base/message_loop/message_loop.cc:411 29 in DoWork of ../../base/message_loop/message_loop.cc:455 30 in base::MessagePumpGlib::Run(base::MessagePump::Delegate*) of ../../base/message_loop/message_pump_glib.cc:309 31 in Run of ../../base/run_loop.cc:130 32 in RunUntilIdle of ../../base/run_loop.cc:143 33 in CefBrowserMessageLoop::DoMessageLoopIteration() of ../../cef/libcef/browser/browser_message_loop.cc:116 34 in Leviathan::GlobalCEFHandler::DoCEFMessageLoopWork() of /home/hhyyrylainen/Projects/Leviathan/Engine/GlobalCEFHandler.cpp:181 35 in Leviathan::Engine::MessagePump() of /home/hhyyrylainen/Projects/Leviathan/Engine/Engine.cpp:657 36 in Leviathan::LeviathanApplication::RunMessageLoop() of /home/hhyyrylainen/Projects/Leviathan/Engine/Application/Application.cpp:124 37 in main of /home/hhyyrylainen/Projects/thrive/src/main.cpp:219 38 in __libc_start_main of /lib64/libc.so.6 39 in _start of /home/hhyyrylainen/Projects/thrive/src/main.cpp:172 I am using svn revision 2547 (I used 2482 before but I just updated to confirm that this hasn't been fixed). My compiler is 'gcc (GCC) 8.1.1 20180712 (Red Hat 8.1.1-5)' This issue also seems to be Linux specific as other people also working on the same game on Windows don't have a crash in this function (I haven't personally tested on Windows). I can provide a core dump of the invalid passed this pointer if that would help.
46. ## Horizontal lines of pixels "missing" in windowed mode...

I tried that (there was 6 normal styles and 4 expended). But still the missing lines AdjustWindowRectEx(&wr, WS_CAPTION | WS_POPUP | WS_VISIBLE | WS_CLIPSIBLINGS | WS_SYSMENU | WS_MINIMIZEBOX, FALSE, WS_EX_LEFT | WS_EX_LTRREADING | WS_EX_RIGHTSCROLLBAR | WS_EX_WINDOWEDGE); // adjust the size
47. ## Programming and Higher Mathematics

I give an example: Bod and Alice should develop a computer vision algorithm capable to track camera position and orientation while doing unknown motion. Bob is very good at coding, knows 20 languages, knows all the tricks for best performance, but math is not his expertise. He makes an algorithm to find markers, standing out by different colors or shape in the image. He spends lots of work, and after 3 months he has something that works most of the time. Alice does not know much about hardware details, but she's skilled at math. Her algorithm uses a Fast Fourier Transform library, she applies it to the image and the rest is easy: If all phases change the same amount, camera rotates that angle, if high frequency waves move less, camera translates, etc. She needs only 5 days to have robust results, and her algorithm is also faster. Finally they exchange code. Alice says 'hey, neat little trick to save some cycles, i'll remember that', but Bob just says 'Huu?!? What the hell is this? No idea how this works at all'. So, sorry if i'm wrong, i know nothing about CV, but just assume FFT is well suited for the problem. In this case Bob has no chance to compete. Because he never learned how it works, he has no idea of its applications. He does not even know what he misses.
48. ## Typo in scriptfilesystem.cpp

Hello, there is a typo in scriptfilesystem.cpp if( !failure ) tgt - fopen(search2.c_str(), "w"); Mus be if( !failure ) tgt = fopen(search2.c_str(), "w");
49. ## Beginning developing

Addiction to codding is damaging my life. I would very love to quit programming, but there is always something to code. Projects as 3D Engine and OS, can take many years and give you nothing back(money/career). All this time could be better spent socializing more with people. It is my hobby, yes, but at the same time i would gladly change it by another hobby.

51. ## Beginning developing

Just to rest o just for fun. Mainly becouse have wide area of interests. For example you have a very intrasting day job related to Factory Automation. But in your are of interests also a graphics, gmaing AI and phisics simulations for example. So you just continue to do some other that interested for you just for fun or self-education and so on. Other example. One friend of mie has dream all 5 univercity years to work on robotics field closely related to electronic. But when we finished a university course, programmers here has been contributed much more into accounting departamends than on FA departaments. So he just turned to Java and with his skills and knowledge has made a carrier very fast. Shortly he shifted overseas and became a team lead into company that produce accounting software for big corporations. So he have no any reasons to change field where he have a daytime job. But by eavningd he assembly bords and programming AI for funny tiny drones just for fun. Can breath become some kind of addiction? Realy you allready additive by coding. You has change Phyton to C# to have a better coding tools. So shortly you will require much heavy drugs like C++ that lead to incurable syndrome known as "C++ of brain" that have very heavy effects like analyzing environment and tasks that you need to perform and planing your actions by results of analize, also usage of C++ usualy require to use parallely heavy drugs of other kind - calculus, linear algebra, computation geometry, theory of complexity and its list is endless. On worst cases on couple it lead to serious life quality damages like as Master or ever PhD degree and high responsible job.
52. ## Horizontal lines of pixels "missing" in windowed mode...

In the tab "Styles" you see the styles your window has. You have to pass the exact same ones to AdjustWindowRect(Ex). Make sure to include both regular and extended styles, and use AdjustWindowRectEx. Still, I'm pretty sure HGE should account for that by itself. All these engines usually care for the actual usable (client) area only.

1. 1
2. 2
Rutin
22
3. 3
4. 4
5. 5
frob
12

×