Advertisement
Guest User

Untitled

a guest
Dec 9th, 2016
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.05 KB | None | 0 0
  1. Mingfei Jiang
  2. 1320376
  3. COMPSCI 3GC3 Final Project
  4. Magic Tower
  5.  
  6. ====================================
  7. Features Implemented
  8. ====================================
  9. Lighting
  10. Textures
  11. Bitmaps (Bitmap Characters)
  12. Picking (Clicking on enemies to select)
  13. .obj loading
  14.  
  15. ====================================
  16. CONTROLS
  17. ====================================
  18. W,A,S,D to move the character
  19. LEFT CLICK on an enemy to view its stats
  20. RIGHT CLICK to open the shop
  21. PAGE UP and PAGE DOWN to zoom the camera in and out
  22. Press r to reset the game.
  23. Press q or esc to exit the program.
  24.  
  25. ====================================
  26. PROJECT STRUCTURE
  27. ====================================
  28. // more detailed comments and explainations in source code
  29. main.cpp
  30. - contains global variables, opengl/glut functions as well as some utility functions
  31. - drawStrokeText // draws bitmap characters on screen
  32. - getWorldCoordinates // projects ray from where the user clicked to find the world coordinate
  33. - initalizeFloors // initailize Entity objects based on a layout and stores them
  34. - keyboard // glut keyboard func
  35. - special // glut special func
  36. - init // initialization
  37. - display // glut display func
  38. - mouse // glut mouse func
  39. - reshape // glut reshape func
  40. - FPS // glut timer func
  41. - callBackInit // initalize callback functions
  42. - menuProc // logic for menu
  43. - createOurMenu // create menu
  44. - main // main function
  45.  
  46. layout.h
  47. - defines the layout of the flours using a vector of strings
  48.  
  49. entity.h
  50. - defines the entity class and its subclasses, entities are objects in the game
  51. - important functions in each entity include interact and draw
  52. - interact processes any interact functionalities and returns a boolean for if the player is able to mode to that tile
  53. - draw applies and textures, materials, transformations and draws the objects
  54. - Entity
  55. - Player
  56. - Block
  57. - Stair
  58. - Item
  59. - Enemy
  60.  
  61. material.h
  62. - defines the Material class, which stores the material values and has a function set() to set the current material
  63. - initailizes all the materials to be used
  64.  
  65. model.h
  66. - defines the Vertex and Face structure, which is used to construct a model
  67. - defines the model class, which is a model loaded using an obj loader in the load() function
  68. - within the model class, a draw() function is defined, which draws the object using the faces, vertexes, uvs, and normals
  69. - Vertex // struct that store x y and z values
  70. - Face // struct that stores the indexes of vertexes, uvs, and normals
  71. - Model // a model loaded from .obj files
  72.  
  73. texture.h
  74. - contains the loadPPM and loadTextures function
  75. - loadPPM // reads a ppm file and convert it to image data
  76. - loadTextures // initailizes the textures to be used
  77.  
  78. resources folder
  79. - the .obj files are models found online (through SketchUp 3D warehouse, BlendSwap, and the like), then modified to suit my needs and exported to .obj files using blender by me.
  80. - the ppm files are converted from pngs files that are either generated by me using the bake function in blender, or created by me using photoshop.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement