Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Best graphical choice to wear frogger game?

Tags:

c++

graphics

qt

Sorry for my bad english, i'm from Italy XD

I have done frogger game with a simple graphic choice: a gridlayout with a lot of updating labels. It works perfectly. I could set icons instead of label, but now I want to wear it with some better, and my teacher told me to choose from QGraphicScene + Item + View, or QPainter + QWidget::paintEvent.

What's the best choice for my case? Can you tell me your essential way to do that please?

like image 532
Francesco Bonizzi Avatar asked Jan 23 '26 10:01

Francesco Bonizzi


1 Answers

I would use QGraphicsScene. It's a high-level interface for working with multiple bit-mapped graphics, so it will be simpler to use. The display logic for your game should be pretty forward to implement. (Just keep the graphics scene matched to the current game state).

You'll still need to handle user inputs by listening to keyboard events. You can implement that at the QMainWindow level.

And of course, you'll need to write the actual game logic.

like image 116
nsanders Avatar answered Jan 25 '26 23:01

nsanders



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!