Best way to learn 2d games with D?
Steven Schveighoffer
schveiguy at gmail.com
Sun Mar 15 18:45:14 UTC 2020
On 3/15/20 2:14 PM, bauss wrote:
> On Sunday, 15 March 2020 at 17:58:58 UTC, Steven Schveighoffer wrote:
>> I want to try and learn how to write 2d games. I'd prefer to do it
>> with D.
>>
>> I've found a ton of tutorials on learning 2d gaming with other
>> languages. Is there a place to look that uses D for learning? Should I
>> just start with another language and then migrate to D later? Anyone
>> recommend any specific tutorial/book?
>>
>
> The theory is the same in any language ex. if you can write a 2d game in
> C++ chances are you can do it in D as well but you could probably apply
> the same theory to C, Java, Python etc.
>
> So for D what you really need to be familiar with, is just the library
> you're using.
>
> The theory for a 2d game is rather simple though.
>
> You have a loop on the main thread (or ui thread) and within that you
> handle events, clear the screen, draw the graphics and repeat pretty much.
>
[snip]
> I would recommend using Derelict and SDL with D since it's the most mature.
> If you can get a SDL application running and at the very least showing a
> window then I won't mind helping you in the right direction.
>
> It should be trivial using the guides available at the derelict docs.
Thanks, I'm pretty much starting from zero as I have very little
experience in what is necessary to actually do the drawing parts, or how
to store/manipulate sprites etc. I've got a lot of experience in GUI
design, but getting the rendering to work, making sure it's fast enough,
etc. seems like something I'd rather leave to someone else (i.e.
library/framework/etc).
I was looking at the lispysnake stuff, and realizing I have no idea what
any of the blogs are talking about. The D gaming libraries seem to come
from the perspective of "Oh, you know how to write games, here's how you
do it in D". I kind of need a "here's how you write 2d games" which uses
D as a way to show it.
I think I'll probably just use a straight tutorial with another language
and then move on to D. But thank you for the offer, I might take you up
on it later.
-Steve
More information about the Digitalmars-d-learn
mailing list