C++ is Good for Fast Coding

Warning! Some information on this page is older than 3 years now. I keep it for reference, but it probably doesn't reflect my current knowledge and beliefs.

Nov 2012

C++ is Good for Fast Coding

Many people believe that C and C++ are languages suitable only for coding some special kinds of applications - low level or high performance. I think it's not 100% true. Here is a story: 2011-11-11 we had a game development competition organized in this topic on forum.warsztat.gd, called "Explosive Hamster Exhibition Compo". The name comes from crazy game titles that can be generated by Video Game Name Generator, which was used in this compo to generate a topic, unique for each participant. We had to develop a game in 3 hours. From 3 topics generated for me I chose "Micro Sewer Plus" and made a game about closing sewers. (Download: Reg - MicroSewerPlus.7z - binary + source code, 479 KB.)

I managed to write this simple yet playable game in 3 hours and took 2nd place out of 10, despite my game was written in C++, while many others used the "easier" or "quicker" technologies like Java, JavaScript, XNA o Game Maker. What I want to show here is that C++ is not necessarily a language in which coding is hard and slow. It's all about having a good framework - a library with a set of functions and classes that handles all low-level stuff and allows you to implement the game itself quickly, easily and directly as you think about it. You don't have to manually free all allocated memory if you have smart pointers. You don't have to write shaders and setup Direct3D render states if you have Canvas class with methods like DrawSprite(x, y, color).

You can prepare a good library by yourself or download one of many freely available on the Internet and use just like in any other programming language. What you get in return when deciding to use C++ is great flexibility in defining how the interface of your library looks like. Thanks to templates, operator overloading and all that stuff you can create your own domain-specific language inside C++ (like the << operator is used to write to stream objects). At the same time, due to compiling to native code, creating objects on the stack and other language features you don't have to sacrifice performance. You don't have to use separate variables float x, y, z or dynamically allocate new Vector(x, y, z). You can define a vector structure with overloaded operators, use it conveniently and compiler will optimize the code so you can do thousands or millions of vector computations per second.

Comments (1) | Tags: c++ warsztat compo productions | Author: Adam Sawicki | Share


2015-06-12 11:21:49
christian louboutin, http://www.christian--louboutin.in.net/
louboutin shoes, http://www.christianlouboutin.org.uk/
christian louboutin shoes, http://www.christianlouboutinshoes.jp.net/
coach outlet online, http://www.coachfactory-outlet.co.com/
coach factory, http://www.coachfactoryoutletonline.co.com/
coach outlet usa, http://www.coach-handbags.com.co/
coach outlet, http://www.coachoutlet-online.com.co/
coach store online, http://www.coachoutletstore.net.co/
coach outlet, http://www.coachoutletstore-online.com.co/
chanel sunglasses, http://www.coco-chanelbags.com.co/
converse shoes, http://www.converse.net.co/
coach handbags, http://www.designerhandbagsoutlet.com.co/
eyeglasses online, http://www.eyeglassesonline.us.com/
eyeglass frames, http://www.eyeglassframes.us.com/
burberry clothes, http://www.fashion-clothing.us.com/
salvatore ferragamo, http://www.ferragamo.com.co/
ferragamo shoes, http://www.ferragamoshoes.net/
hair straightener, http://www.ghdhairstraightener.com.co/
gucci shoes outlet, http://www.gucci.me.uk/
gucci handbags, http://www.guccihandbags.com.co/
gucci factory, http://www.gucci-outlet.in.net/
gucci outlet, http://www.gucci--outlet.com.co/
gucci shoes, http://www.guccishoes.net.co/
gucci shoes, http://www.guccishoes.us.org/
hermes, http://www.hermesbags.com.co/
hermes birkin, http://www.hermesbirkin.com.co/
hermes outlet online, http://www.hermesoutlet.net.co/
hollister, http://www.hollister.us.org/
hollister clothing, http://www.hollisterclothing-store.in.net/
insanity workout, http://www.insanityworkout.net.co/
iphone cases, http://www.iphone-cases.us/
jimmy choo, http://www.jimmychoo.net.co/
jordan retro, http://www.jordanretro.org/
jordan shoes, http://www.jordan-shoes.com.co/
juicy couture outlet, http://www.juicycouture.com.co/
juicy couture handbags, http://www.juicycoutureoutlet.net.co/
kate spade, http://www.kate-spade.com.co/
kate spade handbags, http://www.katespade-outlet.com.co/
kate spade outlet online, http://www.kate-spades.com/
longchamp, http://www.longchamp.us.org/
longchamp handbags, http://www.longchamp.com.co/
louboutin, http://www.louboutin.jp.net/
louis vuitton canada, http://www.louis-vuittoncanada.ca/
louis vuitton bags, http://www.louisvuitton.jp.net/
louis vuitton, http://www.louis--vuitton.org.uk/
vuitton handbags, http://www.louisvuitton.so/
louis vuitton outlet online, http://www.louisvuittonas.com/

Post comment

Nick *
Your name or nickname
Your contact information (optional, will not be shown)
Text *
Content of your comment
Calculate *
(* - required field)
STAT NO AD [Stat] [Admin] [STAT NO AD] [pub] [Mirror] Copyright © 2004-2017 Adam Sawicki
Copyright © 2004-2017 Adam Sawicki