Join us on Discord!
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 1 Guest are viewing this topic.

岩倉 澪

That tile is already scaled up to 4K

Dream of Omnimaga

#91
Oh I didn't realize, because pixels seemed doubled in size. I was imagining something like this:

  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

岩倉 澪

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.
  • Calculators owned: TI-83+, TI-84+


Dream of 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.
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

岩倉 澪

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

Dream of Omnimaga

Aah ok, I was just curious anyway ;)
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

岩倉 澪

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

Dream of 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.
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

岩倉 澪

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:

platform.cassert@platform/walrus.d(42): Failed to create window because you lost the game
core.exception.AssertError@platform/cassert.d(18): Assertion failure


Dream of Omnimaga

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

And thanks for the explanation :)
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

岩倉 澪

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/

Dream of Omnimaga

Awesome to hear about the cross-platform part :D
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

岩倉 澪

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

Dream of 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
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

Powered by EzPortal