Search dub via duckduckgo

2016-04-26 Thread rcorre via Digitalmars-d-announce
For those that use duckduckgo as their search engine, you can now search the dub package registry with the '!dub' bang. I submitted this a while ago on a whim and it just got approved.

Re: D bindings to Chipmunk2D 7.0.1

2016-03-02 Thread rcorre via Digitalmars-d-announce
On Wednesday, 2 March 2016 at 15:06:26 UTC, Andrej Mitrovic wrote: I ported it to D as I'm interested if it could improve performance since you could theoretically inline code. I haven't touched the code in a long time, though. Nice to see bindings too however! Thanks! Porting is an

D bindings to Chipmunk2D 7.0.1

2016-03-01 Thread rcorre via Digitalmars-d-announce
chipmunkd [1] provides D bindings for the most recent version (7.0.1) of Chipmunk2D [2], a 2D physics library. Note that there is also DChip [3], which provides a full source port and is currently targeting the 6.X branch. I figured bindings would be easier to keep up to date with upstream

Re: Damage Control: An homage to Rampart (Alpha)

2016-01-05 Thread rcorre via Digitalmars-d-announce
On Tuesday, 5 January 2016 at 17:41:41 UTC, burjui wrote: Cursor speed is pretty low, so you can't react quickly and in the 3rd round your base always looks like Swiss cheese. You can hold the turbo key (shift by default) to move it faster. Again, something I should probably explain in-game

Re: Damage Control: An homage to Rampart (Alpha)

2016-01-03 Thread rcorre via Digitalmars-d-announce
On Sunday, 3 January 2016 at 19:53:25 UTC, Ivan Kazmenko wrote: "If, at the end of a round, you have no territory, you are defeated." I'm almost sure this is currently not true for the last round: the "completed" message showed up for me instead of "defeated". Huh, I couldn't repro that.

Re: Damage Control: An homage to Rampart (Alpha)

2016-01-03 Thread rcorre via Digitalmars-d-announce
On Saturday, 2 January 2016 at 23:43:48 UTC, thedeemon wrote: On Thursday, 31 December 2015 at 16:43:53 UTC, rcorre wrote: It works fine for me on Win 8.1. But I have no idea what's going on in the game, gameplay is totally unknown to me. ;) I added some instructions on the readme:

Re: Damage Control: An homage to Rampart (Alpha)

2016-01-01 Thread rcorre via Digitalmars-d-announce
On Friday, 1 January 2016 at 13:15:02 UTC, MrSmith wrote: For me window is not shown. Windows 7 64bit. I see console and graphics windows in taskbar, but no actual window on the screen. Used release v0.2. Hmm, don't have a windows 7 machine, but maybe I can spin up a VM. Thanks for letting

Damage Control: An homage to Rampart (Alpha)

2015-12-31 Thread rcorre via Digitalmars-d-announce
"Damage Control" is a game inspired by one of my old favorite SNES games, Rampart (ok, technically an arcade game, but I had it on SNES). The project is on Github: https://github.com/rcorre/damage_control Its very incomplete, but if you don't mind spending a few minutes trying it out I'd

Re: Damage Control: An homage to Rampart (Alpha)

2015-12-31 Thread rcorre via Digitalmars-d-announce
On Thursday, 31 December 2015 at 17:16:32 UTC, Ivan Kazmenko wrote: The game flow is not obvious in multiple respects: 1. Shoot: why only six bullets? 2. Rebuild: huh, what's the plan? 3. If the base is not completely enclosed by walls after rebuild, the game ends, giving a ?!?!? impression.

SuperStruct v0.2.0

2015-11-24 Thread rcorre via Digitalmars-d-announce
For those that missed the first announcement (http://forum.dlang.org/thread/jiucsrcvkfdzwinqp...@forum.dlang.org?page=1), SuperStruct is a struct that acts like a class; basically, a value type that exposes a common interface from its 'subtypes'. Code on github:

Re: It's a class! It's a struct! It's ... SuperStruct!

2015-10-22 Thread rcorre via Digitalmars-d-announce
On Thursday, 22 October 2015 at 02:35:34 UTC, rcorre wrote: Come to think of it, SuperStruct actually sounds pretty similar to std.range.chooseAmong (which I just realized exists). It seems to work quite nicely as an alternative to choose that works with any types as opposed to just ranges:

Re: It's a class! It's a struct! It's ... SuperStruct!

2015-10-21 Thread rcorre via Digitalmars-d-announce
On Wednesday, 21 October 2015 at 23:09:52 UTC, Timon Gehr wrote: "A call signature for a given member is 'compatible' * if, for an instance of any one of `SubTypes`, that member can be called with * the provided set of arguments _and_ all such calls have a common return type." Probably

Re: It's a class! It's a struct! It's ... SuperStruct!

2015-10-19 Thread rcorre via Digitalmars-d-announce
On Sunday, 18 October 2015 at 21:26:55 UTC, rcorre wrote: And at the risk of going a little overboard, I think the answer to supporting arbitrary templated functions is to wrap visitor/project itself in a template, that then returns a variadic function while passing along other compile-time

Re: It's a class! It's a struct! It's ... SuperStruct!

2015-10-18 Thread rcorre via Digitalmars-d-announce
On Sunday, 18 October 2015 at 21:18:52 UTC, rcorre wrote: On Sunday, 18 October 2015 at 21:00:32 UTC, Meta wrote: On Sunday, 18 October 2015 at 19:00:16 UTC, rcorre wrote: You might find this interesting. It's an "outside-in" approach to the same problem as opposed to your "inside-out"

Re: It's a class! It's a struct! It's ... SuperStruct!

2015-10-18 Thread rcorre via Digitalmars-d-announce
On Sunday, 18 October 2015 at 21:00:32 UTC, Meta wrote: On Sunday, 18 October 2015 at 19:00:16 UTC, rcorre wrote: You might find this interesting. It's an "outside-in" approach to the same problem as opposed to your "inside-out" approach. Not finished, but the general idea is there.

It's a class! It's a struct! It's ... SuperStruct!

2015-10-18 Thread rcorre via Digitalmars-d-announce
SuperStruct is a struct that acts like a class: --- struct Square { float size; float area() { return size * size; } } struct Circle { float r; float area() { return r * r * PI; } } alias Shape = SuperStruct!(Square, Circle); // look! polymorphism! Shape sqr = Square(2); Shape cir =

Re: Vibemail - extensions for vibe's Mail class to send multi-part emails with attachments

2015-09-29 Thread rcorre via Digitalmars-d-announce
On Tuesday, 29 September 2015 at 16:22:43 UTC, Adam D. Ruppe wrote: characterencodings is only needed if you call one of the character conversion functions; it is a lazy local import inside a template. Neat! I knew local imports were useful for keeping symbols in a smaller scope, but

Re: Enumap -- a lightweight AA alternative when your keys are enums

2015-09-21 Thread rcorre via Digitalmars-d-announce
On Wednesday, 16 September 2015 at 03:20:28 UTC, SimonN wrote: Yes, the 0.4.x version works with my examples perfectly. Thanks for adding const support! (I haven't tested yet every combination of const/mutable Enumap, const/mutable foraech-value, and direct/ref foreach-value. My examples are

Re: Enumap -- a lightweight AA alternative when your keys are enums

2015-09-12 Thread rcorre via Digitalmars-d-announce
On Friday, 11 September 2015 at 03:25:58 UTC, SimonN wrote: It doesn't seem to matter whether I put const int, or int, in the foreach statement. What's the idiomatic way to loop over a const Enumap? :-) -- Simon I've released v0.4.0, which implements foreach with ref, and (hopefully)

Re: Enumap -- a lightweight AA alternative when your keys are enums

2015-09-11 Thread rcorre via Digitalmars-d-announce
On Friday, 11 September 2015 at 08:22:20 UTC, Kagamin wrote: On Friday, 11 September 2015 at 02:17:25 UTC, rcorre wrote: @nogc void donFancyHat(Enumap!(Attribute, int) map) { map.charisma += 1; } BTW, what this means? Isn't Enumap a value type? Correct, the parameter should be passed by ref

Re: Enumap -- a lightweight AA alternative when your keys are enums

2015-09-11 Thread rcorre via Digitalmars-d-announce
On Friday, 11 September 2015 at 04:30:31 UTC, SimonN wrote: Since I have been using "ref val" in the first loop, I expected the output to be instead: e1: 101 e2: 102 e3: 103 e1: 104 e2: 105 e3: 106 -- Simon Yep, as I was looking at the constness thing, I realized

Re: Enumap -- a lightweight AA alternative when your keys are enums

2015-09-10 Thread rcorre via Digitalmars-d-announce
On Friday, 11 September 2015 at 03:25:58 UTC, SimonN wrote: Hi, this looks excellent! I've been playing around with it, and am looking forward to using it regularly. I've ran into a compilation error when iterating over a const Enumap. In the following code: import std.stdio;

Enumap -- a lightweight AA alternative when your keys are enums

2015-09-10 Thread rcorre via Digitalmars-d-announce
I frequently find myself needing a data structure that maps each member of an enum to a value; something similar what Java calls an EnumMap (http://docs.oracle.com/javase/7/docs/api/java/util/EnumMap.html). I couldn't find any D implementation out there, so I wrote a little module for it.

Re: Article: More hidden treasure in the D standard library

2015-09-08 Thread rcorre via Digitalmars-d-announce
On Monday, 31 August 2015 at 16:09:02 UTC, Gary Willoughby wrote: I've written a new article on D here: http://nomad.so/2015/08/more-hidden-treasure-in-the-d-standard-library/ Hopefully to drive other programmers to investigate D. It's a continuation of a similar one I wrote a few months ago

Re: dtiled v0.2 - a library for tilemapped games

2015-06-24 Thread rcorre via Digitalmars-d-announce
On Wednesday, 24 June 2015 at 12:16:56 UTC, Suliman wrote: Is it's possible to use this lib for tiling jpg? I am planing to try to create online service that will load tiles depending on scale (zoom). Front and is js, but I think backend should be based on lib like this. Hmm... I'm not sure.

Re: dtiled v0.2 - a library for tilemapped games

2015-06-23 Thread rcorre via Digitalmars-d-announce
On Monday, 22 June 2015 at 11:05:28 UTC, Manu wrote: Hey cool. I haven't thought about tiled for years! I contributed the terrain painting system years ago ;) Nice to see a lib in D! Nice! I make use of Tiled's terrain tool regularly, its a huge time saver. I've considered adding some

dtiled v0.2 - a library for tilemapped games

2015-06-21 Thread rcorre via Digitalmars-d-announce
dtiled v0.2 is out, and for better or worse, it got hit by a serious case of feature creep. v0.1 was simply an easy way to load maps created with Tiled (http://mapeditor.org). v0.2 attempts to provide much of the functionality commonly needed by tilemapped games. I like to hack around on

Re: DerelictAllegro5

2015-06-14 Thread rcorre via Digitalmars-d-announce
On Sunday, 1 February 2015 at 12:32:46 UTC, Mike Parker wrote: I've finally dusted off and finished up the new Allegro 5 binding I started on over a year ago. SeigeLord already maintains a static binding at [1]. It has support for the WIP 5.1 branch of Allegro. DerelictAllegro5 is, like all

Re: Arch Linux D package update

2015-06-04 Thread rcorre via Digitalmars-d-announce
Awesome, thanks for all your work here! The DCD package is a nice addition.

DTiled: Tiled map loader

2015-05-02 Thread rcorre via Digitalmars-d-announce
Any D game developers out there looking to create a tile-based game? DTiled aims to provide a quick and easy way to load maps created with Tiled (http://www.mapeditor.org). For those that don't know, Tiled is an open-source 2D tilemap editor that is a great tool for indie developers. At the

Re: DTiled: Tiled map loader

2015-05-02 Thread rcorre via Digitalmars-d-announce
hmm ... apparently copy-pasting out of a vim buffer was not a good idea. Sorry about the weird line breaks.