Replies: 5 comments 5 replies
-
|
Let's be real, maybe rewriting Box2D is not a good idea right now. It still gets updated and I'm not the best person to maintain a physics library :) |
Beta Was this translation helpful? Give feedback.
-
|
There is now a auto color = cyan;
auto state = SmoothToggle();
bool update(float dt) {
if ('q'.isPressed) state.toggle();
auto value = smoothstep(-resolutionHeight, resolutionHeight, state.update(dt));
if (state.isAtEnd) {
state.toggleSnap();
color.r = cast(ubyte) (randi % 255);
color.g = cast(ubyte) (randi % 255);
color.b = cast(ubyte) (randi % 255);
};
drawRect(Rect(0, value, resolution), color);
return false;
}untitled.mp4 |
Beta Was this translation helpful? Give feedback.
-
|
Added the frame allocator. Needs testing tho. void* frameMalloc(Sz size, Sz alignment);
void* frameRealloc(void* ptr, Sz oldSize, Sz newSize, Sz alignment);
T* frameMakeBlank(T)();
T* frameMake(T)(const(T) value = T.init);
T[] frameMakeSliceBlank(T)(Sz length);
T[] frameMakeSlice(T)(Sz length, const(T) value = T.init); |
Beta Was this translation helpful? Give feedback.
-
|
Not really part of the ideas, but added this for the basic drawing functions. Mostly a "I use Parin as a canvas" type of thing. alias draw = drawRect;
alias draw = drawHollowRect;
alias draw = drawCirc;
alias draw = drawHollowCirc;
alias draw = drawVec2;
alias draw = drawLine;
alias draw = drawTexture;
alias draw = drawTextureArea;
alias draw = drawTextureSlice;
alias draw = drawRune;
alias draw = drawText;
alias draw = drawViewport;
alias draw = drawViewportArea; |
Beta Was this translation helpful? Give feedback.
-
|
We have printing at home: consoleeeeee.mp4You can also call |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Things that I might work on and would be nice to have:
updatereturns.Support for LDTk tile maps.No.Rewrite Box2D in D and add support for cool things just like microui-d.Bindings for another day.Beta Was this translation helpful? Give feedback.
All reactions