{"id":3018,"date":"2022-10-14T11:30:43","date_gmt":"2022-10-14T11:30:43","guid":{"rendered":"http:\/\/kristinka-blazeka-blog.from.hr\/?page_id=3018"},"modified":"2026-01-19T12:25:41","modified_gmt":"2026-01-19T12:25:41","slug":"razvoj-igara","status":"publish","type":"page","link":"http:\/\/kristinka-blazeka-blog.from.hr\/?page_id=3018","title":{"rendered":"Razvoj igara"},"content":{"rendered":"<h1>INTRODUCTION TO GAME DEVELOPMENT&nbsp;<\/h1>\n<p><strong>Table of Contents:<\/strong><\/p>\n<ul class=\"toc\">\n<li>Part 1. Critical game studies. A brief history of video games \/ Robert T. Bakie ; Games and society \/ Robert T. Bakie<\/li>\n<li>Pt. 2. Game design. Game design \/ Isaac Barry ; Game writing and interactive storytelling \/ Leslie Stirling<\/li>\n<li>Pt. 3. Game programming: languages and architecture. Teams and processes \/ Noel Llopis ; C++, Java, and scripting languages \/ Noel Llopis ; Programming fundamentals \/ Noel Llopis ; Architecture \/ Noel Llopis ; Memory and I\/O systems \/ Noel Llopis ; Debugging game \/ Steve Rabin<\/li>\n<li>Pt. 4. Game programming: math, collision detection, and physics. Mathematical concepts \/ Eric Lengrel ; Collision detection and resolutlon \/ Steve Rabin and Bretton Wade ; Real-time game physics \/ Graham Rhodes<\/li>\n<li>Pt. 5. Game programming: graphics, animation, AI, audio, and networking. Graphics \/ Tom Forsyth ; Character animation \/ Tom Forsyth ; Artificial intelligence: agents, architecture, and techniques \/ Steve Rabin ; Artificial intelligence: pathfindIng overview \/ Syrus Mesdaghi ; Audio programming \/ James Boer ; Networking and multiplayer \/ Chuck Walters.<\/li>\n<li>Part 6. Audio Visual design and production. Visual design \/ Mark Peasley ; 3D modeling \/ David Johnson ; 3D environments \/ Jeff Selbig ; 2D Textures and texture mapping \/ Tito Pagan ; Special effects \/ David Johnson ; Lighting \/ Peter Lewis ; Animation \/ Tito Pagan ; Cinematography \/ Peter Lewis ; Audio design and production \/ Tommy Tallarico and Todd M. Fay<\/li>\n<li>Pt. 7. Game production and the business of games. Game production and project management \/ Tom Sloper ; Game industry roles and economics \/ Kathy Schoback ; The publisher-developer relationship \/ Ed Bartlett ; Marketing \/ Sue Bohle ; Intellectual property content, law, and practice \/ Stephen Rubin ; Content regulation \/ Stephen Rubin.<\/li>\n<\/ul>\n<p>Games Programming Gems<\/p>\n<p>Section 1 Programming<\/p>\n<p>1.0 The Magic of Data-Driven Design<br \/>\n1.1 Object-Oriented Programming and Design Techniques<br \/>\n1.2 Fast Math Using Template Metaprogramming<br \/>\n1.3 An Automatic Singleton Utility<br \/>\n1.4 Using the STL in Game Programming<br \/>\n1.5 A Generic Function-Binding Interface<br \/>\n1.6 A Generic Handle-Based Resource Manager<br \/>\n1.7 Resource and Memory Management<br \/>\n1.8 Fast Data Load Trick<br \/>\n1.9 Frame-Based Memory Allocation<br \/>\n1.10 Simple, Fast Bit Arrays<br \/>\n1.11 A Network Protocol for Online Games<br \/>\n1.12 Squeezing More Out of Assert<br \/>\n1.13 Stats: Real-Time Statistics and In-Game Debugging<br \/>\n1.14 Real-Time In-Game Profiling<\/p>\n<p>Section 2 Mathematics<\/p>\n<p>2.0 Predictable Random Numbers<br \/>\n2.1 Interpolation Methods<br \/>\n2.2 Integrating the Equations of Rigid Body Motion<br \/>\n2.3 Polynomial Approximations to Trigonometric Functions<br \/>\n2.4 Using Implicit Euler Integration for Numerical Stability<br \/>\n2.5 Wavelets: Theory and Compression<br \/>\n2.6 Interactive Simulation of Water Surfaces<br \/>\n2.7 Quaternions for Game Programming<br \/>\n2.8 Matrix-Quaternion Conversions<br \/>\n2.9 Interpolating Quaternions<br \/>\n2.10 The Shortest Arc Quaternion<\/p>\n<p>Section 3 Artificial Intelligence<\/p>\n<p>3.0 Designing a General Robust AI Engine<br \/>\n3.1 A Finite-State Machine Class<br \/>\n3.2 Game Trees<br \/>\n3.3 The Basics of A* for Path Planning<br \/>\n3.4 A* Aesthetic Optimizations<br \/>\n3.5 A* Speed Optimizations<br \/>\n3.6 Simplified 3D Movement and Pathfinding Using Navigation Meshes<br \/>\n3.7 Flocking: A Simple Technique for Simulating Group Behavior<br \/>\n3.8 Fuzzy Logic for Video Games<br \/>\n3.9 A Neural-Net Primer<\/p>\n<p>Section 4 Polygonal Techniques<\/p>\n<p>4.0 Optimizing Vertex Submissions for OpenGL<br \/>\n4.1 Tweaking A Vertex&#8217;s Projected Depth Value<br \/>\n4.2 The Vector Camera<br \/>\n4.3 Camera Control Techniques<br \/>\n4.4 A Fast Cylinder-Frustum Intersection Test<br \/>\n4.5 3D Collision Detection<br \/>\n4.6 Multi-Resolution Maps for Interaction Detection<br \/>\n4.7 Computing the Distance into a Sector<br \/>\n4.8 Object Occlusion Culling<br \/>\n4.9 Never Let &#8216;Em See You Pop &#8211; Issues in Geometric Level of Detail Selection<br \/>\n4.10 Octree Construction<br \/>\n4.11 Loose Octrees<br \/>\n4.12 View-Independent Progressive Meshing<br \/>\n4.13 Interpolated 3D Keyframe Animation<br \/>\n4.14 A Fast and Simple Skinning Techniques<br \/>\n4.15 Filling the Gaps &#8211; Advanced Animation Using Stitching and Skinning<br \/>\n4.16 Real-Time Realistic Terrain Generation<br \/>\n4.17 Fractal Terrain Generation &#8211; Fault Formation<br \/>\n4.18 Fractal Terrain Generation &#8211; Midpoint Displacement<br \/>\n4.19 Fractal Terrain Generation &#8211; Particle Deposition<\/p>\n<p>Section 5 Pixel Effects<\/p>\n<p>5.0 2D Lens Flare<br \/>\n5.1 Using 3D Hardware for 2D Sprite Effects<br \/>\n5.2 Motif-Based Static Lighting<br \/>\n5.3 Simulated Real-Time Lighting Using Vertex Color Interpolation<br \/>\n5.4 Attenuation Maps<br \/>\n5.5 Advanced Texturing Using Texture Coordinate Generation<br \/>\n5.6 Hardware Bump Mapping<br \/>\n5.7 Ground-Plane Shadows<br \/>\n5.8 Real-Time Shadows on Complex Objects<br \/>\n5.9 Improving Environment-Mapped Reflection Using Glossy Prefiltering and the Fresnel Term<br \/>\n5.10 Convincing-Looking Glass for Games<br \/>\n5.11 Refraction Mapping for Liquids in Containers<\/p>\n<p>&nbsp;<\/p>\n<p>Introduction to Game AI<\/p>\n<p>1. Introduction: Game AI and How to Use This Book. 2. Simple Hard-Coded AI. 3. Finite State Machines. 4. Rule-Based AI. 5. Introduction to Random and Probabilistic Decisions. 6. Look-ahead, the First Step of Planning. 7. Book of Moves. 8. Emergent Behaviors. 9. Topics to Pursue From Here.<\/p>\n<p>&nbsp;<\/p>\n<p>rjesenja:<\/p>\n<div>\n<div>#include &lt;iostream&gt;<\/div>\n<div>#include &lt;vector&gt;<\/div>\n<div>int main()<\/div>\n<div>{<\/div>\n<div>&nbsp; &nbsp; int n, m;<\/div>\n<div>&nbsp; &nbsp; std::cin &gt;&gt; n &gt;&gt; m;<\/div>\n<div>&nbsp; &nbsp; std::vector&lt;std::vector&lt;char&gt;&gt; grid(n);<\/div>\n<div>&nbsp; &nbsp; int x = 0, h = 0;<\/div>\n<div>&nbsp; &nbsp; for (int i = 0; i &lt; n; i++) {<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; std::string row;<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; std::cin &gt;&gt; row;<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; grid[i].resize(row.size());<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; for (int j = 0; j &lt; row.size(); j++)<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; {<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; grid[i][j] = row[j];<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; }<\/div>\n<div>&nbsp; &nbsp; }<\/div>\n<div>&nbsp; &nbsp; for (int i = 0; i &lt; n-2; i++) {<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; for (int j = 0; j &lt; m-2; j++) {<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; int currChar = grid[i][j];<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (currChar == &#8216;.&#8217;) {<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; continue;<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \/\/ check H<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (grid[i + 1][j] == currChar &amp;&amp;<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; grid[i + 2][j] == currChar &amp;&amp;<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; grid[i + 1][j + 1] == currChar &amp;&amp;<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; grid[i + 0][j + 2] == currChar &amp;&amp;<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; grid[i + 1][j + 2] == currChar &amp;&amp;<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; grid[i + 2][j + 2] == currChar) {<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; h++;<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else if (grid[i + 2][j] == currChar &amp;&amp;<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; grid[i + 2][j + 2] == currChar &amp;&amp;<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; grid[i + 0][j + 2] == currChar &amp;&amp;<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; grid[i + 1][j + 1] == currChar) {<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; x++;<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; }<\/div>\n<div>&nbsp; &nbsp; }<\/div>\n<div>&nbsp; &nbsp; \/*std::cout &lt;&lt; std::endl;<\/div>\n<div>&nbsp; &nbsp; for (int i = 0; i &lt; n; i++) {<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; for (int j = 0; j &lt; m; j++)<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; {<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; std::cout &lt;&lt; grid[i][j];<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; }<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; std::cout &lt;&lt; std::endl;<\/div>\n<div>&nbsp; &nbsp; }*\/<\/div>\n<div>&nbsp; &nbsp; std::cout &lt;&lt; x &lt;&lt; &#8221; &#8221; &lt;&lt; h;<\/div>\n<div>}<\/div>\n<\/div>\n<div>&nbsp;<\/div>\n<div>rjesenje<\/div>\n<div>\n<div>\n<div>&nbsp;#include &lt;iostream&gt;<\/div>\n<div>#include &lt;string&gt;<\/div>\n<div>#include &lt;vector&gt;<\/div>\n<div>struct Person {<\/div>\n<div>&nbsp; &nbsp; std::string name;<\/div>\n<div>&nbsp; &nbsp; int dolH, dolM;<\/div>\n<div>&nbsp; &nbsp; int odlH, odlM;<\/div>\n<div>&nbsp; &nbsp; int minLost = 0;<\/div>\n<div>};<\/div>\n<div>int main()<\/div>\n<div>{<\/div>\n<div>&nbsp; &nbsp; int N;<\/div>\n<div>&nbsp; &nbsp; std::cin &gt;&gt; N;<\/div>\n<div>&nbsp; &nbsp; std::getchar();<\/div>\n<div>&nbsp; &nbsp; std::vector&lt;Person&gt; people;<\/div>\n<div>&nbsp; &nbsp; for (int personI = 0; personI &lt; N; personI++) {<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; int found = -1;<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; std::string in;<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; std::getline(std::cin, in);<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; Person person;<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; int count = 0;<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; int countP = 0;<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; char name[16];<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; int start;<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; char time[2];<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; for (int i = 0; i &lt; in.size(); i++) {<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (in[i] == &#8216; &#8216;) {<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (count == 0) {<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; name[i] = &#8216;\\0&#8217;;<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; person.name = std::string(name);<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; for (int j = 0; j &lt; people.size(); j++) {<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (people[j].name == person.name) {<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; found = j;<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; break;<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (countP == 1) {<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (count == 1) {<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; person.dolM = (time[0] &#8211; 48) * 10 + (time[1] &#8211; 48);<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; count++;<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; countP = 0;<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; start = i + 1;<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; continue;<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (in[i] == &#8216;:&#8217;) {<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (count == 1) {<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (countP == 0) {<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (i &#8211; start == 1) {<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; person.dolH = (time[0] &#8211; 48);<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else {<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; person.dolH = (time[0] &#8211; 48) * 10 + (time[1] &#8211; 48);<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else {<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (countP == 0) {<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (i &#8211; start == 1) {<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; person.odlH = (time[0] &#8211; 48);<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else {<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; person.odlH = (time[0] &#8211; 48) * 10 + (time[1] &#8211; 48);<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; countP++;<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; start = i + 1;<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; continue;<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (count == 0) {<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; name[i] = in[i];<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else {<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; time[i &#8211; start] = in[i];<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; }<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; person.odlM = (time[0] &#8211; 48) * 10 + (time[1] &#8211; 48);<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; person.minLost += person.dolM;<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; if (person.odlM != 0) {<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; person.minLost += 60 &#8211; person.odlM;<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; }<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; if (found == -1) {<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; people.push_back(person);<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; }<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; else {<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; people[found].minLost += person.minLost;<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; }<\/div>\n<div>&nbsp; &nbsp; }<\/div>\n<div>&nbsp; &nbsp; for (int i = 0; i &lt; people.size(); i++) {<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; for (int j = 0; j &lt; people.size() &#8211; i &#8211; 1; j++) {<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (people[j].minLost &lt; people[j + 1].minLost) {<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Person tmp = people[j];<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; people[j] = people[j + 1];<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; people[j + 1] = tmp;<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else if (people[j].minLost == people[j + 1].minLost) {<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; bool swap = 0;<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; std::string name1 = people[j].name;<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; std::string name2 = people[j + 1].name;<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; int repeat = (name1.size() &lt; name2.size()) ? name1.size() : name2.size();<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; for (int ch = 0; ch &lt; repeat; ch++) {<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (name1[ch] &gt; name2[ch]) {<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; swap = 1;<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; break;<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else if (name1[ch] == name2[ch]) {<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; continue;<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else {<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; break;<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (swap) {<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Person tmp = people[j];<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; people[j] = people[j + 1];<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; people[j + 1] = tmp;<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; }<\/div>\n<div>&nbsp; &nbsp; }<\/div>\n<div>&nbsp; &nbsp; for (int i = 0; i &lt; people.size(); i++) {<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; std::cout &lt;&lt; people[i].name &lt;&lt; &#8221; &#8221; &lt;&lt; people[i].minLost &lt;&lt; std::endl;<\/div>\n<div>&nbsp; &nbsp; }<\/div>\n<div>}<\/div>\n<\/div>\n<div>&nbsp;<\/div>\n<div>rjesenje<\/div>\n<div>\n<div>\n<div>#include &lt;iostream&gt;<\/div>\n<div>void sort(int* a, int* b, int* c) {<\/div>\n<div>&nbsp; &nbsp; int min = 10, max = 0, med;<\/div>\n<div>&nbsp; &nbsp; if (*b &lt; *a) {<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; min = *b;<\/div>\n<div>&nbsp; &nbsp; }<\/div>\n<div>&nbsp; &nbsp; else {<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; min = *a;<\/div>\n<div>&nbsp; &nbsp; }<\/div>\n<div>&nbsp; &nbsp; if (*c &lt; min) {<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; min = *c;<\/div>\n<div>&nbsp; &nbsp; }<\/div>\n<div>&nbsp; &nbsp; if (*b &lt; *a) {<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; max = *a;<\/div>\n<div>&nbsp; &nbsp; }<\/div>\n<div>&nbsp; &nbsp; else {<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; max = *b;<\/div>\n<div>&nbsp; &nbsp; }<\/div>\n<div>&nbsp; &nbsp; if (*c &gt; max) {<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; max = *c;<\/div>\n<div>&nbsp; &nbsp; }<\/div>\n<div>&nbsp; &nbsp; med = *a + *b + *c &#8211; min &#8211; max;<\/div>\n<div>&nbsp; &nbsp; *a = min;<\/div>\n<div>&nbsp; &nbsp; *b = med;<\/div>\n<div>&nbsp; &nbsp; *c = max;<\/div>\n<div>}<\/div>\n<div>int main()<\/div>\n<div>{<\/div>\n<div>&nbsp; &nbsp; int num;<\/div>\n<div>&nbsp; &nbsp; std::cin &gt;&gt; num;<\/div>\n<div>&nbsp; &nbsp; int jed, des, sto, a ,b;<\/div>\n<div>&nbsp; &nbsp; int sub = num;<\/div>\n<div>&nbsp; &nbsp; int count = 0;<\/div>\n<div>&nbsp; &nbsp; while (sub != 495) {<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; if (sub &lt; 100) {<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; sto = 0;<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; des = sub \/ 10;<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; jed = sub % 10;<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; sort(&amp;sto, &amp;des, &amp;jed);<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; }<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; else {<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; sto = sub \/ 100;<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; des = sub % 100 \/ 10;<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; jed = sub % 10;<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; sort(&amp;sto, &amp;des, &amp;jed);<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; }<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; b = sto * 100 + des * 10 + jed;<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; a = sto + des * 10 + jed*100;<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; sub = a &#8211; b;<\/div>\n<div>&nbsp; &nbsp; &nbsp; &nbsp; count++;<\/div>\n<div>&nbsp; &nbsp; }<\/div>\n<div>&nbsp; &nbsp; \/\/std::cout &lt;&lt; sto &lt;&lt; &#8221; &#8221; &lt;&lt; des &lt;&lt; &#8221; &#8221; &lt;&lt; jed &lt;&lt; std::endl &lt;&lt; a &lt;&lt; &#8221; &#8221; &lt;&lt; b &lt;&lt; &#8221; &#8221; &lt;&lt; count;<\/div>\n<div>&nbsp; &nbsp; std::cout &lt;&lt; count;<\/div>\n<div>}<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>INTRODUCTION TO GAME DEVELOPMENT&nbsp; Table of Contents: Part 1. Critical game studies. A brief history of video games \/ Robert T. Bakie ; Games and society \/ Robert T. Bakie Pt. 2. Game design. Game design \/ Isaac Barry ; Game writing and interactive storytelling \/ Leslie Stirling Pt. 3. Game programming: languages and architecture. &hellip; <a href=\"http:\/\/kristinka-blazeka-blog.from.hr\/?page_id=3018\" class=\"more-link\">Nastavi \u010ditati <span class=\"screen-reader-text\">Razvoj igara<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1263,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"ngg_post_thumbnail":0},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v17.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"http:\/\/kristinka-blazeka-blog.from.hr\/?page_id=3018\" \/>\n<meta property=\"og:locale\" content=\"hr_HR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Razvoj igara - learning creative&amp;openminded\" \/>\n<meta property=\"og:description\" content=\"INTRODUCTION TO GAME DEVELOPMENT&nbsp; Table of Contents: Part 1. Critical game studies. A brief history of video games \/ Robert T. Bakie ; Games and society \/ Robert T. Bakie Pt. 2. Game design. Game design \/ Isaac Barry ; Game writing and interactive storytelling \/ Leslie Stirling Pt. 3. Game programming: languages and architecture. &hellip; Nastavi \u010ditati Razvoj igara &rarr;\" \/>\n<meta property=\"og:url\" content=\"http:\/\/kristinka-blazeka-blog.from.hr\/?page_id=3018\" \/>\n<meta property=\"og:site_name\" content=\"learning creative&amp;openminded\" \/>\n<meta property=\"article:modified_time\" content=\"2026-01-19T12:25:41+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary\" \/>\n<meta name=\"twitter:label1\" content=\"Procijenjeno vrijeme \u010ditanja\" \/>\n\t<meta name=\"twitter:data1\" content=\"13 minuta\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebSite\",\"@id\":\"http:\/\/kristinka-blazeka-blog.from.hr\/#website\",\"url\":\"http:\/\/kristinka-blazeka-blog.from.hr\/\",\"name\":\"learning creative&amp;openminded\",\"description\":\"\\u201cFirst learn computer science and all the theory. Next develop a programming style. Then forget all that and just hack.\\u201d - George Carrette\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"http:\/\/kristinka-blazeka-blog.from.hr\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"hr\"},{\"@type\":\"WebPage\",\"@id\":\"http:\/\/kristinka-blazeka-blog.from.hr\/?page_id=3018#webpage\",\"url\":\"http:\/\/kristinka-blazeka-blog.from.hr\/?page_id=3018\",\"name\":\"Razvoj igara - learning creative&amp;openminded\",\"isPartOf\":{\"@id\":\"http:\/\/kristinka-blazeka-blog.from.hr\/#website\"},\"datePublished\":\"2022-10-14T11:30:43+00:00\",\"dateModified\":\"2026-01-19T12:25:41+00:00\",\"breadcrumb\":{\"@id\":\"http:\/\/kristinka-blazeka-blog.from.hr\/?page_id=3018#breadcrumb\"},\"inLanguage\":\"hr\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"http:\/\/kristinka-blazeka-blog.from.hr\/?page_id=3018\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"http:\/\/kristinka-blazeka-blog.from.hr\/?page_id=3018#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"http:\/\/kristinka-blazeka-blog.from.hr\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Razvoj igara\"}]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"http:\/\/kristinka-blazeka-blog.from.hr\/?page_id=3018","og_locale":"hr_HR","og_type":"article","og_title":"Razvoj igara - learning creative&amp;openminded","og_description":"INTRODUCTION TO GAME DEVELOPMENT&nbsp; Table of Contents: Part 1. Critical game studies. A brief history of video games \/ Robert T. Bakie ; Games and society \/ Robert T. Bakie Pt. 2. Game design. Game design \/ Isaac Barry ; Game writing and interactive storytelling \/ Leslie Stirling Pt. 3. Game programming: languages and architecture. &hellip; Nastavi \u010ditati Razvoj igara &rarr;","og_url":"http:\/\/kristinka-blazeka-blog.from.hr\/?page_id=3018","og_site_name":"learning creative&amp;openminded","article_modified_time":"2026-01-19T12:25:41+00:00","twitter_card":"summary","twitter_misc":{"Procijenjeno vrijeme \u010ditanja":"13 minuta"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebSite","@id":"http:\/\/kristinka-blazeka-blog.from.hr\/#website","url":"http:\/\/kristinka-blazeka-blog.from.hr\/","name":"learning creative&amp;openminded","description":"\u201cFirst learn computer science and all the theory. Next develop a programming style. Then forget all that and just hack.\u201d - George Carrette","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"http:\/\/kristinka-blazeka-blog.from.hr\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"hr"},{"@type":"WebPage","@id":"http:\/\/kristinka-blazeka-blog.from.hr\/?page_id=3018#webpage","url":"http:\/\/kristinka-blazeka-blog.from.hr\/?page_id=3018","name":"Razvoj igara - learning creative&amp;openminded","isPartOf":{"@id":"http:\/\/kristinka-blazeka-blog.from.hr\/#website"},"datePublished":"2022-10-14T11:30:43+00:00","dateModified":"2026-01-19T12:25:41+00:00","breadcrumb":{"@id":"http:\/\/kristinka-blazeka-blog.from.hr\/?page_id=3018#breadcrumb"},"inLanguage":"hr","potentialAction":[{"@type":"ReadAction","target":["http:\/\/kristinka-blazeka-blog.from.hr\/?page_id=3018"]}]},{"@type":"BreadcrumbList","@id":"http:\/\/kristinka-blazeka-blog.from.hr\/?page_id=3018#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"http:\/\/kristinka-blazeka-blog.from.hr\/"},{"@type":"ListItem","position":2,"name":"Razvoj igara"}]}]}},"_links":{"self":[{"href":"http:\/\/kristinka-blazeka-blog.from.hr\/index.php?rest_route=\/wp\/v2\/pages\/3018"}],"collection":[{"href":"http:\/\/kristinka-blazeka-blog.from.hr\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"http:\/\/kristinka-blazeka-blog.from.hr\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"http:\/\/kristinka-blazeka-blog.from.hr\/index.php?rest_route=\/wp\/v2\/users\/1263"}],"replies":[{"embeddable":true,"href":"http:\/\/kristinka-blazeka-blog.from.hr\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3018"}],"version-history":[{"count":7,"href":"http:\/\/kristinka-blazeka-blog.from.hr\/index.php?rest_route=\/wp\/v2\/pages\/3018\/revisions"}],"predecessor-version":[{"id":4560,"href":"http:\/\/kristinka-blazeka-blog.from.hr\/index.php?rest_route=\/wp\/v2\/pages\/3018\/revisions\/4560"}],"wp:attachment":[{"href":"http:\/\/kristinka-blazeka-blog.from.hr\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3018"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}