Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
SFML Game Development.pdf
Скачиваний:
193
Добавлен:
28.03.2016
Размер:
4.19 Mб
Скачать

www.it-ebooks.info

SFML Game Development

Learn how to use SFML 2.0 to develop your own feature-packed game

Jan Haller

Henrik Vogelius Hansson

Artur Moreira

BIRMINGHAM - MUMBAI

www.it-ebooks.info

SFML Game Development

Copyright © 2013 Packt Publishing

All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.

Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the authors, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.

Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.

First published: June 2013

Production Reference: 1170613

Published by Packt Publishing Ltd. Livery Place

35 Livery Street Birmingham B3 2PB, UK.

ISBN 978-1-84969-684-5

www.packtpub.com

Cover Image by Vivek Sinha (vivek.ratan.sinha@gmail.com)

www.it-ebooks.info

Credits

Authors

Artur Moreira

Henrik Vogelius Hansson

Jan Haller

Reviewers

Brandon DeRosier

Karol Gasiński

Eyal Kalderon

Acquisition Editor

Edward Gordon

Lead Technical Editor

Mayur Hule

Technical Editors

Sanhita Sawant

Priya Singh

Nitee Shetty

Dennis John

Project Coordinator

Amey Sawant

Proofreaders

Dan McMahon

Stephen Swaney

Indexer

Monica Ajmera Mehta

Graphics

Ronak Dhruv

Abhinash Sahu

Production Coordinator

Pooja Chiplunkar

Cover Work

Pooja Chiplunkar

www.it-ebooks.info

Foreword

I'm really honored to write the first words of this book, the very first one about SFML.

When I started to write this library, in 2006, I couldn't imagine that it would become so much popular. Around 100,000 visitors per month, 100 new forum posts everyday...

this is huge! And this is just the beginning; with the release of SFML 2.0, the library makes an important step forward. While SFML 1 is a constantly evolving (understand "unstable") API, SFML 2.0 is meant to be a robust, stable, and mature foundation for the future. And hopefully a solid base for more and more great games.

Increasing popularity also means more effort from the authors to provide complete and quality documentation. Sadly, this is often overlooked by developers.

Although I do my best to provide detailed tutorials for SFML, they are nothing more than an improved API documentation. Users often ask me where they can find a more complete guide to start programming games with SFML. And until today,

I had nowhere to direct them to. But Artur, Henrik, and Jan did a great job to fill this hole. They have gathered their wisdom and experience into a unique book that covers the basics of game programming, as well as everything that SFML has to offer—from audio to network, through advanced graphics. What I really appreciate about this book is that it is written with the same philosophy that is behind SFML: good design, simplicity, and modern code.

I hope you will enjoy reading this book as much as I did and find what you're looking for; whether you're a beginner who wants to learn game programming with SFML, or a more experienced programmer who wants to improve his design and technical skills. And don't hesitate to come to the SFML forum if you have questions or comments. I, the authors of this book, and all the community will be glad to answer you.

Laurent Gomila

Author of SFML

Software Engineer, Tegesoft, France

www.it-ebooks.info

About the Authors

Artur Moreira is a game development enthusiast who ultimately aims to start a new game development company in his home country. He has been programming games and game-related software for over 4 years. Most of the effort in that time was put in creating an open source game-making library with lots of flexibility and portability. The library is called Nephilim and is known for supporting all major desktop and mobile operating systems, making game development fully crossplatform and fast. Alongside this big project, he keeps making his own prototypes and games for educational and commercial purposes.

Aside from the programming, he also puts some focus in creative areas such as 3D modeling, digital painting, and music composing.

I would like to thank, first of all, my girlfriend for her patience and unconditional support every single time the writing was taking all of my time and energy. Also, I can't be thankful enough for

the support of my parents and sisters, along with all the closest relatives, whose support is ever-present and always helpful. On the technical side, I would like to directly thank Jan Haller and Henrik Vogelius Hansson, the co-authors of the book, for their remarkable collaboration, skill, and teamwork. It's been always a pleasure to work with them.

www.it-ebooks.info

Henrik Vogelius Hansson has always been in love with both games and programming. He started his education fairly early and continued on into the indie scene with Defrost Games and their game Project Temporality. The next company that hired him was Paradox Development Studio where he got to work on titles such as

Crusader Kings 2.

Beside the game companies, Henrik has also been very active in the SFML community and has even provided a binding for Ruby called rbSFML.

I would like to thank my co-authors, Jan and Artur, for the amazing cooperation and great times. I am also very happy and would like to thank my family that encouraged me to pursue this line of work. Also special thanks to my grandmother.

Jan Haller is a Master's degree student of Electrical Engineering and Information Technology. In his free time, he occasionally develops games in C++. He is also interested in the creation of graphics and 3D models.

In 2008, Jan stumbled upon SFML. Since then, he has used the library for many of his works. One of his bigger projects was a 2D Jump'n'Run game, where the character has to find its way through different levels, defeating enemies and collecting various items. During the years, Jan has actively participated in the SFML community, getting a lot of insights into the development of SFML 2. He has also written a C++ library called Thor, which extends SFML by ready-to-use features such as particle systems or animations.

I would like to thank Laurent Gomila for the passion and huge efforts he invested into the Simple and Fast Multimedia Library. It has always been interesting to discuss with him about the library and its development process. I would also like to thank my coauthors, Artur Moreira and Henrik Vogelius Hansson, who have been a very nice team to work with.

www.it-ebooks.info

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]