SFML Game Development Book (0)

什么是SFML:Simple and Fast Multimedia Library

SFML库由五个模块组成(官网详细介绍戳这里):
System module
Window module
Audio module
Graphcs module
Network module

环境搭建:
1.VS2013对应的SFML的下载地址
https://www.sfml-dev.org/download/sfml/2.4.2/
2.VS20123与SFML配置
https://www.sfml-dev.org/tutorials/2.4/start-vc.php

测试程序:

#include "stdafx.h"
#include <SFML/Graphics.hpp>
int _tmain(int argc, _TCHAR* argv[])
{
    sf::RenderWindow window(sf::VideoMode(640, 480), "SFML Application");
    sf::CircleShape shape;
    shape.setRadius(40.f);
    shape.setPosition(200.f, 200.f);
    shape.setFillColor(sf::Color::Cyan);
    while (window.isOpen())
    {
        sf::Event event;
        while (window.pollEvent(event))
        {
            if (event.type == sf::Event::Closed)
                window.close();
        }
        window.clear();
        window.draw(shape);
        window.display();
    }
    return 0;
}

开始SFML之旅

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
SFML is a cross-platform software development library written in C++ with bindings available for many programming languages. It provides a simple interface to the various components of your PC, to ease the development of games and multimedia applications. This book will help you become an expert of SFML by using all of its features to its full potential. It begins by going over some of the foundational code necessary in order to make our RPG project run. By the end of chapter 3, we will have successfully picked up and deployed a fast and efficient particle system that makes the game look much more ‘alive’. Throughout the next couple of chapters, you will be successfully editing the game maps with ease, all thanks to the custom tools we’re going to be building. From this point on, it’s all about making the game look good. After being introduced to the use of shaders and raw OpenGL, you will be guided through implementing dynamic scene lighting, the use of normal and specular maps, and dynamic soft shadows. However, no project is complete without being optimized first. The very last chapter will wrap up our project by making it lightning fast and efficient. What You Will Learn Dive deep into creating complex and visually stunning games using SFML, as well as advanced OpenGL rendering and shading techniques Build an advanced, dynamic lighting and shadowing system to add an extra graphical kick to your games and make them feel a lot more dynamic Craft your own custom tools for editing game media, such as maps, and speed up the process of content creation Optimize your code to make it blazing fast and robust for the users, even with visually demanding scenes Get a complete grip on the best practices and industry grade game development design patterns used for AAA projects Table of Contents Chapter 1. Under the Hood - Setting up the Backend Chapter 2. Its Game Time! - Designing the Project Chapter 3. Make It Rain! - Building a Particle System Chapter 4. Have Thy Gear Ready - Building Game Tools Chapter 5. Filling the Tool Belt - a few More Gadgets Chapter 6. Adding Some Finishing Touches - Using Shaders Chapter 7. One Step Forward, One Level Down - OpenGL Basics Chapter 8. Let There Be Light - An Introduction to Advanced Lighting Chapter 9. The Speed of Dark - Lighting and Shadows Chapter 10. A Chapter You Shouldnt Skip - Final Optimizations
Create and develop exciting games from start to finish using SFML About This Book Familiarize yourself with the SFML library and explore additional game development techniques Craft, shape, and improve your games with SFML and common game design elements A practical guide that will teach you how to use utilize the SFML library to build your own, fully functional applications Who This Book Is For This book is intended for game development enthusiasts with at least decent knowledge of the C++ programming language and an optional background in game design. What You Will Learn Create and open a window by using SFML Utilize, manage, and apply all of the features and properties of the SFML library Employ some basic game development techniques to make your game tick Build your own code base to make your game more robust and flexible Apply common game development and programming patterns to solve design problems Handle your visual and auditory resources properly Construct a robust system for user input and interfacing Develop and provide networking capabilities to your game In Detail Simple and Fast Multimedia Library (SFML) is a simple interface comprising five modules, namely, the audio, graphics, network, system, and window modules, which help to develop cross-platform media applications. By utilizing the SFML library, you are provided with the ability to craft games quickly and easily, without going through an extensive learning curve. This effectively serves as a confidence booster, as well as a way to delve into the game development process itself, before having to worry about more advanced topics such as “rendering pipelines” or “shaders.” With just an investment of moderate C++ knowledge, this book will guide you all the way through the journey of game development. The book starts by building a clone of the classical snake game where you will learn how to open a window and render a basic sprite, write well-structured code to implement the design of the game, and use the AABB bounding box collision concept. The next game is a simple platformer with enemies, obstacles and a few different stages. Here, we will be creating states that will provide custom application flow and explore the most common yet often overlooked design patterns used in game development. Last but not the least, we will create a small RPG game where we will be using common game design patterns, multiple GUI. elements, advanced graphical features, and sounds and music features. We will also be implementing networking features that will allow other players to join and play together. By the end of the book, you will be an expert in using the SFML library to its full potential. Style and approach An elaborate take on the game development process in a way that compliments the reader's existing knowledge, this book provides plenty of examples and is kind to the uninitiated. Each chapter builds upon the knowledge gained from the previous one and offers clarifications on common issues while still remaining within the scope of its own subject and retaining clarity. Table of Contents Chapter 1: It's Alive! It's Alive! – Setup and First Program Chapter 2: Give It Some Structure – Building the Game Framework Chapter 3: Get Your Hands Dirty – What You Need to Know Chapter 4: Grab That Joystick – Input and Event Management Chapter 5: Can I Pause This? – Application States Chapter 6: Set It in Motion! – Animating and Moving around Your World Chapter 7: Rediscovering Fire – Common Game Design Elements Chapter 8: The More You Know – Common Game Programming Patterns Chapter 9: A Breath of Fresh Air – Entity Component System Continued Chapter 10: Can I Click This? – GUI Fundamentals Chapter 11: Don't Touch the Red Button! – Implementing the GUI Chapter 12: Can You Hear Me Now? – Sound and Music Chapter 13: We Have Contact! – Networking Basics Chapter 14: Come Play with Us! – Multiplayer Subtleties
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值