How havanduc20194510/ailatrieuphu-1 works
Project type and purpose
• This is a full‐stack, networked quiz game (“Ai là triệu phú”) composed of
a Qt/QML‐based client (UI + local logic) and a C server that persists data in MySQL.
• Users can register/login, play solo or PvP, and the client connects over TCP to the server.
File structure
• Top‐level:
• client/ — Qt 5.12 QML frontend + C++ “backend” logic, assets (audio, fonts, sprites)
• server/ — C socket server, config, database.sql
• client:
• qml/ — all UI pages and popups (LoginPage, GameScreen, etc.)
• src/ & headers/ — C++ and C source files (BackEnd.cpp/h handle network protocols, Utils for helpers)
• assets/ — audio clips and graphics for the game
• server:
• server.c/h — main accept loop, request handling, game logic, user/score queries
• config — server settings (port, DB credentials)
• database.sql — table schemas for accounts, questions, game history
README for additional insights
• Technologies:
• Client: C/C++, Qt 5.12, QML, OpenGL library
• Server: C, POSIX sockets, libmysqlclient-dev, MySQL Server
• Execution flow:
• Start MySQL + import database.sql
• Launch server with port → accepts TCP clients
• Launch client with server IP + port → renders QML UI, interacts with server
Detail without over‐segmentation
• Major modules (UI, logic, networking)
• Config file and Makefile as annotations or footnotes