Jump to content
  • Advertisement

pi_man

Member
  • Content Count

    61
  • Joined

  • Last visited

Community Reputation

100 Neutral

About pi_man

  • Rank
    Member
  1. i agree with oler1s. i have never used VB before but i do know that learnign c# is very easy and alot of fun. i do however disagree with the 'not learning c++' statement. learning c++ is not as difficult as everybody makes it out to be. it was the first language i learnt and after the first few days things just sorta fell into place. it also makes learning any other language a massive breeze because you will already know the OO stuff so you can just concentrate on the language specifics. but i digress. here are some websites i found: http://www.devdos.com/vb/ http://www.tutorialized.com/tutorials/Visual-Basic/1 http://cuinl.tripod.com/tutorials.htm and if you are feeling adventurous and want to try some game programming: www.riemers.net i love that site :)
  2. thank you for your responses. i have made both 2d and 3d games in xna before so i know how to do that. and i have made clones of those really cool games that i (rather sadly) still like (then again, i AM still a kid). it is really the engine that i am interested in, not specifically for making a game, just because i am so fascinated by them. so if anybody knows of any tutorials or books that would be great.
  3. So i've been searching the internet for the past couple of days trying rather unfruitfully to learn how to make an engine for xna. I have always been very interested in the subject but have never been able to make one. I tried using the Hazy Mind tutorials however i had some troubles with the HLSL code. So i was wondering if anyone around here knows of a tutorial which shows me how to make an engine for XNA. A graphics specific engine would be preferable but just anything that shows me how its done would be great thanks in advance.
  4. pi_man

    [.net] XNA Camera issue

    Why do you need to multiply the offset by the rotation to get the new position? Wouldn't you only need the position and offset to calculate the new position?
  5. Hi. I have been starting to learn XNA for the past couple of weeks and decided to create myself a camera, i have however run into some problems when i position the model, for some reason whenever i rotate the camera the gun moves side-to-side as well as backwards and forwards. anyway here is the code if you can help me [source lang = "c#"] #region Using Statements using System; using System.Collections.Generic; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Audio; using Microsoft.Xna.Framework.Content; using Microsoft.Xna.Framework.Graphics; using Microsoft.Xna.Framework.Input; using Microsoft.Xna.Framework.Storage; using First_Person_Camera.Images; #endregion namespace First_Person_Camera.Images { public class CustomCamera { public Matrix view; public Matrix projection; private Vector3 position; private Matrix rotation; private Vector3 direction; private float yaw; private float movementSpeed = 50f; private float rotationSpeed = 0.02f; CModel weapon; private Vector3 weaponPositionOffset; private Vector3 weaponRotationOffset; public CustomCamera() { position = Vector3.Zero; rotation = Matrix.Identity; direction = Vector3.Forward; yaw = 0f; view = Matrix.CreateLookAt(position, direction, Vector3.Up); projection = Matrix.CreatePerspectiveFieldOfView(MathHelper.ToRadians(45f), 640 / 480, 1f, 1000000f); weapon = new CModel(); weaponPositionOffset = new Vector3(10f, -25f, 0f); weaponRotationOffset = Vector3.Zero; } public void LoadGraphicsContent(ContentManager content, string name) { weapon.LoadGraphicsContent(content, name); } public void Update() { KeyboardState myKeyboard = Keyboard.GetState(); if (myKeyboard.IsKeyDown(Keys.W)) { MoveForward(); } if (myKeyboard.IsKeyDown(Keys.S)) { MoveBackwards(); } if (myKeyboard.IsKeyDown(Keys.D)) { Strafe(1); } if (myKeyboard.IsKeyDown(Keys.A)) { Strafe(-1); } if (myKeyboard.IsKeyDown(Keys.Right)) { RotateRight(); } if (myKeyboard.IsKeyDown(Keys.Left)) { RotateLeft(); } weapon.position = position + weaponPositionOffset; weapon.rotation = rotation; SetView(); } public void Draw() { weapon.Draw(); } private void MoveForward() { position += movementSpeed * direction; } private void MoveBackwards() { position -= movementSpeed * direction; } private void RotateLeft() { yaw += rotationSpeed; rotation = Matrix.CreateRotationY(yaw); direction = Vector3.TransformNormal(Vector3.Forward, rotation); } private void RotateRight() { yaw -= rotationSpeed; rotation = Matrix.CreateRotationY(yaw); direction = Vector3.TransformNormal(Vector3.Forward, rotation); } private void Strafe(float amount) { position += (Vector3.Cross(direction, new Vector3(0f, 1f, 0f)) * amount * movementSpeed); } private void SetView() { view = Matrix.CreateLookAt(position, position + direction, Vector3.Up); } } }
  6. does anyone out there know if there is anyway i can check if any BoundingBox collides with any other (not like 'box.intersects(anotherBox)', more like box.intersects(any other box that is made))
  7. don't worry i fixed it. I was calling the constructor before the texture was given a value (called 'new' in the Game1 Initialize() method whereas the texture was given a value in LoadGraphicsContent() (sigh)
  8. i have started making an image class in my new program but i am getting some errors (primarily NullReferenceException) here is my code: #region Using Statements using System; using System.Collections.Generic; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Audio; using Microsoft.Xna.Framework.Content; using Microsoft.Xna.Framework.Graphics; using Microsoft.Xna.Framework.Input; using Microsoft.Xna.Framework.Storage; #endregion namespace Mario { class Image { #region Fields public Texture2D texture; public int imageX; public int imageY; public int textureX; public int textureY; BoundingBox boundBox; #endregion #region Main Methods public Image(Texture2D tex) { texture = tex; imageX = 0; imageY = 0; textureX = 0; textureY = 0; boundBox = new BoundingBox(new Vector3(imageX, imageY, 0), new Vector3(texture.Width, texture.Height, 0)); } public void Draw(SpriteBatch spriteBatch) { spriteBatch.Draw(texture, new Rectangle(imageX, imageY, texture.Width, texture.Height), Color.White); } #endregion } } the line of code getting the error is: boundBox = new BoundingBox(new Vector3(imageX, imageY, 0), new Vector3(texture.Width, texture.Height, 0)); please help me if you can.
  9. pi_man

    Printing numbers in Allegro

    Ok Thanks guys, that looks like it will work perfectly. Will try it out tonight.
  10. i've been having a bit of trouble with printing numbers in Allegro. At the moment i am using the textout_ex() function and replacing the string with a variable holding the number of lives the player has left, problem being it says "invalid conversion from `int' to `const char*'" Any help would be great.
  11. Does anybody around here know of an easy way to display text in xna? i have had a look at some tutorials but they seem to say to use some sort of algorithm for finding the letter you want from a texture of the alphabet which is beyond my mathematical abilities at the moment.
  12. one day i wish to become a professional games developer, so i was just wondering, what languages should i learn for this?
  13. i've been looking over the internet for some game programming tutorials and lately i have been finding that many a website has pointed me int the direction of "XNAspot.com" however when i try to connect to the server it takes me to some weird site that seems to have nothing to do with anything any of the websites have been talking about (it even changes every few times i visit). So my question is this: has the site moved anywhere or does anybody know where i can get the tutorials everyone has been talking about?
  14. pi_man

    [.net] XNA pong tutorial

    OK, thanks. Well, i guess that the first thing i am having trouble with is the images. I would like to know how to draw some 2D primitives for the paddles and the ball (i prefer this method to creating the images in paint or something). I have done some searching on the internet but haven't found anything thus far.
  15. I've been learning a bit of xna over the last few days and have decided that i would like to make a pong game, unfortunately there was a tutorial i found about 3/4 of a year ago by the guy that did the tutorials on XNAtutorial.com (joran omark, i think), from what i remember it was really good. The thing is, i can't find it agian. If anyone can direct me to a link that would be great. oh, and any general XNA pong tutorials would be fantastic as well, i tried the one at coding 4 fun but it didn't look like it was building the whole game because the guy loaded some pre-made files.
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!