BLOG WEEK 5 – Touching up the menu!

Hello!
4dd35e2b218fe182436644fb10a73b64
This week I have started to make the game look nice instead of making it work, and for now I have started to look at the menu and starting to fix up alot of things on it. First of all the menu screen is another picture nothing to fancy about it.

Next the buttons! The buttons are working so when you hover over them they change the look of it, or making it to be selected so to say. So i created a hitbox for the mouse pointer and for the buttons and simply made collision between the rects. So when the hitbox for the mouse intersected with the button it would simply change picture of the button making it look selected. I also made it look a bit more 3D just by simply setting the sprite 5 pixels lower and that results in more fancy buttons.

So the next thing on the checklist for the menu was the animation for the enemies walking, this was nothing special except doing an animation on it since anyone that have been programming in SFML should know how to do it.

Last but not least we have the way of putting the player in to the game, so instead of just popping up in the game we needed to have something to make it look better, more of a smooth transition. The whole plan for the menu is that it is going to scroll upwards and then make the player sprite to run up thowards the screen and when its in the same possition in the original spawning point for the player sprite that you can stear the game would start.

So I had to make a variable that could change all the sprites possition on the screen at the same time. I tried to use the sprite move command and even sprite setpossition(0, getpossition().y + scrollspeed) neither of these things worked so I had to controll it from one value instead of all the sprites them self move. So i solved this so i set the possition of all the sprites + scrollspeed that always goes upwards untill the screen is compleetly gone. After that I loaded in a pice of the map that would be in the begining so when the map would start to scroll it would not look strange. After that the player runs up and the game starts.

Thanks for me!

BLOG WEEK 5 – Touching up the menu!

En reaktion på ”BLOG WEEK 5 – Touching up the menu!

  1. Hello Christoffer, interesting post, you talk about the start menu and how you have worked on it and how different parts of it works. However some things could use more explanation and I don’t really understand some parts.

    Firstly, at the buttons you say you created a hitbox for the mouse, and simple check if the mouse’s hitbox collides with the buttons hitbox. Why not just simple check if the mouse position is inside the buttons hitbox? This way you don’t really need a hitbox for the mouse.

    After this you going into explaining that you made animation for the enemies in the background so it looked like there were walking. However you only really say that “anyone that have been programming in SFML should know how to do it”. Instead you could go a bit more into detail, did you use an existing animation manager that you had created earlier? Or did you have to create something new from the beginning? Just saying that “everyone should know how to do it” isn’t really helpful as it don’t really say anything.

    You continue about talking about how the games start, I have to give credits for the start game method, as it look quite nice seeing has everything “fly away” and the player character runs into the screen. However, I don’t really understand why you tried to move all the sprites instead of using a camera and just move it?

    Anyway, keep up the good work, I look forward to seeing your game on Friday!

    Gilla

Lämna en kommentar