Page 3 of 4 FirstFirst 1234 LastLast
Results 21 to 30 of 34
  1. #21
    Join Date
    Jan 2004
    Location
    Kemptville, Ontario
    Posts
    6,242
    Well just in case anyone is interested in where I am at.

    Link removed because Ben screwed up.

    Please note that none of the textures are done. The models are place holders and many my ideas are not there yet.

    Currently the weapon's upgrades are triggered by your score. I will be using pickups instead. Also there are no shields as of yet.

    What I need to do, and to do it I need to go through the XNA volumes, is to make a base asteroid class and extend then various versions from that. There will be a hit point and damage points.

    The same thing with the enemy ships.

    Most of the changes are in the code and how things are organized. I consider this build as the starting point.
    Last edited by benmcl; 02-01-2010 at 04:57 PM.
    I have figured out what the internet is. You know what they say about an infinite number of monkeys hitting keys at random on an infinite number of typewriters for an infinite amount of time? Well the internet is like that. There is some big cosmic alien running that experiment here in order to find the answer to some big question or to create the greatest piece of literature known to the universe. From what I have seen so far I am sorry to say they are going to be greatly disappointed.

  2. #22
    Join Date
    May 2004
    Location
    UK
    Posts
    709
    I tried to check out the game but i'm on a mac so I'll have to try it out on my windows back later on .. cant wait

  3. #23
    Join Date
    Jan 2004
    Location
    Kemptville, Ontario
    Posts
    6,242
    Thank you.

    Just reminding everyone I do not consider this a game yet. Yes you can shoot stuff and get points. The assets are temporary. I am posting this so people can see where I am starting from. I hope to have something like a game within a month.

    Just reminding people.
    I have figured out what the internet is. You know what they say about an infinite number of monkeys hitting keys at random on an infinite number of typewriters for an infinite amount of time? Well the internet is like that. There is some big cosmic alien running that experiment here in order to find the answer to some big question or to create the greatest piece of literature known to the universe. From what I have seen so far I am sorry to say they are going to be greatly disappointed.

  4. #24
    Join Date
    Dec 2002
    Location
    Virginia Beach, VA
    Posts
    861
    Umm... Ben you need to include the data folder too if you want others to be able to play your game.

  5. #25
    Join Date
    Jan 2004
    Location
    Kemptville, Ontario
    Posts
    6,242
    oops. I forgot about that.

    I deleted that build from my machine and then I broke some stuff trying to figure something out.

    Ok ignore that build for now and I will get another one up tonight.
    I have figured out what the internet is. You know what they say about an infinite number of monkeys hitting keys at random on an infinite number of typewriters for an infinite amount of time? Well the internet is like that. There is some big cosmic alien running that experiment here in order to find the answer to some big question or to create the greatest piece of literature known to the universe. From what I have seen so far I am sorry to say they are going to be greatly disappointed.

  6. #26
    Join Date
    Jan 2004
    Location
    Kemptville, Ontario
    Posts
    6,242
    Going to try this again. I hope I got everything this time:

    http://142.46.155.226/ben/benmclSpaceFighterFeb1.rar

    Remember this is not a game yet and everything is temporary. Some textures were taken from the internet. Not much game play. Just me playing about.

    Got a couple of odd issues. One is the code to speed up the backgrounds. It is pretty well setup like the code for making the engine flames longer as you move up to indicating going faster. I want the background to speed up and down the same way. The only real change is changing the speed factor and not a scale.

    The issue is that I put the PlayerPrefab in the public GameObject and I test the Y position the same way. This time it is not giving me the Y position just the start position.

    I have noticed though that when running and I look at the engine flames and the public GameObject that has the playerPrefab it says playerPrefab(clone). When I check the public GameObject on the star field I just get playerPrefab.

    Some more research is in order.

    Also to carry out some ideas I need to learn a few things so back to XNA. I have completed before but couldn't do much with it due to time constraints. I have more free time now is back at it.

    Another thing I need to do is watch the videos on sprite management. While everything appears from the outside to be working inside it is a bit more messy. I understand the base concepts but lack the knowledge to execute them. That will change though shortly.

    Another thing I wish to learn in the near future is how to instantiate gameObjects without using the public gameObject method and dropping Prefabs on them. I also need to find a gameObjects position, scale and rotation to use.
    I have figured out what the internet is. You know what they say about an infinite number of monkeys hitting keys at random on an infinite number of typewriters for an infinite amount of time? Well the internet is like that. There is some big cosmic alien running that experiment here in order to find the answer to some big question or to create the greatest piece of literature known to the universe. From what I have seen so far I am sorry to say they are going to be greatly disappointed.

  7. #27
    Join Date
    Jan 2004
    Location
    Kemptville, Ontario
    Posts
    6,242
    I see that last night over tiredness caused a couple of bugs to show up. Three planets would not show up due to a silly error. Not worth re-uploading since you get the idea already.

    Still can't access the players y position other than the playerEngines script and the players script itself. I set everything the same but no idea at this time. Not going to worry about it right now though.

    What is real embarrassing is last night I forgot how to code a simple switch statement. I was too tired last night to even google or dare I say hit one of the XNA videos. Just used a series of if else but that is something that needs changing tonight.

    Update: Got the switch statement in. Man that was sad.
    Last edited by benmcl; 02-02-2010 at 09:00 PM.
    I have figured out what the internet is. You know what they say about an infinite number of monkeys hitting keys at random on an infinite number of typewriters for an infinite amount of time? Well the internet is like that. There is some big cosmic alien running that experiment here in order to find the answer to some big question or to create the greatest piece of literature known to the universe. From what I have seen so far I am sorry to say they are going to be greatly disappointed.

  8. #28
    Join Date
    Dec 2002
    Location
    Virginia Beach, VA
    Posts
    861
    Hey just play your game. Not a bad start at all.

  9. #29
    Join Date
    Jan 2004
    Location
    Kemptville, Ontario
    Posts
    6,242
    Thank you. I am happy so far. Fun to.

    That build has a plane and prefab for each planet that is picked at random at random times to display. I almost got it down to one plane, prefab and texture. Probably easier with sprite manager and the videos but I need to learn so I am doing it this way for now.
    I have figured out what the internet is. You know what they say about an infinite number of monkeys hitting keys at random on an infinite number of typewriters for an infinite amount of time? Well the internet is like that. There is some big cosmic alien running that experiment here in order to find the answer to some big question or to create the greatest piece of literature known to the universe. From what I have seen so far I am sorry to say they are going to be greatly disappointed.

  10. #30
    Join Date
    Jan 2004
    Location
    Kemptville, Ontario
    Posts
    6,242
    Well I figured out how to get my nine planets in one tif file along with their alphas and then call them using random numbers. uses one plane, material, texture and prefab. It wasn't exactly the way I wanted it but it works. I plan to use sprite manager or something to handle it anyhow. I just wanted to if I could figure it out and how it is done. I will be using something like it anyhow to animate the player ship's flames at some point.

    I still can't get the following to work.

    Code:
    using UnityEngine;
    using System.Collections;
    
    public class Starfield : MonoBehaviour
    {
        #region Fields
    
        private float baseStarFieldPositionY = 6.9f;
        private float secondStarFieldOffsetY = 15f;
        private float speed = 2f;
        private float bottomPosition = -8;
    
        public GameObject playerPrefab;
    
        #endregion
    
        #region Properties
    
        #endregion
    
        #region Functions
    
        // Use this for intialization
        void Start()
        {
             
        }
    
        // Update is called once per frame
        void Update()
        {
            float playerPositionY = playerPrefab.transform.position.y;
    
            float amtToMove = speed * playerPositionY * Time.deltaTime;
    
            transform.Translate(Vector3.down * amtToMove, Space.World);
    
            if (transform.position.y < bottomPosition)
            {
                transform.position = new Vector3(transform.position.x, baseStarFieldPositionY + secondStarFieldOffsetY, transform.position.z);
            }
        }
    
        #endregion
    }
    The problem portion is
    Code:
    float playerPositionY = playerPrefab.transform.position.y;
    No matter what I do it won't give me the player's position. I do have the player prefab put there.

    The following code for my engine works.
    Code:
    using UnityEngine;
    using System.Collections;
    
    public class PlayerEngine : MonoBehaviour
    {
        #region Fields
    
        public GameObject playerPrefab;
    
        #endregion
    
        #region Properties
    
        #endregion
    
        #region Functions
    
        // Use this for intialization
        void Start()
        {
    
        }
    
        // Update is called once per frame
        void Update()
        {
            float playerPositionY = playerPrefab.transform.position.y;
    
            transform.localScale = new Vector3(1f, playerPositionY, 1f);
        }
    
    
    
        #endregion
    }
    Note the important bit which works.
    Code:
    float playerPositionY = playerPrefab.transform.position.y;
    In Unity this is how it is setup. Notice as far as I can tell both the starField and the playerEngines is set the same.



    What is odd is shown here during game play. The playerPrefab in the playerEngines is showning playerPrefab(clone) while the starField is just showing playerPrefab. That is the only difference and I did set them up the same.



    At this point I am not even sure what to google or search for.

    Is there another way to get the players position using only code? Assume there is.
    Last edited by benmcl; 02-03-2010 at 09:32 PM.
    I have figured out what the internet is. You know what they say about an infinite number of monkeys hitting keys at random on an infinite number of typewriters for an infinite amount of time? Well the internet is like that. There is some big cosmic alien running that experiment here in order to find the answer to some big question or to create the greatest piece of literature known to the universe. From what I have seen so far I am sorry to say they are going to be greatly disappointed.

Page 3 of 4 FirstFirst 1234 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •