The shoutbox is currently out of service. Join us on Discord instead.
You can help CodeWalrus stay online by donating here.

Piworld

Started by 岩倉 澪, January 28, 2015, 08:43:25 am

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

岩倉 澪

That tile is already scaled up to 4K

DJ Omnimaga

February 27, 2015, 03:38:20 am #91 Last Edit: February 27, 2015, 03:41:31 am by DJ Omnimaga
Oh I didn't realize, because pixels seemed doubled in size. I was imagining something like this:


岩倉 澪

ahh I see what you are saying now. The actual textured models should look like that at 4K /hopefully/.

CKH4

I can do 4k testing if you need.


DJ Omnimaga

On a side note, do you still plan to add some depth shading or fog effect so that farther stuff looks darker? It was pretty cool in previous mockups.

岩倉 澪

I liked how that looked as well, so probably, but it isn't important for actual gameplay so I won't be implementing it or worrying about it for quite a while

DJ Omnimaga

Aah ok, I was just curious anyway ;)

岩倉 澪

Took a break from graphics study to get caught up on handmade hero. I'm caught up now, and pushed a new module today:
https://github.com/miotatsu/piworld/blob/master/platform/cassert.d

DJ Omnimaga

What do you mean by handmade hero? Do you mean the hero will be drawn by hand then pre-rendered? Also what does this new module do? I'm not very familiar with that language.

岩倉 澪

handmadehero.org

The new module provides a function called "cassert."
assert is a special function in D that lets you crash the program in debug builds if there is an unrecoverable error and print an error message to the standard error stream, like the assert macros in C/C++. However, Often I want to print an error that is a C string, because I interface with C libraries like SDL, but I also want to avoid the garbage collector.

For example, with assert, I can't do this:

auto window = SDL_CreateWindow("An SDL2 window", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, width, height, SDL_WINDOW_OPENGL);
assert(window, SDL_GetError()); //doesn't work because SDL_GetError returns a C string and assert takes a D string

Normally you would just convert the C string to a D string, but that would require a dynamic memory allocation.
The easy way to do that would be to just call std.conv.to!string, but that uses garbage collected memory, which isn't acceptable.
You could write yourown string conversion routine that malloc's unmanaged memory, but I found it simpler to just write my own assert function that takes a c string!

Now I can write an assertion like this:

cassert(window, SDL_GetError());

and if the window was failed to be created I'll get an error message like:

[email protected]/walrus.d(42): Failed to create window because you lost the game
[email protected]/cassert.d(18): Assertion failure


DJ Omnimaga

Oh right, I remember seeing that page before (I like the parallax scrolling site background :P)

And thanks for the explanation :)

岩倉 澪

The hotswap module now uses the SDL2 shared object API
https://github.com/miotatsu/piworld/commit/94a3d0a846a310710ceac1a7a90af0184e361ace
This makes it much closer to supporting cross-platform debug builds of the game :)

Piworld also has a placeholder github pages site now.
https://miotatsu.github.io/piworld/

DJ Omnimaga

Awesome to hear about the cross-platform part :D

岩倉 澪

Just to give another update, progress has slowed as I'm working my way through the arcsynthesis opengl tutorial/book, got a job (!), and took another small break to help write an updater on linux for a friend's game: https://gist.github.com/miotatsu/8ce61942603aa8194cf9

DJ Omnimaga

Congrats on the job :D. Good luck on the learning of stuff. I hope you can eventually work on this again, though. I would hate to see this die again lol due to other projects or other things :P

Powered by EzPortal