• 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.
Sign in to follow this  
Followers 0
  • entries
    8
  • comments
    33
  • views
    21413

C# Game Programming: For Serious Game Creation - Completed

Sign in to follow this  
Followers 0
calculemus1988

1599 views

Finished my first sprite shooter. I will keep working on it for a while. I won't create the art, I will use sprites from other games. I am more interested in programming, so that is what I will focus on.

Here is the installer, please let me know if it works or does not work for you. I worked in Visual Studio C# and Windows XP, compiled for 32-bit architecture.

Download Game

0
Sign in to follow this  
Followers 0


9 Comments


Hello zarfius,

Thank you for your input :). You move on keyboard arrows and you shoot on Spacebar.

I guess all the trouble comes from you not having a sound card? Do you suggest I modify my game so that in such cases it is still playable but without sound? I could make that I guess, something like if(soundDeviceDetected){do sound stuff}.

How did you enter the game with that error anyways?

Cya
0

Share this comment


Link to comment
I get the same SoundManager errors as zarfius (just clicking ignore on the message box seems to work). I don't see why it would be anything to do with a sound card though. Possibly just a sound file in the wrong place or something?

In the game itself, I was at first confused by the player starting off the screen to the left. Also, the movement is a bit odd for a side-scroller, in that the ship actually turns in the direction it's going, rather than just moving up / down while facing the same way. Personally, I was disappointed that the ship bullets don't travel very far (made it rather hard, but perhaps I'm just not very good at it).
1

Share this comment


Link to comment
Hello _sprite, thanks for dropping by

Movement: Eventually the ship will move through stuff so that movement will be needed. Right now I agree the movement is odd, but as I add more level elements it will be justified I think.

Sound: Do you get sound to play when you shoot and on explosions?

Bullets: Bullets are alive in a rectangle. Make sure you play the game with window maximized. Or maybe you are at higher resolution and so the ship movement and bullets can only move in some smaller area on screen?

Anyways this is Form1.InitializeSounds()

private void InitializeSounds()
{
// Sounds are loaded here.
_soundManager.LoadSound("player_shoot", "Sounds/playerShoot.wav");
_soundManager.LoadSound("enemy_shoot", "Sounds/enemyShoot.wav");
_soundManager.LoadSound("enemy_explode", "Sounds/enemyExplode.wav");
}

For LoadSound first argument is string for easier sound naming, and second one is file path. Maybe I should use absolute paths instead?

Thank you for input :rolleyes:, cya



PS: Will work on that sound error, I have it showing up also on my other laptop PC. Dunno why, for now, on my PC, the one I work on, everything is fine.
0

Share this comment


Link to comment
Well, I don't know what the assertion actually is (I guess it comes from somewhere deep inside the LoadSound function since there's one error message for each sound), but in any case relative paths are probably the way to go. No sounds actually seem to play once I'm in the game after getting those messages.

After playing again for a bit, I don't think the bullets are so bad. I think I was just slightly surprised by the way the player's ship velocity is added to the bullet velocity (which is technically correct, I guess, but I think slightly unusual for an arcade style side-scroller (not that I've played many recently...))
1

Share this comment


Link to comment
Hi _sprite,

Here is the method LoadSound:

public void LoadSound(string soundId, string path)
{
// Generate a buffer.
int buffer = -1;
Al.alGenBuffers(1, out buffer);
int errorCode = Al.alGetError();

System.Diagnostics.Debug.Assert(errorCode == Al.AL_NO_ERROR, "AL_ERROR.");
System.Diagnostics.Debug.Assert(File.Exists(path), "File does not exist.");

int format;
float frequency;
int size;
IntPtr data = Alut.alutLoadMemoryFromFile(path, out format, out size, out frequency);

System.Diagnostics.Debug.Assert(data != IntPtr.Zero, "alutLoadMemoryFromFile failed.");

// Load wav data into the generated buffer.
Al.alBufferData(buffer, format, data, size, (int)frequency);
// Every seems ok, add it to the library.
_soundIdentifier.Add(soundId, new SoundSource(buffer, path));
}

The difference is I added comments to the Asserts so now you will get a message and know which one failed. Here is the game again with these comments added, would you like to please try again and just let me know which error it is? On my laptop I get error "alutLoadMemoryFromFile failed.", from the last Assert. On my PC everything is fine. I suppose you will get the same error.

About the bullets, that behavior was not planned for. I don't want it that way. Don't move and shoot, you will see that still some bullets get just a tiny bit faster for some reason. It is not that critical thing for now but will fix it.

[url="http://www.mediafire.com/?978f8furv662xt7"]Download game[/url]

Thank you
0

Share this comment


Link to comment
Using spruces from other games is copyright infringement. There are plenty of cheaply- and freely-available art resources online.
1

Share this comment


Link to comment
yckx I got them from [url="http://www.gsarchives.net/index2.php?category=all&system=computer&game=starcraft_brood_war&type=sprites&level0=non-animated"]here[/url]

Well if that is the case, I would gladly replace the art. Can you please recommend me where do I find free art resources? I need a whole package, more spaceships with same style.

The backgrounds are from NASA, they are free, I will just have to replace the spaceships. Sounds and explosions are done with free programs, sound and explosion generators.

By the way do you get to play the game, or you get sound error too?

Cya
0

Share this comment


Link to comment
I'm unsure at best of the legality of using resources from that site. I'm sure they're fine for internal/development use, but before you distribute your game I recommend replacing them with graphics you know you can legally use. You might check GD.net's own marketplace--perhaps the [url="http://www.gamedev.net/files/file/40-ultimate-ship-pack/"]Ultimate Ship Pack[/url].

I'm also getting the error:
[b]
alutLoadMemoryFromFile failed.

at SoundManager.LoadSound(String soundId, String path)
at GameForm.InitializeSounds()
at GameForm.ctor()
at Program.Main()[/b]

Based on [url="http://distro.ibiblio.org/rootlinux/ports/more/freealut/freealut-1.1.0/doc/alut.html#alutLoadMemoryFromFile"]this reference[/url], you should be able to use something like [b]alutGetErrorString( alutGetError() )[/b] to get a better indication of what is causing the error.
1

Share this comment


Link to comment

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