Overclock.net › Forums › Software, Programming and Coding › Coding and Programming › Here's a Civilization type game I made
New Posts  All Forums:Forum Nav:

Here's a Civilization type game I made - Page 3

post #21 of 30
i hate code with passion but good job
 
XPS L502X
(9 items)
 
CM 110 Elite
(7 items)
 
CPUGraphicsRAMHard Drive
i7-2670QM 2GB NVIDIA GeForce GT 540M  6GB 1333MHz Dual Channel Ram 750GB Seagate Momentus 7200RPM 
Hard DriveCoolingOSKeyboard
64GB Crucial m4 Cooler Master Notepal L1 Windows 8 Professional x64 / Mint 14 Cinnamon 6... Backlit Keyboard 
Audio
Sound Blaster X-FI  
CPUMotherboardGraphicsRAM
G3258 H97I Plus Gigabyte 750 Ti Low Profile  8GB Skill Ripjaws 1600 Mhz 
Hard DrivePowerCase
Kingston V300 120 SSD  Corsair VS 550 CM Elite 110 
  hide details  
Reply
 
XPS L502X
(9 items)
 
CM 110 Elite
(7 items)
 
CPUGraphicsRAMHard Drive
i7-2670QM 2GB NVIDIA GeForce GT 540M  6GB 1333MHz Dual Channel Ram 750GB Seagate Momentus 7200RPM 
Hard DriveCoolingOSKeyboard
64GB Crucial m4 Cooler Master Notepal L1 Windows 8 Professional x64 / Mint 14 Cinnamon 6... Backlit Keyboard 
Audio
Sound Blaster X-FI  
CPUMotherboardGraphicsRAM
G3258 H97I Plus Gigabyte 750 Ti Low Profile  8GB Skill Ripjaws 1600 Mhz 
Hard DrivePowerCase
Kingston V300 120 SSD  Corsair VS 550 CM Elite 110 
  hide details  
Reply
post #22 of 30
Yeah, I would have probably presented this thread as what your team worked on and that you are proud of it. The parts about your classmates being so much less skilled than you are and the fact that you are superior because you are majoring in computer science whereas they are majoring in IT is something I would keep to myself. It's just kind of rude to bash others in a forum where they have no voice. Not to mention that your particular major has no bearing on your skilllevel and future success in the workplace.
Main System
(13 items)
 
  
CPUMotherboardGraphicsRAM
Phenom II X6 1090T MSI 890FXA-GD70 XFX Radeon 5850 16 GB Corsair XMS3 DDR3 1333 
Hard DriveOSMonitorPower
3 X 7200 RPM / 1 TB Win 7 Ultimate 64 2 x ASUS 23" VH232H 1080P SeaSonic X-650 
Case
Corsair 600T 
  hide details  
Reply
Main System
(13 items)
 
  
CPUMotherboardGraphicsRAM
Phenom II X6 1090T MSI 890FXA-GD70 XFX Radeon 5850 16 GB Corsair XMS3 DDR3 1333 
Hard DriveOSMonitorPower
3 X 7200 RPM / 1 TB Win 7 Ultimate 64 2 x ASUS 23" VH232H 1080P SeaSonic X-650 
Case
Corsair 600T 
  hide details  
Reply
post #23 of 30
Thread Starter 
Quote:
Originally Posted by tand1 View Post
Yeah, I would have probably presented this thread as what your team worked on and that you are proud of it. The parts about your classmates being so much less skilled than you are and the fact that you are superior because you are majoring in computer science whereas they are majoring in IT is something I would keep to myself. It's just kind of rude to bash others in a forum where they have no voice. Not to mention that your particular major has no bearing on your skilllevel and future success in the workplace.

Sorry if it came out that way. Its not IT vs CSC, its Software Engineering vs CSC. Software engineering is actually the more rigorous degree.

And its not so much that their code was bad, aside from the few cases I presented, its just that from a graphics/game logic standpoint it wasn't very good. We had more problems than we should have because despite my best efforts to steer the development in the right direction, I didn't want to have to stand behind them telling them what to write the entire time.

It was fairly obvious from most of the rest of the class's projects that they didn't have a clear understanding of how games work, and watching the presentations you could clearly see that there was usually just one person who actually understood game design, if there was anyone at all. If I was asked to design a system for something I didn't really understand I'd probably make similar mistakes.

I'm not saying they are inherently bad programmers, its just that their understanding of things like coordinate systems was a little lacking, which is perfectly understandable, since they've probably never taken any of the graphics courses.
    
CPUMotherboardGraphicsRAM
Core i5 4670k ASUS Maximus VI Gene Gigabyte GTX 460 1GB Kingston Hyper-X 
Hard DriveHard DriveHard DriveHard Drive
Samsung 830 OCZ Vertex 3 WD6401AALS WD5000AAKS 
CoolingOSMonitorMonitor
Noctua NH-D14 elementary OS Dell Ultrasharp U2312HM LG W2442PA-BF 
KeyboardPowerCaseMouse
Microsoft Sidewinder X4 Corsair HX750W Corsair Graphite 600T Logitech G700 
Audio
ASUS Xonar DG 
  hide details  
Reply
    
CPUMotherboardGraphicsRAM
Core i5 4670k ASUS Maximus VI Gene Gigabyte GTX 460 1GB Kingston Hyper-X 
Hard DriveHard DriveHard DriveHard Drive
Samsung 830 OCZ Vertex 3 WD6401AALS WD5000AAKS 
CoolingOSMonitorMonitor
Noctua NH-D14 elementary OS Dell Ultrasharp U2312HM LG W2442PA-BF 
KeyboardPowerCaseMouse
Microsoft Sidewinder X4 Corsair HX750W Corsair Graphite 600T Logitech G700 
Audio
ASUS Xonar DG 
  hide details  
Reply
post #24 of 30
Very nice. I created a Risk-like game. No where near as nice as yours. Mine had a 14x14, square field (not graphics, just color specific buttons for each player), up to 8 players, over TCP/IP.
Cerberus
(19 items)
 
  
CPUMotherboardGraphicsRAM
Core i7 2600K MSI P67A-GD65 (B3) Gigabyte GTX 1060 OC Corsair Vengeance 
Hard DriveHard DriveCoolingOS
Samsung F3 Samsung 840 EVO Corsair H50 Windows 10 
MonitorMonitorMonitorKeyboard
Samsung PX2370 Acer XB270HU Samsung PX2370 Logitech G710+ 
PowerCaseMouseMouse Pad
Corsair RM550 Corsair 650D Logitech G502 Custom 
AudioAudioAudio
Astro A50 Klipsch ProMedia 2.1 AudioTechnica ATH-M50 
  hide details  
Reply
Cerberus
(19 items)
 
  
CPUMotherboardGraphicsRAM
Core i7 2600K MSI P67A-GD65 (B3) Gigabyte GTX 1060 OC Corsair Vengeance 
Hard DriveHard DriveCoolingOS
Samsung F3 Samsung 840 EVO Corsair H50 Windows 10 
MonitorMonitorMonitorKeyboard
Samsung PX2370 Acer XB270HU Samsung PX2370 Logitech G710+ 
PowerCaseMouseMouse Pad
Corsair RM550 Corsair 650D Logitech G502 Custom 
AudioAudioAudio
Astro A50 Klipsch ProMedia 2.1 AudioTechnica ATH-M50 
  hide details  
Reply
post #25 of 30
Quote:
Originally Posted by lattyware View Post
Which is really not a good thing. The real wisdom is to write the code in the most readable, easy way, and then when you are done, see if you need to optimise it. There is no reason to optimise something when it isn't needed, and programmer time is expensive and valuable compared to a few milliseconds of run time.
this.SetTrue();
++rep;

But in all seriousness this is exactly the case, optimizing something that will never be noticed by the end user is a complete waste. So long as you are smart about what you code as you go along, you shouldn't have to optimize until it's been identified that your program isn't fast enough, at which point identify the bottleneck, fix it and move on. Also, half of the minor optimizations I see people make are things the compiler does better than most humans anyway. And finally, when you optimize a system that already works, you have a chance of causing new bugs, which will then waste more of your time.

Quote:
Originally Posted by nathris View Post
I'd rather rewrite a single function than have to rewrite the entire program later on in development because that poorly written function is too tightly integrated into the rest of the system.
Componentizing your code into functions is different than optimizing. I'm all for putting chunks of code into functions wherever it makes sense, but optimizing something that would go unnoticed is another thing entirely.
Edited by lordikon - 8/4/11 at 7:28pm
Foldatron
(17 items)
 
Mat
(10 items)
 
Work iMac
(9 items)
 
CPUMotherboardGraphicsGraphics
i7 950 EVGA x58 3-way SLI EVGA GTX 660ti GTX 275 
RAMHard DriveHard DriveHard Drive
3x2GB Corsair Dominator DDR3-1600 80GB Intel X25-M SSD 2TB WD Black 150GB WD Raptor 
Hard DriveOSMonitorKeyboard
2x 150GB WD V-raptor in RAID0 Win7 Home 64-bit OEM 55" LED 120hz 1080p Vizio MS Natural Ergonomic Keyboard 4000 
PowerCase
750W PC P&C Silencer CoolerMaster 690 
CPUGraphicsRAMHard Drive
Intel Core i5 2500S AMD 6770M 8GB (2x4GB) at 1333Mhz 1TB, 7200 rpm 
Optical DriveOSMonitorKeyboard
LG 8X Dual-Layer "SuperDrive" OS X Lion 27" iMac screen Mac wireless keyboard 
Mouse
Mac wireless mouse 
CPUGraphicsRAMHard Drive
i7-2600K AMD 6970M 1GB 16GB PC3-10600 DDR3 1TB 7200rpm 
Hard DriveOptical DriveOSMonitor
256GB SSD 8x DL "SuperDrive" OS X 10.7 Lion 27" 2560x1440 iMac display 
Monitor
27" Apple thunderbolt display 
  hide details  
Reply
Foldatron
(17 items)
 
Mat
(10 items)
 
Work iMac
(9 items)
 
CPUMotherboardGraphicsGraphics
i7 950 EVGA x58 3-way SLI EVGA GTX 660ti GTX 275 
RAMHard DriveHard DriveHard Drive
3x2GB Corsair Dominator DDR3-1600 80GB Intel X25-M SSD 2TB WD Black 150GB WD Raptor 
Hard DriveOSMonitorKeyboard
2x 150GB WD V-raptor in RAID0 Win7 Home 64-bit OEM 55" LED 120hz 1080p Vizio MS Natural Ergonomic Keyboard 4000 
PowerCase
750W PC P&C Silencer CoolerMaster 690 
CPUGraphicsRAMHard Drive
Intel Core i5 2500S AMD 6770M 8GB (2x4GB) at 1333Mhz 1TB, 7200 rpm 
Optical DriveOSMonitorKeyboard
LG 8X Dual-Layer "SuperDrive" OS X Lion 27" iMac screen Mac wireless keyboard 
Mouse
Mac wireless mouse 
CPUGraphicsRAMHard Drive
i7-2600K AMD 6970M 1GB 16GB PC3-10600 DDR3 1TB 7200rpm 
Hard DriveOptical DriveOSMonitor
256GB SSD 8x DL "SuperDrive" OS X 10.7 Lion 27" 2560x1440 iMac display 
Monitor
27" Apple thunderbolt display 
  hide details  
Reply
post #26 of 30
Quote:
Originally Posted by lordikon View Post
this.SetTrue();
++rep;

But in all seriousness this is exactly the case, optimizing something that will never be noticed by the end user is a complete waste. So long as you are smart about what you code as you go along, you shouldn't have to optimize until it's been identified that your program isn't fast enough, at which point identify the bottleneck, fix it and move on. Also, half of the minor optimizations I see people make are things the compiler does better than most humans anyway. And finally, when you optimize a system that already works, you have a chance of causing new bugs, which will then waste more of your time.



Componentizing your code into functions is different than optimizing. I'm all for putting chunks of code into functions wherever it makes sense, but optimizing something that would go unnoticed is another thing entirely.
Just a pet hate of mine, but I like my ++ to be after the variable name and are you sure that this has a function called SetTrue()?
    
CPUMotherboardGraphicsGraphics
FX-8350 Asus Crosshair V MSI GTX460 Hawk 1gb MSI GTX460 Hawk 1gb 
RAMHard DriveHard DriveHard Drive
Kingston HyperX 8gb (2x4gb) Crucial M4 64GB Samsung F3 1TB Western Digital 320GB 
CoolingOSMonitorMonitor
Custom WC Windows 7 Ultimate X64 Dell E2311H Dell E2311H 
MonitorKeyboardPowerCase
LH 23EN43 Ducky Year of the Dragon 2012 SilverStone Strider 1000W-P Corsair 800D 
Audio
Asus Xonar Essence STX 
  hide details  
Reply
    
CPUMotherboardGraphicsGraphics
FX-8350 Asus Crosshair V MSI GTX460 Hawk 1gb MSI GTX460 Hawk 1gb 
RAMHard DriveHard DriveHard Drive
Kingston HyperX 8gb (2x4gb) Crucial M4 64GB Samsung F3 1TB Western Digital 320GB 
CoolingOSMonitorMonitor
Custom WC Windows 7 Ultimate X64 Dell E2311H Dell E2311H 
MonitorKeyboardPowerCase
LH 23EN43 Ducky Year of the Dragon 2012 SilverStone Strider 1000W-P Corsair 800D 
Audio
Asus Xonar Essence STX 
  hide details  
Reply
post #27 of 30
Thread Starter 
Quote:
Originally Posted by FiX View Post
Just a pet hate of mine, but I like my ++ to be after the variable name and are you sure that this has a function called SetTrue()?
++rep and rep++ are different things.


cout << ++lattyware.rep prints 375 while cout << lattyware.rep++ prints out 374.
    
CPUMotherboardGraphicsRAM
Core i5 4670k ASUS Maximus VI Gene Gigabyte GTX 460 1GB Kingston Hyper-X 
Hard DriveHard DriveHard DriveHard Drive
Samsung 830 OCZ Vertex 3 WD6401AALS WD5000AAKS 
CoolingOSMonitorMonitor
Noctua NH-D14 elementary OS Dell Ultrasharp U2312HM LG W2442PA-BF 
KeyboardPowerCaseMouse
Microsoft Sidewinder X4 Corsair HX750W Corsair Graphite 600T Logitech G700 
Audio
ASUS Xonar DG 
  hide details  
Reply
    
CPUMotherboardGraphicsRAM
Core i5 4670k ASUS Maximus VI Gene Gigabyte GTX 460 1GB Kingston Hyper-X 
Hard DriveHard DriveHard DriveHard Drive
Samsung 830 OCZ Vertex 3 WD6401AALS WD5000AAKS 
CoolingOSMonitorMonitor
Noctua NH-D14 elementary OS Dell Ultrasharp U2312HM LG W2442PA-BF 
KeyboardPowerCaseMouse
Microsoft Sidewinder X4 Corsair HX750W Corsair Graphite 600T Logitech G700 
Audio
ASUS Xonar DG 
  hide details  
Reply
post #28 of 30
Quote:
Originally Posted by FiX View Post
Just a pet hate of mine, but I like my ++ to be after the variable name
The preincrement operator is almost always guaranteed to be as efficient, but also possibly more efficient than a postincrement. This is fairly rare though. The compiler will often optimize out what you do either way, and there is no change in efficiency when dealing with primitive types likes ints. It will only ever be more efficient in the case where you're incrementing or decrementing a class or struct that has overridden operators for pre/post increment and decrement. Often a post increment requires and additional operation with non-primitive types.

Here's an example:
http://www.spatial.com/blog/pre-incr...-faster-part-i
Foldatron
(17 items)
 
Mat
(10 items)
 
Work iMac
(9 items)
 
CPUMotherboardGraphicsGraphics
i7 950 EVGA x58 3-way SLI EVGA GTX 660ti GTX 275 
RAMHard DriveHard DriveHard Drive
3x2GB Corsair Dominator DDR3-1600 80GB Intel X25-M SSD 2TB WD Black 150GB WD Raptor 
Hard DriveOSMonitorKeyboard
2x 150GB WD V-raptor in RAID0 Win7 Home 64-bit OEM 55" LED 120hz 1080p Vizio MS Natural Ergonomic Keyboard 4000 
PowerCase
750W PC P&C Silencer CoolerMaster 690 
CPUGraphicsRAMHard Drive
Intel Core i5 2500S AMD 6770M 8GB (2x4GB) at 1333Mhz 1TB, 7200 rpm 
Optical DriveOSMonitorKeyboard
LG 8X Dual-Layer "SuperDrive" OS X Lion 27" iMac screen Mac wireless keyboard 
Mouse
Mac wireless mouse 
CPUGraphicsRAMHard Drive
i7-2600K AMD 6970M 1GB 16GB PC3-10600 DDR3 1TB 7200rpm 
Hard DriveOptical DriveOSMonitor
256GB SSD 8x DL "SuperDrive" OS X 10.7 Lion 27" 2560x1440 iMac display 
Monitor
27" Apple thunderbolt display 
  hide details  
Reply
Foldatron
(17 items)
 
Mat
(10 items)
 
Work iMac
(9 items)
 
CPUMotherboardGraphicsGraphics
i7 950 EVGA x58 3-way SLI EVGA GTX 660ti GTX 275 
RAMHard DriveHard DriveHard Drive
3x2GB Corsair Dominator DDR3-1600 80GB Intel X25-M SSD 2TB WD Black 150GB WD Raptor 
Hard DriveOSMonitorKeyboard
2x 150GB WD V-raptor in RAID0 Win7 Home 64-bit OEM 55" LED 120hz 1080p Vizio MS Natural Ergonomic Keyboard 4000 
PowerCase
750W PC P&C Silencer CoolerMaster 690 
CPUGraphicsRAMHard Drive
Intel Core i5 2500S AMD 6770M 8GB (2x4GB) at 1333Mhz 1TB, 7200 rpm 
Optical DriveOSMonitorKeyboard
LG 8X Dual-Layer "SuperDrive" OS X Lion 27" iMac screen Mac wireless keyboard 
Mouse
Mac wireless mouse 
CPUGraphicsRAMHard Drive
i7-2600K AMD 6970M 1GB 16GB PC3-10600 DDR3 1TB 7200rpm 
Hard DriveOptical DriveOSMonitor
256GB SSD 8x DL "SuperDrive" OS X 10.7 Lion 27" 2560x1440 iMac display 
Monitor
27" Apple thunderbolt display 
  hide details  
Reply
post #29 of 30
Quote:
Originally Posted by lordikon View Post
The preincrement operator is almost always guaranteed to be as efficient, but also possibly more efficient than a postincrement. This is fairly rare though. The compiler will often optimize out what you do either way, and there is no change in efficiency when dealing with primitive types likes ints. It will only ever be more efficient in the case where you're incrementing or decrementing a class or struct that has overridden operators for pre/post increment and decrement. Often a post increment requires and additional operation with non-primitive types.

Here's an example:
http://www.spatial.com/blog/pre-incr...-faster-part-i
Are you... Mr Miagi?
(or Yoda )
Lala
(13 items)
 
  
CPUMotherboardGraphicsRAM
i7-750 @ 3.00GHz Intel DP55WB Sapphire HD 5870 @ 950/1200 1.212V Kingston 2x2GB DDR3 1333.3 
Hard DriveOSMonitorPower
1TB WD Black, 1TB WD Green Win 7 Ultimate 64 bit Samsung P2370H Thermaltake ToughPower 750W 
Case
Thermaltake M9 Black 
  hide details  
Reply
Lala
(13 items)
 
  
CPUMotherboardGraphicsRAM
i7-750 @ 3.00GHz Intel DP55WB Sapphire HD 5870 @ 950/1200 1.212V Kingston 2x2GB DDR3 1333.3 
Hard DriveOSMonitorPower
1TB WD Black, 1TB WD Green Win 7 Ultimate 64 bit Samsung P2370H Thermaltake ToughPower 750W 
Case
Thermaltake M9 Black 
  hide details  
Reply
post #30 of 30
Quote:
Originally Posted by __Pat__ View Post
Are you... Mr Miagi?
(or Yoda )
lol no, I've just programming for a long time, and do it about 8-12 hours per day, 5 days per week. Do anything that often and you'll learn a lot about it.
Foldatron
(17 items)
 
Mat
(10 items)
 
Work iMac
(9 items)
 
CPUMotherboardGraphicsGraphics
i7 950 EVGA x58 3-way SLI EVGA GTX 660ti GTX 275 
RAMHard DriveHard DriveHard Drive
3x2GB Corsair Dominator DDR3-1600 80GB Intel X25-M SSD 2TB WD Black 150GB WD Raptor 
Hard DriveOSMonitorKeyboard
2x 150GB WD V-raptor in RAID0 Win7 Home 64-bit OEM 55" LED 120hz 1080p Vizio MS Natural Ergonomic Keyboard 4000 
PowerCase
750W PC P&C Silencer CoolerMaster 690 
CPUGraphicsRAMHard Drive
Intel Core i5 2500S AMD 6770M 8GB (2x4GB) at 1333Mhz 1TB, 7200 rpm 
Optical DriveOSMonitorKeyboard
LG 8X Dual-Layer "SuperDrive" OS X Lion 27" iMac screen Mac wireless keyboard 
Mouse
Mac wireless mouse 
CPUGraphicsRAMHard Drive
i7-2600K AMD 6970M 1GB 16GB PC3-10600 DDR3 1TB 7200rpm 
Hard DriveOptical DriveOSMonitor
256GB SSD 8x DL "SuperDrive" OS X 10.7 Lion 27" 2560x1440 iMac display 
Monitor
27" Apple thunderbolt display 
  hide details  
Reply
Foldatron
(17 items)
 
Mat
(10 items)
 
Work iMac
(9 items)
 
CPUMotherboardGraphicsGraphics
i7 950 EVGA x58 3-way SLI EVGA GTX 660ti GTX 275 
RAMHard DriveHard DriveHard Drive
3x2GB Corsair Dominator DDR3-1600 80GB Intel X25-M SSD 2TB WD Black 150GB WD Raptor 
Hard DriveOSMonitorKeyboard
2x 150GB WD V-raptor in RAID0 Win7 Home 64-bit OEM 55" LED 120hz 1080p Vizio MS Natural Ergonomic Keyboard 4000 
PowerCase
750W PC P&C Silencer CoolerMaster 690 
CPUGraphicsRAMHard Drive
Intel Core i5 2500S AMD 6770M 8GB (2x4GB) at 1333Mhz 1TB, 7200 rpm 
Optical DriveOSMonitorKeyboard
LG 8X Dual-Layer "SuperDrive" OS X Lion 27" iMac screen Mac wireless keyboard 
Mouse
Mac wireless mouse 
CPUGraphicsRAMHard Drive
i7-2600K AMD 6970M 1GB 16GB PC3-10600 DDR3 1TB 7200rpm 
Hard DriveOptical DriveOSMonitor
256GB SSD 8x DL "SuperDrive" OS X 10.7 Lion 27" 2560x1440 iMac display 
Monitor
27" Apple thunderbolt display 
  hide details  
Reply
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Coding and Programming
Overclock.net › Forums › Software, Programming and Coding › Coding and Programming › Here's a Civilization type game I made