19:34
09 Sep 2010

News

Latest Updates
Recent Comments
Most Popular Downloads

Projects

Blob Wars : Blob And Conquer
Blob Wars : Metal Blob Solid
JGameLaunch
The Legend of Edgar
Project: Starfighter
Random Name Generator
Random Shooter
TANX Squadron
Virus Killer
XMAME GUI

Older Files

List of Older Downloads

Medals

Main & Signup
Recently Awarded
Player List

Games
Blob Wars : Metal Blob Solid
Legend of Edgar
Virus Killer

Online Manuals

Blob Wars : Blob And Conquer
Blob Wars : Metal Blob Solid
Project: Starfighter
The Legend of Edgar
Virus Killer

LBP Beta Code!

Beta Code Giveaway!

Game Tutorials

Overview and Comments

Basic Series
1.01 - Opening a Window
1.02 - Graphics
1.03 - Sound
1.04 - Input and Movement
1.05 - Simple Shooter Pt. 1
1.06 - Simple Shooter Pt. 2
1.07 - Simple Shooter Pt. 3
1.08 - Sprites and Animation
1.09 - Starfields
1.10 - A Basic Game

Intermediate Series
2.01 - Displaying a Tile Based Map
2.02 - Scrolling a Tile Based Map
2.03 - A Tile Based Map Editor
2.04 - Tile Based Map Collision Detection
2.05 - Advanced Animation

Articles

Making of TANX Squadron
Making of Starfighter
Making of Metal Blob Solid
Making of Blob And Conquer

Blob Wars Review #1
Blob Wars Review #2
Blob Wars Review #3

Blob And Conquer Review #1

Interview with Stephen J Sweeney

Gallery

3D Renders

Help and FAQs

Installation and Licensing Help

About

Contact Information

THE HONOUR OF THE KNIGHTS
The new Creative Commons Licensed
novel from Stephen J Sweeney

Visit the official website,
www.battleforthesolarsystem.com
to start reading online!

Buy Now! from Amazon.co.uk

Buy Now! from Book Depository

 Comments for SDL Tutorial 5 (4)

Bryan
June 22nd, 2009 at 17:15

Why is it that when the player entity is moved with the UP + LEFT keys, the FIRE mechanism doesn't work? I cant figure it out? Any help would be great!

 
Rik
June 22nd, 2009 at 18:18

It's most likely that your keyboard won't accept multiple key presses. Try changing the key that fires to something like Left Control (the code is SDLK_LCTRL).

 
Bryan
June 22nd, 2009 at 23:46

Thanks for reply, yeah I was thinking that too. But all other multi-directions work fine. Just UP+LEFT doesn't. I even tried on another computer. Even stranger, on *nix build it had the up+left no shoot problem, on a Winblows build it has the DOWN+LEFT no shoot problem, but again all the other multi-directions in both builds are fine.. Very weird. =) I will try your suggestion to change the fire key.

 
Ivor
June 22nd, 2010 at 01:03

When keeping the space key pressed, the program didn't play any sound for the 9th shot (and periodically, each time after firing 8 shots). Mix_GetError() returns "No free channels available" and specifying a channel in Mix_PlayChannel function in audio.c instead of leaving it -1 seems to have fixed this problem.
Anyway, awesome tutorial, very easy to read. You've taught me much and I am very thankful for that.

 
Name
Homepage
Email
Comments
-- Homepage must start with http://
-- Javascript and Cookies must be enabled to use this form
 

2,006,366 pages served

Copyright © 1996 - 2010 Parallel Realities :: About :: License