A new game (Bosskoneun)
clayasaurus
clayasaurus at gmail.com
Thu Nov 9 18:14:23 PST 2006
Will DeVore wrote:
> == Repost the article of clayasaurus (clayasaurus at gmail.com)
> == Posted at 2006/11/09 20:52 to digitalmars.D.announce
>
> clayasaurus wrote:
>> Will DeVore wrote:
>>> Hello fellow D programmers,
>>>
>>> I thought I would announce the completion of the next game in my series
>>> written in D called bosskoneun. :)
>>>
>>> It is a 2D top-down shootem-up. Pictures, binaries and source are
>>> available at:
>>>
>>> http://distanthumans.info/programming/D/bosconian/bosconian.php
>>>
>>> D is so efficient that the game sleeps 98% of the time even under the
>>> most
>>> graphically intensense levels.
>>>
>>> Thanks Walter for creating an easy and powerful language. Hint: Look
>>> at the
>>> default high scores. ;) The credits list DigitalMars.com
>>> If you like the game, could it be posted to the "dlinks" section?
>>>
>>> My next assignment, on the horizon, is evaluating how D can be
>>> utilized on the
>>> PS3 for games. Gee Walter what do you think those chances are, wink
>>> wink. :)
>>>
>>> P.S. Posting this message didn't like the fact that I have a .info
>>> TLD. Hmmm...
>>> -Will.
>> Cool! You need to include SDL.dll in there too though. I'm going to give
>> it a spin.
>>
>> ~ Clay
>
> Tried it a little bit, I enjoy the game but it would be nice if you
> supported the arrow keys for movement and space for fire, the controls
> were a little difficult for me to manage :)
>
>
>
>
> Oops. You are right. I did forget the SDL.dll.
>
> Speaking about the arrow keys, I tried them but couldn't figure out how to get SDL
> to recognize two arrow keys for diagonals. The fire key is easy enough though. :)
---------
You might be interested in my input wrapper for SDL.
http://arcgames.dsource.org/arc/arc/input.html
http://dsource.org/projects/freeuniverse/browser/trunk/freeuniverse/arc/io/input.d
With it, all you have to do to get it to work is...
if (arc.io.keyDown(SDLK_LEFT) && arc.io.keyDown(SDLK_UP))
{
/// left up diagonal
}
I do have a 2D game library in D that I'm working on that uses SDL,
OpenGL (rendering), OpenAL (sound), and has a sprite class. Outdated
tutorials for it can be found here
http://www-users.mat.uni.torun.pl/~h3r3tic/dmedia/?n=Tutorials.ArcIntro
http://www-users.mat.uni.torun.pl/~h3r3tic/dmedia/?n=Tutorials.ArcAsteroids
--------
Or, just set a bool that is true if key is down and false if key is up,
then with your two key bools use
if (key_down && key_left)
{
/// diagonal down-left
}
~ Clay
More information about the Digitalmars-d-announce
mailing list