Skip to content
Jeffrey Carpenter edited this page Oct 30, 2013 · 37 revisions

TTcards

<PROJECT>_<FILE>_HPP


  • sf.net forums setup

http://astyle.sourceforge.net/astyle.html http://synergy-foss.org/wiki/Developer http://synergy-foss.org/wiki/Code_Style

  • nomlib:

    • round up all of the enums defined in nomlib and reorganize
    • replace custom err messages with SDL_GetError() call when possible
    • take nom::priv::FreeSurface, nom::priv::FreeTexture & so on out of priv namespace (leaving said functions at the root of the 'nom' namespace)
    • Convert nomlib/math module into templates (precompiled headers would be a plus, too!)
  • SDL2 Logger

http://www.gamedev.net/topic/645255-building-a-library-with-another-library/ http://forums.tigsource.com/index.php?board=27.0 http://www.cmake.org/Wiki/CMake:How_To_Find_Libraries

look at docs struct (is doxygen html present?)

http://git.netsurf-browser.org/libparserutils.git/log/ http://www.netsurf-browser.org/projects/libsvgtiny/

https://help.github.com/articles/remove-sensitive-data https://help.github.com/articles/deleting-files

  • travis.yml:
    • apt-get install -qq
    • matrix: allow_failures: gcc

Scratchpad


http://www.dreamincode.net/forums/topic/226865-how-to-draw-animation-lines-from-sprite-sheet/

* increase volume on cursor_cancel

* Fix bug in GameOverState with info_box strings longer than the width of the MessageBox

* re-arrange draw & update order in PlayState

* do not show player cursor when player2 is active

* be sure that we are not able to move when in board select mode

* merge in some of the recent GameConfig stuff

- GameConfig
  * Use an array "Scaled values" or such that we can then use to calculate automagically ?
  * provide resource path name (relative)

  * provide resource path type name (relative to resources)

resource paths should be filename only

  * add scale_resources option (instead of scale_factor perhaps) and check this bool result for whether or not to scale from within load time?

  * calculate scaled size from screen resolution from orig scale values from config.json?

  * calculate variable origins at run-time by getProperty & setProperty with new size (assuming origins are always original scale)

  * http://stackoverflow.com/questions/6331940/how-to-use-typedef-for-a-generic-class-in-c
  > This is how to do a typedef of what we were trying to do inside GameConfig class

  - Initializing values with scaled_factor (multiplying by two or more)
    * http://en.cppreference.com/w/cpp/utility/initializer_list
    * http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml?showone=Brace_Initialization#Brace_Initialization
  • nomlib:
    • bmFont docs: file format

    • Current version should be marked v1.0.0 ?

      Review References: SDL_version.h

    • Always free surface pointers of type SDL_Surface* with SDL_FreeSurface, even if they are local scope.

http://sdl.beuc.net/sdl.wiki/SDL_Surface

  - rename:
    * Update, Draw, etc. methods lowercase
    * Coords to Rect?
    * Remove '-inl' suffix from files

* svg reader & writer
* Command-line utility for SpriteSheet generation

* GrayFrame should inherit from IDrawable (remove IFrame) & have MessageBox initialize Gradient as a IDrawable pointer or such
> We might want to look into copy assignment operators for these classes while we are at it ...

  * MenuBox
  > QTreeWidget [Columns, Items] ... <item> [text, iconOn, iconOff, ...]
  > http://harmattan-dev.nokia.com/docs/library/html/qt4/qtreewidget-members.html

* make Cursor methods moveCursorUp, moveCursorDown, ... virtual methods to be re-implemented in ttcards?
> http://harmattan-dev.nokia.com/docs/library/html/qt4/qabstractitemview.html#CursorAction-enum
> http://harmattan-dev.nokia.com/docs/library/html/qt4/qabstractitemview.html#moveCursor

* Integrate Text class into SDL_MessageBox?

* split nomlib up into multiple libs?

* make obtaining joysticks count & name accessor methods?
* make IDrawable inherit from Transformable?

* Finish up fonts example

* Review Font & Text classes further

* Audio Groups? (Similar in concept to Drawables interface)

* icon loader using libicns

  - Crackling OGG music playback bug (experienced in Linux) fix:
    * [SFML Issue #271](https://github.com/LaurentGomila/SFML/issues/271)
    * [SFML Issue #341 ... Alternative Fix](https://github.com/LaurentGomila/SFML/pull/341)
    * [libsndfile note](http://www.mega-nerd.com/libsndfile/command.html#SFC_SET_SCALE_FLOAT_INT_READ)

* [Platform architecture detection](http://stackoverflow.com/questions/1505582/determining-32-vs-64-bit-in-c)

* no Update method in TrueTypeFont, BitmapFont?
* nomlib / gzip reader (Resources/magic.mgc.gz)
* https://github.com/LaurentGomila/SFML/wiki/Tutorial%3A-Manage-dynamic-key-binding

  - libjson-spirit
    * [C++11 Patch for boost::shared_ptr](http://stackoverflow.com/questions/18900730/boostshared-ptrshared-ptrconst-boostshared-ptr-is-implicitly-declared?lq=1)
    * http://stackoverflow.com/questions/7964360/using-stdshared-ptr-with-clang-and-libstdc
    * [Patch for boost::shared_ptr](https://svn.boost.org/trac/boost/changeset/73202)
    * [GCC, clang &  Compatibility](http://clang.llvm.org/compatibility.html#deleted-special-func)

- consider using explicit keyword in classes that inherit (such as MessageBox, Sprite, ...) to prohibit improper class usage
  * http://stackoverflow.com/questions/121162/what-does-the-explicit-keyword-in-c-mean/121216#121216
  * http://www.parashift.com/c++-faq/explicit-ctors.html

- version.[cpp|hpp]
  * version.cpp, version.hpp needs to be auto-generated on windows
  * once fixed, we need to re-comment version.[cpp|hpp] in nomlib/.gitignore
  * version.cpp should be added to other branches .gitignore files
// /usr/local/include/SDL/SDL_events.h
enum Event
{
  Quit = SDL_QUIT,
  KeyDown = SDL_KEYDOWN,
  MouseDown = SDL_MOUSEBUTTONDOWN,
  MouseUp = SDL_MOUSEBUTTONUP,
  JoystickButtonDown = SDL_JOYBUTTONDOWN,
  JoystickButtonUp = SDL_JOYBUTTONUP,
  JoystickAxis = SDL_JOYAXISMOTION,
  User = SDL_USEREVENT
};

// /usr/local/include/SDL/SDL_keysym.h
enum Key
{
  One = SDLK_1,
  Return = SDLK_RETURN,
  Enter = Key_Return,
  J = SDLK_j
};

// /usr/local/include/SDL/SDL_mouse.h
enum MouseButton
{
    Left = SDL_BUTTON_LEFT,
    Middle = SDL_BUTTON_MIDDLE,
    Right = SDL_BUTTON_RIGHT,
};

// /usr/local/include/SDL/SDL_video.h
enum Video
{
    Software = SDL_SWSURFACE,
    RLE = SDL_RLEACCEL,
    Resizable = SDL_RESIZABLE,
    DoubleBuffer = SDL_DOUBLEBUF
};

nom::Event::Quit
nom::Key::One
nom::MouseButton::Middle

Unsorted

Layering, Linked Lists, Menus:

Sprites

Alpha Blending

Gradients

Data Caches

SDL extensions

Bit Masks

Recursion

CMake

Namespaces (think: gamelib)

JSON

App Bundle

http://accountingplusplus.blogspot.com/2011/01/cmake-install-linux-and-os-x.html

  • http://stackoverflow.com/questions/1596945/building-osx-app-bundle

  • TODO: investigate dylibbundler cmd-line app

  • cd build; make clean; rm CMakeCache.txt; cmake -G Xcode ..

  • repeat for gamelib

  • open ttcards.xcodeproj;

  • Add File SDLmain.m into project from /Library/Frameworks/SDL.frameworks/devel-lite

  • Add SDLmain.m into Build Phase "Compile Sources"

  • ~/Downloads/lessons/osx_appfiles/

Example of Makefile and setRelativePath (different from current implementation)

Cross-Compiling

Cross-platform (Linux)

Network Programming

Event Queues

Potential design / class modeling idea

Signal/Slot event systems?

Function Pointers & Callbacks

Time

Audio

EMCC

SDL++

nom class design ideas

Sharing "Global" Game Data

  • Flyweight Design:

http://sourcemaking.com/design_patterns/flyweight http://sourcemaking.com/design_patterns/flyweight/cpp/2

Input Subsystem

Potential design ideas

Could we have cursor object poll available objects or perhaps more so "interested" (think: selected?) objects for their XY coords and if intersection occurs, toggle a value within cursor object to be checked ... on the flip side ( said polled objects ), we could check to see if said cursor object (toggled?) value is set, and if so ... complete an action

Inline Functions

UML Object Modeling

Type Erasure

SDL & Smart Pointers

Smart Pointers

*boost::shared_ptr

Doxygen

UI / GUI

Component Entity Systems

Artificial Intelligence (AI)

Finite-State Machines (FSM)

Class design

DisplayObject

Binary File Formats

File System

Triple Triad How To Play

Macros

Constants

Books

SDL2

Threads

Android Development w/ libSDL v2

2D Perspective Transformation

Travis-CI (Continuous Integration)

Optimizations

Unit Testing

Operator Overloading

Command Line Arguments Processing

Animation

Text/Fonts

Bitmap Fonts

TrueType Fonts

Text/Font Alignment

Unicode

Clone this wiki locally