Alert icon
We're changing our privacy policy. This stuff matters.  Learn more  Dismiss

Beginner's Guide to Game Programming Ep1 Part 6-B Drawing Text in SDL

Loading...

Sign in or sign up now!
4,779
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Jul 16, 2009

The Beginner's Guide to Game Programming:
A Problem Solving Approach
Episode 1: Makin' Pickin' Sticks
Part 6: Drawing Text in SDL

This is a written and video tutorial created to teach the basics of Allegro and SDL as well as game programming in general, while encouraging the newbie to code it out themselves.

This video covers the functions for drawing text in SDL.

This episode features guest speaker Alex Jaus
http://www.youtube.com/user/TheShadowsedge

You can get the written version and other things at my site:
http://www.moosader.com

Playlist link:
http://www.youtube.com/view_play_list?p=B9C8BC6F495BD17E

  • likes, 0 dislikes

Link to this comment:

Share to:

Uploader Comments (LusikkaMage)

  • yay it's finally out

  • Yooop! Thank ye thank ye Alex. Sorry I didn't get this done before I went on vacation. P:

Top Comments

  • Thanks!

  • Thanks ^0^

see all

All Comments (13)

Sign In or Sign Up now to post a comment!
  • am i the only one who noticed the intro and code at 0:16?

  • LOL nevermind, I didn't realise you had to manually download fonts.

  • I can't get the font to load.

    font = TTF_OpenFont( "data/georgia.ttf", size );

    doesn't work for me. How do I know the correct path to the font?

  • Great

  • @Grenadiac111

    I already got it long time ago :P thanks for help though :)

  • @YouKondziu An int and a const char are different types of data you must first convert scoreN into a string probably using the _itoa_s () function.

  • I can't get variable to be displayed, but when I put int "Text" it works, heres the part of code. int scoreN = 1; SDL_Surface *Score = NULL; Score = TTF_RenderText_Solid( regfont, scoreN ,blackc); SDL_BlitSurface(Score,NULL,scr­een,&cords);

    I want scoreN to increase when stick is picked, but I get error saying that invalid convertion from int to const char

    anyone could help?

  • Lusikka, you have a nicer sounding voice.

  • You may want to pass that string as "const string& msg". This way is faster because the string won't be copied, just a reference will be passed (it's like a pointer). And const because you do not want to accidentally modify it in a drawing function.

  • Nice tut o/

    thnx

Loading...

0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more