• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
  • entries
    20
  • comments
    11
  • views
    24493

Toasty Update #3

Sign in to follow this  
Followers 0
CRYP7IK

886 views

Things done for this update:

SFMLDeltaTimer Added

I added an SFML based timer so that it can be used instead of the chrono timer on windows.

SFMLRenderSystem Added

SFMLRenderSystemRunning.PNG



So the SFML render system is pretty simple, it's constructor takes width, height and a window title. It automatically creates a window with those attributes (Which you can change or get after creation). It also handles management of textures, if you try and load a texture twice it will return the original texture. this works for sprites as well. The render system currently has a single view which one can manipulate, it basically just exposes zooming, moving and rotating of a view, support for multiple views will come eventually. If the window is closed it will return false on it's Update function and close the window.

This system updates a render components position, rotation and scale to that of the entity just before drawing the entity. The system does no culling of any sort at the moment nor does it have any kind of depth sorting it is just last component added is the one drawn on top.

SFMLRenderComponent Added

SFMLRenderComponent.PNG


This is essentially just a sprite, it requires a string and an SFML render system to create. It uses the SFML render system to get a texture pointer which it uses to create the sprite.

SFMLTextRenderComponent Added

SFMLTextComponent.PNG



Just used to render some text onto the screen and at the moment will load and use it's own font resource, it's something I'll have to change.

SFMLAnimationSystem Added

AnimationComponent.gif



This is a spritesheet based animation system and is not that robust at the moment. If the animation component has been set to play it will advance the position of the frame to the next one after the frame timer goes past the allowed frame time.

SFMLAnimationComponent Added

This just contains a map of strings to animation data, what the current animaiton is and whether it is playing. It has functionality for stopping and playing at the moment. It requires a SFMLRenderComponent to be able to be created as it uses it's sprite, it's best to give it the component that is attached to the entity! After it's created you have to give it very specific data:

  • frameWidth
  • frameHeight
  • frameNumber
  • startX
  • startY
  • currentFrame
  • currentRow
  • currentCol
  • animationTime
  • frameTime

    It's done this way because you might have different sized animations in the same atlas.
    SFMLTileMapComponent Added

    TileMapComponent.png



    During my test I noticed performance issues trying to render my own little map, so I decided to make this to alleviate that. It's a simple class and takes a string to use as the texture atlas, an int* for the data, the dimensions of the tiles and the desired width and height of the map. The data is just ints ranging from 0 to how many tiles you have, the SFMLTileMapComponent will assign 0...N in a row first left to right order, so that the top left tile is 0 and the on to it's right is 1. I basically stole some code off the SFML wiki to get this working.

    I plan on having several TileMap implementations, a simple one like this one and a multi-layer, multi-atlas one, I'll probably think of more features as I think on it.

    GameSystem

    I added the ability to create an entity in the game system, this makes creating a relevant entity to use in a game system a lot neater. I also added an ability to get all entities in a radius, it's pretty fast but I wouldn't use it if you had more than...say 1000 entities. I had a crazy bug when I first started:

    FailCircle.PNG



    and after a bunch of debugging and optimising it turned out I had just copy pasted x where y should have been...

    CircleWork.PNG




    I am already seeing failures in my API design and so I am re-evaluating and might do a refactor, although not before I get this version 'done'.




    The (MinSizeRel) ToastySFMLRenderSystem.dll is about 64 KB.




    Stuff TODO:


    • Fix crash if texture load failed from the render system
    • Add an action based sfml input system (Unity style)
    • Add basic collision system for SFML (no collision response)
    • Add culling pluggability into the SFML Render System
    • Have at least one culling mechanism to use in the SFML Render System
    • GUI, I'll probably base it on an already existing GUI.
    • A way to re-order render components

      That's it for now! Thanks for reading!

0
Sign in to follow this  
Followers 0


0 Comments


There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now