Reputation: 570 Enlightened
- Active Posts:
- 1,271 (1.49 per day)
- 24-April 12
- Profile Views:
- Last Active:
- Aug 19 2014 07:50 AM
- OS Preference:
- Favorite Browser:
- Internet Explorer
- Favorite Processor:
- Favorite Gaming Platform:
- Your Car:
- Who Cares
- Dream Kudos:
- Expert In:
- Game Programming, XNA
Posts I've Made
Posted 19 Aug 2014I looked up Cardhalia. It's very much a 2D game. For that, you don't need matrices. It's all 2D images and sprites. For the turning, it looks like they oversized the picture so that they can slide it left or right when turning just before they switch to the new picture to represent the new direction.
Posted 18 Aug 2014It's the blend state and depth stencil state that I was trying to think of. Take a look at my reply to this post and let me know if it solves the problem.
Posted 18 Aug 2014This appears to be a "Z-order" problem. The first thing to do is experiement with the backface culling setting. Turn back face culling completely off and see how it changes it. Then try clockwise and counter-clockwise culling. If none of this seems to change the problem it's probably that it's not using the Z-buffer properly (although, when researching it you may not even hear the word "Z-buffer" come up.
How this problem might occur is if you are drawing anything 2D to the same screen, such as fonts to tell you the Frame Per Second rate. When you draw fonts to the screen, it changes those settings and you get results just like in your picture because it's drawing things in the wrong order with things in the back drawn in the front. You just have to reset those settings. Off the top of my head I can't remember exactly what they are. I think it's basically 2 lines of code. I'm think you have to reset the sampler state. Or is it the rasterizer state?
I would have to go look it up myself. I have an example of code on my website which draws a modular dungeon with walls. There's text displayed in that and it's got the code in it for that, but I'm not in a place where I can download it and look at it at the moment.
But, if you get skinned animation figured out, I would be interested in learning how it's done. I think I have some idea, but I'm not sure. I pretty much know how to setup the models for it, but I never did get skinned animation in XNA figured out. It's high on my list of things to figure out, but I'm not doing a lot of computer code here lately.
Posted 18 Aug 2014I am very confused about what you are attempting to do. What are you trying to achieve?
And I'm also confused about why you are taking this approach.
It looks like you are constructing your own 4x4 matrix which is for 3D work. But your drawing is very 2D. Is this for 3D or for 2D?
I mean, you can use a 4x4 matrix for 2D; you simply ignore one dimension and don't use that dimension. (Probably z) But a 3x3 matrix should be able to get the job done if you're doing everything very manually like this.
But XNA has functions to handle just about everything you could possibly want to accomplish with a 4x4 matrix built in to XNA already.
Why are you doing this manually instead of using the built in functions/methods? Are you just trying to understand how they work?
The integer numbers that you have in these matrices look highly suspect. Matrices generally use floating point numbers. And they also use radians and not degrees.
If you are confused about how matrices work, especially in 3D, you might take a look at my website shown below.
Posted 14 Aug 2014Send the code. I sort of kind of pretend to be able to read Spanish if there's a full moon out.
Looks like Estado Del Juego (Game State, right?) is an enumeration. The || returns with true the first statement that is true. In other words, if the first one is true the second two will not be evaluated. I don't know if that's related to the problem.
- Member Title:
- Here to help.
- Age Unknown
- Birthday Unknown
- Dallas, Texas, US of A, Planet Earth, Sol System, Milky Way Galaxy
- Rock music composition and performance, Grunge Music, Bebop (think Thelonios Monk), Swing (think Cab Calloway), Gaming, Astronomy, RPGs, Scuba, Sail Boats, Furniture Building, Cooking, Rocky Patel Cigars, Character Driven Dramas(like HBO's Deadwood), Story Telling (plot writing), Linguistics, Economics, Target Shooting, Electronics (don't know as much as I'd like to), all aspects of 3D game programing including music, physics, modeling, texturing, annimation, probability, AI, lighting, etc., Texas Holdem' Poker, Learning, Dogs, the love of my life (my pit bull), guns (especially 19th century black powder), putting make-up on ogres, etc.
- Programming Languages:
- C, C++, C#, Visual Basic, Java, Pascal, T-SQL, HTML, FoxPro, ASP.Net(very little), Assembler, Machine Code(conceptually anyway)
- Website URL: