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.

aeTIos

This is coming along very good, I look forward to playing this :D
ceci n'est pas une signature

岩倉 澪

Thanks :)

Some exciting technical developments with the code base tonight!
The project is now managed by dub (d build system and package manager) https://github.com/miotatsu/piworld/blob/master/dub.json
This makes it much easier for me to build the project, and manage dependencies like SDL2 and OpenGL.
Furthermore, I decided to rely on this for the dll rebuilding, which allowed me to make some major simplifications to the hotswapping module
https://github.com/miotatsu/piworld/blob/master/platform/hotswap.d
It now no longer depends on phobos, and avoids both garbage collection and exceptions

DJ Omnimaga

Since you use SDL2, if your game ends up not being too CPU/GPU intensive, maybe somebody could port it to the Nspire calculator later, since Ndless supports nSDL. Not sure how different SDL2 is from SDL, though.

Also, now that you mention dll, will this game require some dependencies when we download it? Back then it was very common to download a game on our computer, only to be greeted with missing dll/ocx error messages.

岩倉 澪

Well, SDL2 is going to be used for things like providing the window, event handling, audio, etc, but because the rendering system will be directly in OpenGL, I assume it wouldn't be trivial to port to an Nspire. That said, I never did any calc dev for the Nspire myself, so someone more knowledeable in that area would be better to ask. I'm well aware though of how far people have pushed calcs for gaming, and I don't have any features in mind as of now that a calculator wouldn't be able to handle. I'm guessing if a port was made the only things that would need to change would be to redo the input system for a calc, the renderer, and possibly reduce content depending on how much memory the final game ends up using.

As of right now, the only external dependencies that will be needed for the final release builds will be SDL2 and OpenGL, but that could change during the course of development depending on what is needed. Releases on Windows and OSX will come with the necessary dlls. The dll that I rebuild is the actual game being built as a dll and loaded by the platform layer dynamically, so that I can edit the code and see it change in the game in real-time, which is just a development feature. The final game will most likely just be built as one executable

DJ Omnimaga

Oh right, I thought it was gonna be used for the entire game or at least rendering graphics. I guess a TI-Nspire port is out of the question then. :P

I don't think any OpenGL is available for it, although a 3D engine called nGL is (and is used in Crafti): http://www.ticalc.org/archives/files/fileinfo/460/46054.html

That's unless of course the entire game is 2D-like and lacks any advanced graphics, but then of course someone else would need to port it still. :P

Anyway I can't wait for new progress on the game. :)

岩倉 澪

Tonight I studied the graphics pipeline, added the SDL2 and OpenGL dependencies to the platform layer, and wrote usage code for creating a window with an opengl context. https://github.com/miotatsu/piworld/commit/9412ba742f0bc07c5c3089bf67a297bcf8fca630

岩倉 澪

Today I studied OpenGL and GLSL enough to get a white triangle on the screen :)


I'm still unsure if I should render with 2D sprites or with 3D models and textures.

DJ Omnimaga

2D would be fine I think, unless you want more emphasis on platforming. Just texture those triangles :P

Snektron

Quote from: 岩倉 澪 on February 20, 2015, 12:11:41 am
Today I studied OpenGL and GLSL enough to get a white triangle on the screen :)


I'm still unsure if I should render with 2D sprites or with 3D models and textures.

But wait, did u c that? Loomy nati confirmed :p

But is this with a pre-written pipeline like lwjgl or more like opengl es 2 where you have to write
almost everything yourself? (forgive me for only knowing java opengl :P)
Legends say if you spam more than DJ Omnimaga, you will become a walrus...


岩倉 澪

The code for that triangle: https://gist.github.com/miotatsu/2635d2b36f3ae1a38e3a

I'm currently learning about uniforms :)

DJ Omnimaga

For for such triangle, on the HP Prime the code would just be 1 line long O.O

FILLPOLY_P([(160,60),(40,180),(280,180)], #FF, 128);

Or something like that :P

岩倉 澪

I've re-sorted the imgur album so that it is newest first: https://imgur.com/a/vhR3T

The reason why I am thinking I might want to use 3D models is because then I would have the option of changing perspective for things like cutscenes, and in order to get the perspective right for the artwork I will probably be doing 3D model mockups at least anyway. I'm also trying to figure out how to handle screen res. SDL2s rendering system is what I've had in mind, it lets you target a certain logical resolution and then it can automatically scale it appropriately. I'd have to implement that sort of thing myself, although maybe it would be possible to have the graphics be resolution independent...

DJ Omnimaga

Oh you plan cutscenes too? That would be nice. Or at least if you did like in Zelda: Occarina of time and changed the camera position before instigating a convo. I am fine if it's 2D or 3D although I worried that 3D would be considerably harder especially if it's your first large-scale 3D project. It would give you much more freedom, though. For example, the platform lightning issue would no longer be a problem, as platforms of the same color that are farther and lower would look smaller, plus you could allow the player to rotate the camera to reveal hidden paths and stuff. You could still use 2D scaled sprites for most other things like Super Mario 64's 2D trees.

岩倉 澪

Yeah I definitely want to at least try 3D, if it works out it would be really nice to have those sort of options available. I think just using OpenGL directly already introduces a lot of the complexity that 3D brings, so I don't think it will be a ton harder than 2D. Also a small update: I just learned how to vsync with SDL_GL_SetSwapInterval :)

Snektron

February 22, 2015, 05:57:31 pm #59 Last Edit: February 22, 2015, 06:01:06 pm by Cumred_Snektron
Quote from: 岩倉 澪 on February 20, 2015, 11:34:47 pm
The code for that triangle: https://gist.github.com/miotatsu/2635d2b36f3ae1a38e3a

I'm currently learning about uniforms :)


Yeah that's about the same amount of code GLES20 (OpenGL ES 2.0) needs on android for a basic triangle :P
(Not that premade stuff of GLES10, you can't even run shaders with that >.<). Also android doesn't even have an SDL equivalent, you have to write your own time-indepentend update loop (which i recommend doing btw). LWJGL does have the 'Display' class though, which handles everything screen related :)

Quote from: DJ Omnimaga on February 21, 2015, 12:29:45 am
For for such triangle, on the HP Prime the code would just be 1 line long O.O

FILLPOLY_P([(160,60),(40,180),(280,180)], #FF, 128);

Or something like that :P


Yes but the HPP doen't have a GPU right? So it would be a 'simple' algorithm instead of having to communicate with some external hardware :P
Legends say if you spam more than DJ Omnimaga, you will become a walrus...


Powered by EzPortal