|
I have 2 questions (I use XNA and C#): What's the basics needed for a shoot 'em up ala Ikaruga or Touhou? So far I've gathered that there should be a Game class for the logic, a Player class for the player sprite and projectile class for the bullets. There probably should be an enemy class as well. My main problem is figuring what goes inside those classes, mainly projectile. How would one go about setting up all those fancy bullet patterns, the timings of when a particular enemy appears and how they fly into the screen? Secondly, I was hammering away at XNA and tried making a sprite jump like Mario. My code is this: code:
Anyway, I've been trying to achieve a consistent apex with no luck. It's been about 6 months since I looked at the code but from what I remember the apex sometimes differs due to the reliance on gametime as part of the velocity calculation. Also, the sprite doesn't quite have that snappyness of a classic Mario jump. Basically, is there a better way to program a jump function, or can this current code be modified to allow a faster ascent while coming down slower (I think this is what Mario does)? Cedra fucked around with this message at 16:17 on Feb 25, 2008 |
# ¿ Feb 25, 2008 16:13 |
|
|
# ¿ Apr 25, 2024 00:48 |
|
Does anyone have any good tutorial links to a tile engine in C#? I've been following XNAResources.com but their tutorials are outdated and ever since updating to XNA 2.0 things like EnsureDevice(), BeginScene() and EndScene() are broken and I've little idea of how to fix them.
|
# ¿ Mar 24, 2008 17:15 |
|
stromdotcom posted:I've only glanced briefly at it, but this looks good: http://www.kersson.com/articles/article.aspx?ar=41 Thanks very much! I'm slowly going through it, trying to understand the reasonings behind the code (something I find lots of tutorials lack - they just lead you with little explanation as to why they're doing it). Halfway through this page, I don't get what this is snippet from the TileSet class is supposed to do: code:
123 456 So let's place the number 6 as the position parameter, and columns 3. rectangles would come out as [2 (or 1.67 rounded up),2], which I think would take tile 9, no?? (this is C# btw)
|
# ¿ Mar 25, 2008 20:55 |
|
ShoulderDaemon posted:Integer arithmetic does not round, it truncates. 5 / 3 = 1. Right, right. That makes sense, thanks.
|
# ¿ Mar 25, 2008 22:46 |
|
OpenGL question: How do I make a light that's fixed relative to my eye? As per the Nehe tutorials, I've set up the light's ambience and diffuse intensities, added the LIGHT_POSITION property and enabled lighting in the init() method. And that's it. Yet whenever I rotate/translate/scale my model using a threaded Display() loop, the lights seem to rotate with it as well. This is confusing. I think I'm following the OpenGL FAQ's answer too ("How can I make my light position stay fixed relative to my eye position? How do I make a headlight?"), yet my results do not match it. I'm not updating the position whatsoever, so should it not stay in the same position?
|
# ¿ Jan 16, 2009 11:40 |