5,613 reputation
11040
bio website xinoro.net
location Chiyoda, Japan
age
visits member for 1 year, 5 months
seen 36 mins ago

By day, I make games. By night, I make even more games!

Mostly a programmer, I also do an attempt at art, music, game design, and many other activities related to game development.

My aim is to become the best game creator in the world. Stay tuned (probably for a long time)


2d
comment How to rotate a line in 3d space?
A rotation matrix will rotate a point around the origin. If you wish to rotate around another point, you can use a translation matrix to move the point so it rotates around the origin, use a rotation matrix to rotate it, and then use another translation matrix to get the point back to where it was. Those three transforms (translation->rotation->translation) can be multiplied (matrix multiplication is associative), and therefore you will have only one matrix you can use for all points. It may seem complicated, but it is much more simple than analytically rotating your points using trigonometry.
2d
comment How to rotate a line in 3d space?
If you represent a point in space as a vector, and you multiply it by a rotation matrix, the result is a vector which represents the point rotated around the origin. There should be plenty of matrix transform tutorials online, you could check out some of them.
2d
comment How to rotate a line in 3d space?
Did you know that you can use a rotation matrix to rotate arbitrary points?
Apr
3
comment Why Game engines use C++?
@Darkhogg "exact opposite" is a very strong word. I suppose you're referring to the fact that optimizations by modern compilers are usually better than what you can do by hand, and inline assembly usually does more harm than good. That is true, but not in every case. As an easy example, when interfacing with hardware peripherals, you may have to work with volatile variables. Optimizers don't even touch them, and you can only optimize things with assembly in these cases. This stuff happens in games much more often that you would like, and are only doable when working in c/c++.
Mar
20
comment How can I determine the pixels covered by a transformed triangle (without drawing it)?
You can draw a full screen quad where the color encodes the coordinate where the point would be drawn, assuming you can use the programmable pipeline. But if you just need the coordinate of a point, why not project it manually? You should update your question to better reflect what you want to do.
Mar
20
comment How can I determine the pixels covered by a transformed triangle (without drawing it)?
Yep. Thousands of optimizations come to my mind, but generally, yes.
Mar
20
comment How can I determine the pixels covered by a transformed triangle (without drawing it)?
Sure you can. If you just want to know the location of a 3D point (not triangle), you can just draw a point (for example with glBegin(GL_POINTS)), and then check the resulting texture to see where the pixel is lit. But if you just want to know where a 3D point would be in the screen, you may want to simply project it yourself. Both solutions are easy to implement anyways.
Mar
20
answered Pro's/Con's of separating game logic and render threads
Mar
20
comment making a cone roof look hollow
If I'm not mistaken, the cone drawn by glutSolidCone is not capped, but then if you don't have any lighting, all the pixels for that cone look red, and there's no way for the viewer to know if it's capped or not. How about adding some lighting to the scene?
Mar
20
answered How can I determine the pixels covered by a transformed triangle (without drawing it)?
Mar
14
awarded  Nice Answer
Mar
11
comment How do I write a “Connect Four” AI?
That is -a- way. As DMGregory says, that is a solved game, so you can certainly implement it in a way the computer plays perfectly, and your players always lose. Alternatively, you can have it play with your personality, which can make a much more fun game, and you will learn more about AI programming in the meantime. How you do it is up to the goals you have for your game.
Mar
11
comment How do I write a “Connect Four” AI?
How would -you- play connect four? You could try writing an algorithm that is close to your way of playing, and use that as a starting point to make it better and better.
Mar
11
comment How to create a new GameObject, without adding it to the scene?
How about creating it and then deactivating it?
Mar
8
comment How to correctly handle multiple Songs in XNA?
I stand by my point. As Andrew said, for a Windows game, it will make a very small, almost unnoticeable difference. Even if you're completely decoding the entire songs, one 3 minute song will take some 30MiB. 10 songs will take 300 MiB, and any moden computer has 300 MiB to spare. XNA's Song streams the files anyways, so this is completely a non-issue. The time you use while "optimizing" this non-issue is most likely better spent on making the game more fun, so you should really not care about this, unless it actually becomes a problem.
Mar
7
comment How to correctly handle multiple Songs in XNA?
How about if you try it in the way you're proposing, and if you have problems, you fix them? It is very difficult to know in advance if you're going to have memory or performance problems unless you actually implement your code, and then test, measure and profile it to know where a bottleneck is. In most cases, pieces of code that you think you may require optimization don't; so focus on clarity and on writing code that makes sense to you, so you can focus more on making a fun game instead of optimizing where it may not be needed.
Mar
5
reviewed Reject suggested edit on settings tag wiki excerpt
Mar
4
revised Working with multiple language text files in multilingual games
added localization tag
Mar
4
answered Working with multiple language text files in multilingual games
Feb
24
comment How can I draw outlines around 3D models?
If you're referring to those particular images you put in there, I can say with a 95% certainty that those are hand drawn 2D sprites, not 3D models