Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

143 Neutral

About mollekake

  • Rank
  1. mollekake

    Scaling a sprite

    Oh, thanks! But i don't understand what i'm supposed to do with my spritebatch. I'm a bit new to this.
  2. mollekake

    Scaling a sprite

    Hello fellas. I want my game to have old-school graphics. and i figure the easiest way would be to create the sprites in 8-bit and scale it up. But how do i scale it without it going all blurry? i'm working in visual studio 2010 c#.
  3. One of my favourite inspirations is FTL: Faster Than Light. 2 guys made that game. It's fun and great entertainment, which is what it's all about in the end.
  4. Aaah, yeah. Thanks! Works perfect! :D Didn't think about the direction. Next, make it only move along the X axis, but i'll try and figure that out myself :P
  5. Ahh, yeah, thanks! But, it still doesn't work :( if i click somewhere the sprite keeps chasing the mouse untill it reaches the destination.
  6. mollekake

    Baby's first pixel art

    Looking a lot better! i think what most people do wrong is to go for the classic hard black color for outlining. If you do want to use a "black" outline, soften down the color, make it a bit closer to gray. and people forget shades.  but yea, a lot of progress comes from trying. try different looks, different mouth, without glasses, other glasses and so on. try try try :P
  7. Hello.   I'm fairly new to xna/c# and i'm starting to get a grasp on the whole game mechanics. But i'ev run into an issue.   I want my sprite to move across the screen to my desired destination. I can almost get this to work.   what i have so far: i click somewhere on the screen, the sprite moves towards the mouse position, BUT if i move the mouse before the sprite reaches it's location it will follow the mouse. when it reaches the location, it stops and i can move the mouse.   what i want: click anywhere on screen, sprite moves towards position while i can freely move mouse around, even click a new position and the sprite goes to that position instead.   here is my code so far: MouseState mouseState = Mouse.GetState(); //get the current mouse state mousePosition = new Vector2(mouseState.X, mouseState.Y); //get the target (the mouse cursor) direction = (Vector2)mousePosition - Position; //get the direction from arrow to cursor direction.Normalize(); Vector2 target; if (mouseState.LeftButton == ButtonState.Released && oldState.LeftButton == ButtonState.Pressed) { target = mousePosition; move = true; } target = mousePosition; //this is the line that causes issues, but i can't remove it either. if (Vector2.Distance(target, Position) > 3 && move.Equals(true)) { Position += direction * 5; } else { move = false; } oldState = mouseState; // this reassigns the old state so that it is ready for next time
  8. mollekake

    Any point Learning XNA?

    Got to agree with everyone else here. XNA is great and not dead. You can still develop games with it, and i think it's a great place to learn.
  9. mollekake

    Detect single mouseclick - move sprite

    Well it is kinda wrong, that if line detects when the mouse is clicked and the last state was unclicked. i changed it to this to be correct: if (newState.LeftButton == ButtonState.Released && oldState.LeftButton == ButtonState.Pressed)
  10. mollekake

    Detect single mouseclick - move sprite

    Yeah. I learn the best by trying, so i will be testing a lot :P Thanks for the help so far :)
  11. mollekake

    Detect single mouseclick - move sprite

    Holy crap, i've been thinking completely wrong :P Thanks! Ofcourse it goes outside the Update method. Forgot that i was working inside the update method. It's quite different to do game stuff than other stuff :P
  12. mollekake

    Detect single mouseclick - move sprite

    Yeah that's the issue. I can't figure out how to do this. Should be simple though. The tutorial you linked to Inu, is almost the same as the one i used. But that gives me errors. Here's the code: private MouseState oldState; MouseState newState = Mouse.GetState(); if (newState.LeftButton == ButtonState.Pressed && oldState.LeftButton == ButtonState.Released) { // do something here } oldState = newState; // this reassigns the old state so that it is ready for next time     And the errors are: Invalid expression term 'private' and: ; expected, on the same line
  13. I am pretty much in the same postition as you. But there are a bunch of C# and XNA tutorials out there. Even though MS has stopped the xna support, doesn't mean it's dead. Take a look at "monogame".   I know some professional game devs use, and prefer, C#. So don't dissmiss it if you like it. I sure wont.
  14. Hello everybody!   I'm a bit new to this whole game programming, and pretty new to xna/c# aswell. I've been doing some hobby-programming with c#, but nothing large. I know some java, and have made a couple plugins for minecraft/bukkit, so hopefully i will grasp the c# language quicker.   I want to make a point-and-click game in 2D.  I will be doing my pixelart myself, and it will be extreamly basic   So here's my problem: I want the spreite to move along the X axis on the screen when i click once with the mouse. If i click again, it will move to the new position.   But i can't get it to detect a single click. I can make the sprite move when i hold down the mouse-button.   i found this one way with google's help, but i don't understand how that should work: It doesn't anyway. var currentMouseState = Mouse.GetState(); var lastMouseState = currentMouseState; ... if (lastMouseState.LeftButton == ButtonState.Released && currentMouseState.LeftButton == ButtonState.Pressed) { Console.WriteLine("should move"); Position += direction * 5; } i am ofcourse missing a bunch of code, but the console still don't output "should move".
  15. mollekake

    Where to Start?

    I also suggest gamemaker first. When you want to learn a language, i suggest Java. I started with doing small minecraft bukkit mods with java, was fun and easy to start with. Now i moved on to C# and XNA.   Seems like a good decicion so far.
  • Advertisement

Important Information

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

GameDev.net 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!