Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: [SOLVED] Help getting started on a specific type of menuscreen  (Read 2976 times)

0 Members and 1 Guest are viewing this topic.

supdawg

  • Newbie
  • *
  • Posts: 33
    • View Profile
[SOLVED] Help getting started on a specific type of menuscreen
« on: December 02, 2012, 06:51:30 am »
I want to create a menu screen with the same animations in this video



can anyone help me get started and give me some hints on how to do the black rectangle animation?

and also, i want there to be rain falling in my menuscreen. i was thinking of creating rain with the help of box2D and sfml graphics. someone please kindly direct me or give me some hints as i really have no idea how to get started on this.
« Last Edit: December 03, 2012, 05:05:43 am by supdawg »

supdawg

  • Newbie
  • *
  • Posts: 33
    • View Profile
Re: Help getting started on a specific type of menuscreen
« Reply #1 on: December 02, 2012, 06:59:49 am »
also i have an image that im displaying on the menuscreen and there is rain in the image. i want to make the rain on my menuscreen similar to that such that it looks like its actually raining.


Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
Re: Help getting started on a specific type of menuscreen
« Reply #2 on: December 02, 2012, 10:53:23 am »
Concerning the black rectangle, you can use a sf::RectangleShape. When a key is pressed, you continuously move it until it has reached its final position. The color of the sf::Texts is changed from black to white and vice versa.

What kind of rain effect do you have in mind? Should there be collsions, repelling, even fluid dynamics? If there are just drops falling down, you don't need an external library.
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

supdawg

  • Newbie
  • *
  • Posts: 33
    • View Profile
Re: Help getting started on a specific type of menuscreen
« Reply #3 on: December 02, 2012, 09:01:49 pm »
well the picture i posted above has rain in it. but its just a still picture. i want there to be pretty realistic rain that looks like the rain in the picture and i want the rain to kind of interact with the picture. as in when the rain reaches the ground in the picture it sort of "hits" the ground. and yes, if its not too hard, i want to have collisons, repelling, and fluid dynamics. i mean, the direction of the rain has to be randomized and not just straight down all the time. and the drops have to look like the one in the picture so the picture and the rain can blend together.

will this be too hard?

and regarding the menu screen, i understand that ill need a Rectangle and a change of text Color, but in the video, as the rectangle covers the text, the text goes from black to white as the rectangle moves to cover it. i cant seem to understand how i would code this. so could you help me understand how exactly i should code this?

so far this is what i think. i will make a
sf::RectangleShape
and i will use
text.getLocalBounds()
and use the height of the
text.getLocalBounds()
to measure how much my rectangle needs to move up/down to cover the text completely. Now how exactly i should move the rectangle is confusing me because the rectangle seems to "accelerate" and slow down to cover the text. it doesnt seem like a simple up or down motion (unless im imagining things). and ofcouse, the color changing of the text seems confusing to me too. like changing the color of the text as the rectangle covers it. because, if i just change the color of the text normally, then the text will just become white immediately before the rectangle manages to cover the whole text. so i need a little more guidance if possible :S

sorry for the essay post. im not that experienced with graphics.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11029
    • View Profile
    • development blog
    • Email
Re: Help getting started on a specific type of menuscreen
« Reply #4 on: December 02, 2012, 11:38:08 pm »
will this be too hard?
To get exactly what you want, yes of course it's hard! Do you think game companies write games just for fun in a few hours? ;)
Most of the rain effects you see in games are also just tricks that look cool but aren't realistic at all.
So I'd suggest you take down your high goals a bit and start small and learn more about the complexity of programming and specially graphics.

For the menu; since the code was written by Ve (aka as SuperV1234), maybe you can ask him, if he wants to share some code.
You could also use some images and make a simply frame animation. Other than that, it probably will get quite tricky and if you can't think of a way on your own, you're probably not up for such tasks yet. ;)

If you want fancy graphics you should probably look into some other applications that let you do things easily.
« Last Edit: December 02, 2012, 11:40:23 pm by eXpl0it3r »
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

supdawg

  • Newbie
  • *
  • Posts: 33
    • View Profile
Re: Help getting started on a specific type of menuscreen
« Reply #5 on: December 03, 2012, 05:05:26 am »
alrite thanks i will try and ask Ve for some tips

 

anything