Advertisement Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

258 Neutral

About FirstStep

  • Rank
  1. FirstStep

    Getting more curious and curious

    Isnt that jack of all trade master of none thing?
  2. FirstStep

    Getting more curious and curious

      I tried some frameworks in order: XNA -> SFML -> Opengl (I used the website you linked) ->Monogame -> Unity   I guess I could summarize my confusion like this: When I was using XNA, it was always exciting as I always learn something new especially browsing some source code. It was great and fun. Especially when I started opengl, since this is where I realize how things work using the website you gave, but even this is just scratching the surface. But then my mind started to change again, like many aspiring game devs they all wanna work at some big studios, so am I. So there is this doubt that even I am able to learn the low level stuff, it is the result that people are looking for. and basically working on an engine alone is such a very time consuming task. Then I started using Unity. 1st month I was having fun. ITs easy. All you gotta do is think about ideas and then plan the things you gotta do. But then I started to missed the low level stuff. the unknown things you discover and say "aaaahhh so this is how it works".  So I guess I am on the same boat as you. I maybe missing the excitement. The kind of self achievement thing. Or maybe I am just bored. I don't know.
  3. FirstStep

    Getting more curious and curious

      My interest is conflicting with my goal really. That's my I am more confuse
  4. As I started using Unity I became more curious about the things I didnt know. I realize how little my knowledge is in terms of game development. I also realize that using an engine is the way to go. But the thing is, I started to have this hunger to know how do this people do this engine. I have this game in my mind and I am currently doing it. But I am getting side track by this thoughts about how things work. It seems that my interest keeps on changing but my goal is still the same. To make the game I had in mind. Right now I am thinking if I should buy the book about game engine. A moment ago I was searching about scene graph and other stuff which I shouldn't worry about since I am using Unity. Has anyone been like this before?
  5. okay I think I found a solution but full of hacks and even I am not comfortable but it works      transform.Rotate(new Vector3(0,0,-1)* rotationspeed * Time.deltaTime);      pauseAngle = transform.rotation.eulerAngles.z;                 if(!pause){       timerPause += Time.deltaTime;              time = (distance / rotationspeed) - 0.2f; // modified formula of speed = distance / time         if(timerPause >= time){          print(timerPause + " " + time );          print( " pause angle " +( distance - pauseAngle - 20));                    distance = 180 + 20;                   float ss =rotationspeed * timerPause;          //print(ss);                     //print("pause setting to true");           rotationspeed = 0;           transform.eulerAngles = new Vector3(transform.eulerAngles.x,transform.eulerAngles.y,distance - 20);                      pauseTimerOffset = 2f;                      pause = true;         }      }      if(pause){       pauseTimerOffset -= Time.deltaTime;       if(pauseTimerOffset <= 0){        //print("pause is donne setting to false");        pause = false;        timerPause = 0;        rotationspeed = 100f;               }      } So the formula to get the time is from the speed = distance/time but modify it to find the time. I then subtract -0.2f on the condition checking, after that I added 20 to the distance which is 180 because every time it pause the angle is off for about 20 units. and then I readjust the rotation but this time subtract the 20 units.    Code is full of hack but if anyone found a better solution feel free to post it here :D
  6. Can someone help me how to pause a rotating object every time it reach half of the whole rotation?   I have this code but I can only get the 1st half       if(!pause){      transform.Rotate(new Vector3(0,0,-1)* rotationspeed * Time.deltaTime);      pauseAngle = transform.rotation.eulerAngles.z;     }     if(pauseAngle <= 180 && timerPause > 0 ){      timerPause -= Time.deltaTime;      pause = true;          }      if(timerPause <= 0){       timerPause = 2;       pause = false;      } Anyone?
  7. FirstStep

    Sticky power up?

    HA!   I got it. And I think youre right. I took the offset of the ball and position once only..    offset = position.X - paddle.position.X; and then on the update method  float x = paddle.position.X + offset;  position = new Vector2(x, position.Y); WORKS! Thanks
  8. FirstStep

    Sticky power up?

      Hmm No matter how many times I read your post, it still makes a little sense to me.  :( I was visualising things like these. I imagine a graphing paper. Since you said that a pixel is just a color. But if you add the coordinates it will have its position and will i guess be called pixel coordinate. But then I thought I was starting to understand it. then You sad I move 10 pixels with the coordinate of 200. That got me thinking, since I cant add a size in a paddle visualizing it as a point might help? So it would be 210(moved). How are ball coordinates and paddle coordinates related now? (300, 200)_ball = (300, 200)_pixel   (since (a, b)_ball == (a, b)_pixel) = (300, 200)_paddle  (since (a, b)_paddle = (a, b)_pixel). From what I understand here, since we are using the ball now, I cant visualize it as a zero size object. So in theory its the computation above results in the image below So ball at (0, 0) where is that in paddle coordinates? (0, 0)_ball (p+0, q+0)_paddle (p, q)_paddle So basically it all comes down as this code float x = paddle.position.x + ball.position.x; float y = paddle.position.y + ball.position.y;
  9. FirstStep

    Sticky power up?

    I am more confuse than ever now.  Say for example i have this float x = paddle.position.X + paddle.width / 2 - width / 2;   // 100 float y = paddle.position.Y - height ; // 100 position = new Vector2(x,y); // position(100,100) I am on the paddle coordinate here I think. I am more confuse on the pixel coordinate. I cant get my head around this.    How Am i going to get the pixel? I am using XNA and I dont know about this pixel coordinate.Really really confuse..
  10. FirstStep

    Positioning objects relatively

    What is the offset? is it the origin from the parents origin to childs origin? 
  11. Say I have  a parent object and I want to position its child base on where the parent go something like this     Usually i position objects base on screen origin.       Is there a way to position objects or how to position objects base on the parents origin and not screen origin?
  12. FirstStep

    Sticky power up?

      Ive thought about this. But I cant figure out how to get the position relative to the paddle especially if you move the paddle. Say I hit the right of the paddle (100,100) if I move the paddle position there must be a new position for the ball now. Although adding the speed works but I am interested on this getting the position relative to something?   Could you elaborate a little more? TY
  13. FirstStep

    Sticky power up?

    Im guessing this however() is the speed I am adding to the paddle? Am i correct?
  14. FirstStep

    Sticky power up?

    This is just sort of a follow up on my previous post about power ups on break out game.   How can you move a ball together with the paddle while the ball is stuck on paddle and retaining its position on where it hits the paddle?   I have a reset code here where It will put the ball on center. If i modify it  float x = paddle.position.X + ball.position.x; it just not working.   Say for example I got a sticky power up and then the ball hit right on the paddle. Theory is that I should be able to move the ball stuck on paddle but retaining its position on where its stuck. any tips? ty
  15. FirstStep

    PowerUp stuck

    I think this second version is working           public void pickPowerUp(Powers type, int duration)         {                         powers[type] = timeCounter + duration;         }         public override void update(GameTime time)         {             KeyboardState state = Keyboard.GetState();             Inpulthandler(state);                          position = ViewportCollision(time);             foreach (var power in powers)             {                 if(power.Value > timeCounter)                 {                     timer += (float)time.ElapsedGameTime.TotalSeconds;                     timeCounter += (int)timer;                     if (timer >= 1.0F) timer = 0F;                     Debug.WriteLine (power.Key +" " +timeCounter);                 }             }             base.update(time);         } There are two things I got really confuse. The first one is that when the ball hit the brick a power up should fall. So I was thinking the power up should handle the paddle. and the 2nd is the effect.   What I did now is that I put the effect to be controlled by the paddle. I also use dictionary class same as c++ map.  and It is working great :D     This is from the code manager          for(int i = 0; i < PowerUpses.Count; i++)             {                 if (PowerUpses[i].PowerUpPaddleCollision(paddle))                 {                     if(PowerUpses[i].Index == 1)                     {                         paddle.pickPowerUp(Powers.lengthen, 10);                     }                     if (PowerUpses[i].Index == 2)                     {                         paddle.pickPowerUp(Powers.sticky, 10);                     }                     PowerUpses.RemoveAt(i);                 }                 else                 {                     PowerUpses[i].update(time);                 }             } So uh basically I needed that list since theres a lot of power ups that call fall. and then basethe type on the index. I just set the value of the dictionary class in paddle class
  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!