CodeWalrus

Development => PC, Mac & Vintage Computers => Topic started by: 岩倉 澪 on January 28, 2015, 08:43:25 AM

Title: Piworld
Post by: 岩倉 澪 on January 28, 2015, 08:43:25 AM
Handmade Hero has inspired me to take another shot at this old project.
Piworld was my first project, and it was largly thanks to the calc community that I became a programmer.
My interest in calculators faded as PC programming captured my attention, but my dream for piworld was far beyond what I could accomplish back then. I moved on to other things, but I think it is finally time to make that dream from my youth a reality.

My vision for this game is an isometric/2.5d adventure game in the spirit of Legend of Zelda. The plot that I wrote for piworld 1 and 2 probably will not be incorporated directly, but it will influence the thematic elements of the game. I'll be working on design and storyline during the development of the game, rather than planning everything before production.
I don't want to spoil too much, but I will say that I've got designs on paper of a brand new protagonist and the final game is likely not going to be called piworld (consider it a codename).

github repo: https://github.com/miotatsu/piworld (https://github.com/miotatsu/piworld)
imgur album: https://imgur.com/a/vhR3T (https://imgur.com/a/vhR3T)

I'll post updates as they come. :)

===Progress Log===
Title: Re: Piworld
Post by: Snektron on January 28, 2015, 12:06:42 PM
Sounds interesting :) on what platforms will it be released?
edit: 200th post! wow much spam
Title: Re: Piworld
Post by: 岩倉 澪 on January 28, 2015, 01:02:43 PM
Linux, Windows, and OSX at least, and it will be open source
Title: Re: Piworld
Post by: T.Wang on January 28, 2015, 10:09:31 PM
Good luck with your project :) Looking forward to seeing it
Title: Re: Piworld
Post by: Dream of Omnimaga on January 29, 2015, 04:02:34 AM
Something like Super Mario RPG, Solstice, Equinox or Landstalker would definitively be nice, although more Zelda style. Do you plan to make it look old school like those games?

Also I remember the original Piworld for calcs. I wouldn't be surprised if there was still a copy floating around somwewhere on my hard drive. :)
Title: Re: Piworld
Post by: 岩倉 澪 on January 29, 2015, 06:58:07 PM
Right now I am envisoning a more modern art style, but that is still up in the air since it is in such early stages. I'll keep the idea of a retro look in mind now :)

haha, nice! The original piworld is the game that really started it all for me. I don't have much left my self, though I do have a couple pages of code printouts, it is fun to look back on and see all the mico-optimizations that were necessary
Title: Re: Piworld
Post by: Dream of Omnimaga on January 29, 2015, 08:16:55 PM
Yah TI-BASIC definitively required a lot of optimizing. At least in ASM on color platforms you could circumvent speed issues by updating as few parts of the screen as possible or by using hardware scrolling, but in TI-BASIC even just moving 1 character around was slow.
Title: Re: Piworld
Post by: 岩倉 澪 on January 29, 2015, 09:56:08 PM
There is now a progress log in the first post, strikethrough = finished, green = in progress, red = not started

(http://i.imgur.com/jNaIBpW.png)
Title: Re: Piworld
Post by: 岩倉 澪 on February 01, 2015, 12:17:56 AM
piworld now has a github repository, and I've commited a module for hotswapping
https://github.com/miotatsu/piworld/blob/master/source/platform/hotswap.d (https://github.com/miotatsu/piworld/blob/master/source/platform/hotswap.d)
Title: Re: Piworld
Post by: Dream of Omnimaga on February 01, 2015, 12:58:16 AM
Ooh thise hexagonal tiles. I made some back then IIRC. glad you're going with that style again :)

Keep us updated about updates ;)
Title: Re: Piworld
Post by: 岩倉 澪 on February 01, 2015, 02:01:21 AM
Yeah! I'll be working more on mocking up artwork once the game has more of a platform layer in place, just threw that hexagon together in blender quick (well, not really quick because first time I've used blender haha) to confirm that the math I did on paper was right and to experiment with viewing angles

Will do!
Title: Re: Piworld
Post by: Dream of Omnimaga on February 01, 2015, 06:03:55 AM
Will the graphics be 2D or will you use 3D with textures in the final game? If you use 2D then perhaps if you got tile-based sprites you could modify some of them  so they are in hexagonal form.
Title: Re: Piworld
Post by: aetios on February 02, 2015, 02:49:19 PM
Ooh I remember seeing this project on Omni when it was still a calc thing. Cool to see it back :D
Title: Re: Piworld
Post by: Dream of Omnimaga on February 02, 2015, 04:56:47 PM
Quote from: aeTIos on February 02, 2015, 02:49:19 PM
Ooh I remember seeing this project on Omni when it was still a calc thing. Cool to see it back :D
Actually back then it was already for PC too. Both versions were worked on side by side. That reminds me, if this game isn't too demanding on resources and is 2D, maybe a color calculator spinoff could be made?
Title: Re: Piworld
Post by: 岩倉 澪 on February 02, 2015, 06:23:51 PM
I'm planning on 2D graphics that sort of fake 3D with a fixed perspective, but I'll go full 3D if I find it necessary. I would love to see calc spinoffs made, but won't be doing any myself.

Currently writing usage code for the hotswapping module. I realized that my current functions won't work well in practice because I'll need to support compiling many different files, should have written the usage code first!
Title: Re: Piworld
Post by: Duke "Tape" Eiyeron on February 02, 2015, 07:11:28 PM
I suggest you to use multi-layer maps if so, to have tiles which will be over the sprites. (For instance the roofs in Pokémon since gen3 are over the character to allow it to go behind the building)
Title: Re: Piworld
Post by: Dream of Omnimaga on February 03, 2015, 01:09:43 AM
Multiple layers would definitively be nice, providing it won't slow things down too much. It would allow for much more complex maps. (although it's possible to mimic multi-layer maps with just 1 layer, but it won't give as much freedom and sometimes it might look weird when the character walks behind a wall and disappears instantly rather than gradually disappearing.
Title: Re: Piworld
Post by: aetios on February 03, 2015, 07:01:48 AM
DJ as this is a PC project you don't really need worry about slowdowns when multi-layering :P Your window manager does it all the time when you have overlapping windows ;)
Title: Re: Piworld
Post by: 岩倉 澪 on February 04, 2015, 01:33:56 AM
Yes there will be multi-layering :P

As for progress updates: the hotswap module rewrite is going well and I'll be pushing it to the github repo in the next day or two hopefully, I just implemented handling for the case where an object file fails to build, it will wait for the next change rather than spamming rebuild lol
Title: Re: Piworld
Post by: Dream of Omnimaga on February 04, 2015, 01:48:24 AM
Cool to hear. I really can't wait to see some eye candy in the near future, but I understand that this can be a lot of work, especially that not only you need to code, but you also need to make graphics >.<
Title: Re: Piworld
Post by: 岩倉 澪 on February 05, 2015, 06:33:01 PM
Finished my hotswap module rewrite today https://github.com/miotatsu/piworld/blob/master/source/platform/hotswap.d (https://github.com/miotatsu/piworld/blob/master/source/platform/hotswap.d)
next up will be a minimal pass on a platform layer and experimenting with/mocking graphic style

I'll be sure to post "eye candy," as I have it, though initial mockups won't be very pretty or representitive of what the final game ends up looking like :P
Title: Re: Piworld
Post by: Dream of Omnimaga on February 05, 2015, 06:38:52 PM
Cool to hear Tatsu :D, I am truly curious about how it will look like, even before you add the real graphics in. Do you plan to make a video?


EDIT: 5000th forum post! :D (not much I know but it's the fastest start on any calc forum I founded, although things have slowed down lately)
Title: Re: Piworld
Post by: 岩倉 澪 on February 05, 2015, 06:44:43 PM
Eventually I will make videos when video would appropriately show off features (I'd love to make one to show off hotswapping, but it would be a lot more fun to wait until a platform layer is in place for that - hotswapping functions that do stuff like write to a terminal isn't nearly as cool looking ;))

For a while you can probably expect only notebook sketches, mockup images, and rough placeholders in-game

congrats on 5K, DJ :P
Title: Re: Piworld
Post by: Dream of Omnimaga on February 05, 2015, 06:47:49 PM
I was more wondering about when you implement scrolling and the like, to see how smooth it will run, but I am fine if you wait until you have some more stuff going on :)
Title: Re: Piworld
Post by: 岩倉 澪 on February 07, 2015, 03:58:03 AM
pushed bugfixes to the hotswap module today: https://github.com/miotatsu/piworld/commit/abe13ac48d93bb66d433e874c85d5f7a8f79f741

Scrolling will be smooth (sub-pixel), and I'll be shooting for the game to run at 60fps. I'm not sure yet if I want to use a fixed time step for game logic & variable rendering with interpolation or if I should just shoot for a full fixed 60 and drop to 30 if it can't keep up like handmade hero.
Title: Re: Piworld
Post by: Dream of Omnimaga on February 07, 2015, 12:31:36 PM
I am ok with different frame rate as long as gameplay speed won't vary based on computwr performance like Visual Basic games. :P

Maybe make 60 fps an optional maximum for people who want to save on power?
Title: Re: Piworld
Post by: 岩倉 澪 on February 10, 2015, 02:57:22 AM
I'll probably give the player the option to toggle vsync, not so sure about letting them control framerate with vsync off though.

Mocked up a tile today and played around with it a bit, I am going to need to do some depth based shading, otherwise different heights blend together

(http://i.imgur.com/CvMeGkb.png)
Title: Re: Piworld
Post by: Dream of Omnimaga on February 10, 2015, 03:03:23 AM
For some reasons, all those squares and the graphical style reminded me a bit of Kirby's Dream Course (or Kirby Bowl in Japan) :P

Looks nice, though :). Could use some depth shading indeed so we can distinguish each platform from the others when lower/higher.
Title: Re: Piworld
Post by: Snektron on February 10, 2015, 08:22:53 AM
It looks a bit like Kenney (from opengameart)'s art.
Title: Re: Piworld
Post by: Duke "Tape" Eiyeron on February 10, 2015, 08:29:36 AM
'Asset Jesus', you meant! Yeah I had the same feeling too. THat's funny to see that it's a good inspiration source!
Title: Re: Piworld
Post by: 岩倉 澪 on February 11, 2015, 01:34:35 AM
Never heard of Kenney, but I assume that's a complement  ;)

Here is a new mockup with some shadows to help with the depth problem
(http://i.imgur.com/3Or2vT5.png)
Title: Re: Piworld
Post by: Dream of Omnimaga on February 11, 2015, 01:40:30 AM
That looks even cooler. I had ideas in mind for shading and contemplated making a mockup of the previous image myself but this looks even better. :)
Title: Re: Piworld
Post by: Duke "Tape" Eiyeron on February 11, 2015, 08:52:08 AM
I had once done a small block voxel renderer. to discern the layers, I set a shadow relative to the height of the block. It was fun to see. But I prefer your method. It's darker as it's more distant of the camera, isn't it?
Title: Re: Piworld
Post by: 岩倉 澪 on February 12, 2015, 06:39:59 AM
shadows are cast down onto tiles adjacent but below a higher tile, darker further from camera, but it isn't a perfect solution:
(http://i.imgur.com/GykSqSf.png)

I'll be trying to work out a better solution tonight - I'm hoping casting a larger shadow based on how high up a tile is might be sufficient, but we'll see...

edit: after a night of consideration, I settled on a different method:
(http://i.imgur.com/k1ghxQ7.png)

From my experiments, it seems too easy for lighting to introduce ambiguity, and is better left to serve only as an artistic effect.
Depth can be rendered unambiguous much easier by drawing a few borders. My first thought regarding this method was to use an edge detection filter, but upon further investigation I realized that would not suffice, as the areas I am concerned about blend together and thus there is no edge for it to detect. Furthermore, it would pick up unwanted edges within the art itself. I will work out the details on how to calculate the border edges for another night
Title: Re: Piworld
Post by: Dream of Omnimaga on February 12, 2015, 06:59:42 PM
Actually I like the border idea, although maybe they should be lighter so that they blend better with the rest? Also how would it look like if you still kept the shading even with the borders?

(https://img.ourl.ca/piworld.png)
Title: Re: Piworld
Post by: 岩倉 澪 on February 13, 2015, 01:12:21 PM
Yeah that looks nice! I'm not going to worry about lighting until much later though as it will only be an aesthetic concern. My next concern will be getting something up and running as far as a platform layer goes that can display these kinds of graphics.

I've used SDL for ~5 years, and have recently used SFML as well. SFML is nice from a high-level perspective and has the benefit of shader support, but SDL2 has scancodes, is cleaner and better thought out for low-level tasks, and is written in C. As such, SDL seems like the clear way to go, but I am anticipating a need for shaders, so I think I will want to use OpenGL for rendering. I've never worked directly with OpenGL & GLSL before, so I have some studying to do :)
Right now I'm thinking my dependencies will be derelict-sdl2, derelict-gl3, and possibly gl3n (an opengl math library for D I found in the dub repos)
Title: Re: Piworld
Post by: Dream of Omnimaga on February 14, 2015, 04:05:32 PM
By the way, will we be able to jump like in Mario RPG? One concern I have if you do that is since there's no 3D perspective then we might not know if a platform is just in front and very high or if it's next to the character. IIRC Mario RPG often pulled suck trick on the player, but it's something to keep in mind when designing maps and puzzles.
Title: Re: Piworld
Post by: 岩倉 澪 on February 14, 2015, 06:42:00 PM
The player will be able to jump

Hmm, I hadn't thought of that but it is a good point! I can think of a few potential ways to solve that
One would be to use shadows, but that would maybe limit the use of lighting for aesthetic purposes
(http://i.imgur.com/ZC23lXb.png)

Other options would be avoiding floating platforms altogether, or to make them artistically distinct from normal tiles in some way. I'm not sure if the game will have them yet
Title: Re: Piworld
Post by: Duke "Tape" Eiyeron on February 14, 2015, 07:58:18 PM
Maybe making them bob a little, like two-three pixels...
Title: Re: Piworld
Post by: 岩倉 澪 on February 14, 2015, 08:16:07 PM
That's one of the ideas I had in mind as well, another one would be to have a tile/s under the platform that gives it a "floating island" kind of look. Those ideas could be combined as well of course
Title: Re: Piworld
Post by: Dream of Omnimaga on February 14, 2015, 11:29:42 PM
I like the shadow idea. To ensure there won't be misleading platform edges, you could do like Kirby Dream Course and design the maps so higher platforms are never in front of lower ones.
Title: Re: Piworld
Post by: 岩倉 澪 on February 15, 2015, 05:16:15 AM
ahh, I see what you are saying. I'll definitely avoid that
Title: Re: Piworld
Post by: Duke "Tape" Eiyeron on February 15, 2015, 01:29:17 PM
Laybe change the lower part to make it look like a flaoting island?
Title: Re: Piworld
Post by: 岩倉 澪 on February 16, 2015, 12:26:00 AM
adding additional tiles below the platform to make it look like a floating island would increase the height of the first platform necessary for the problem to occur, but it wouldn't solve it

(http://i.imgur.com/s3oWALc.png)


I gathered up all the old piworld stuff I could find today and made a big imgur album: https://imgur.com/a/vhR3T
Title: Re: Piworld
Post by: Dream of Omnimaga on February 16, 2015, 02:11:05 AM
Nice to look through those old images again :D
Title: Re: Piworld
Post by: aetios on February 16, 2015, 02:24:39 PM
This is coming along very good, I look forward to playing this :D
Title: Re: Piworld
Post by: 岩倉 澪 on February 17, 2015, 09:01:57 AM
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
Title: Re: Piworld
Post by: Dream of Omnimaga on February 17, 2015, 03:29:37 PM
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.
Title: Re: Piworld
Post by: 岩倉 澪 on February 17, 2015, 09:11:40 PM
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
Title: Re: Piworld
Post by: Dream of Omnimaga on February 18, 2015, 07:04:18 AM
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. :)
Title: Re: Piworld
Post by: 岩倉 澪 on February 18, 2015, 11:35:34 AM
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
Title: Re: Piworld
Post by: 岩倉 澪 on February 20, 2015, 12:11:41 AM
Today I studied OpenGL and GLSL enough to get a white triangle on the screen :)
(http://i.imgur.com/jiwUILQ.png)

I'm still unsure if I should render with 2D sprites or with 3D models and textures.
Title: Re: Piworld
Post by: Dream of Omnimaga on February 20, 2015, 12:21:49 AM
2D would be fine I think, unless you want more emphasis on platforming. Just texture those triangles :P
Title: Re: Piworld
Post by: Snektron on February 20, 2015, 08:55:34 AM
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 :)
(http://i.imgur.com/jiwUILQ.png)

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)
Title: Re: Piworld
Post by: 岩倉 澪 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 :)
Title: Re: Piworld
Post by: Dream of 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
Title: Re: Piworld
Post by: 岩倉 澪 on February 21, 2015, 03:08:17 AM
I've re-sorted the imgur album so that it is newest first: https://imgur.com/a/vhR3T (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...
Title: Re: Piworld
Post by: Dream of Omnimaga on February 21, 2015, 06:32:20 AM
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.
Title: Re: Piworld
Post by: 岩倉 澪 on February 21, 2015, 11:13:09 PM
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 :)
Title: Re: Piworld
Post by: Snektron on February 22, 2015, 05:57:31 PM
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
Title: Re: Piworld
Post by: Dream of Omnimaga on February 23, 2015, 03:42:05 AM
The HP Prime doesn't have a GPU, but there are rumors that it has 2D hardware acceleration. It's a 400 MHz calc with about 32 MB of RAM, though.


Also Miotatsu good luck :D
Title: Re: Piworld
Post by: Duke "Tape" Eiyeron on February 23, 2015, 05:12:22 PM
Yah, Prizm were once the subject of research about 2d accelerating chip somewhere, but this seemed to been dropped some weeks after. Let's hope that the Prime have some graphical chips to raise up to eleven its graphical epicness. (Mooode 7! :3)
Title: Re: Piworld
Post by: Dream of Omnimaga on February 23, 2015, 05:41:41 PM
Mode 7 would need ASM/C IMHO. People simulated some rudimentary mode-7 like stuff before and at full resolution they got about 25 FPS even with no rotation. I think proper mode 7 would have serious speed issues in HP PPL unless you used the polygon command to draw the maps or something (which would only allow 1 color)
Title: Re: Piworld
Post by: Duke "Tape" Eiyeron on February 23, 2015, 05:46:23 PM
Hmmm. On ASM/C it would be quite fast. Just check how fast we got it running on Prizm (~15FPS it seems). That would be a great tool to have in future games.
Title: Re: Piworld
Post by: TheMachine02 on February 23, 2015, 06:09:42 PM
Seing the chip there is inside, it does seems that there is a 2D accelerator, however it is only true for the dev version   <_< Idk wich chip is in the commercial version.
This accelerator allow fast pixel/line drawing, as well as per-pixel logic .... but I guess it is mainly accessible from asm... ASM guru anyone ?  :P
Title: Re: Piworld
Post by: Snektron on February 23, 2015, 06:16:01 PM
I only do some Z80, but im guessing it would be some kind of 'out' equivalent (communicates with hardware devices).
Title: Re: Piworld
Post by: Dream of Omnimaga on February 23, 2015, 06:36:34 PM
Quote from: TheMachine02 on February 23, 2015, 06:09:42 PM
Seing the chip there is inside, it does seems that there is a 2D accelerator, however it is only true for the dev version   <_< Idk wich chip is in the commercial version.
This accelerator allow fast pixel/line drawing, as well as per-pixel logic .... but I guess it is mainly accessible from asm... ASM guru anyone ?  :P
Do you mean the HP Prime? I am curious if Critor and others ever checked the internals of a commercial release to see if it might have 2D acceleration. All I know is that pixel/line/shape drawing is incredibly fast.


That said, if Piworld ever requires a quad core with 8 GB of RAM and a GPU with 512 TB of VRAM, then forget about anyone porting it to the HP Prime, let alone another calc model or smartphone. :P
Title: Re: Piworld
Post by: 岩倉 澪 on February 23, 2015, 09:10:23 PM
As for progress: I'm getting the hang of how textures work in OpenGL, and have succesfully rendered a tile (without alpha though)

https://imgur.com/cL4Hpsm (https://imgur.com/cL4Hpsm)
https://gist.github.com/miotatsu/177ec5ec06a9b830cfe7 (https://gist.github.com/miotatsu/177ec5ec06a9b830cfe7)
Title: Re: Piworld
Post by: Dream of Omnimaga on February 23, 2015, 11:12:34 PM
Looks good. Is that the full size or was the image scaled down?
Title: Re: Piworld
Post by: 岩倉 澪 on February 24, 2015, 05:38:14 AM
scaled down, the sprite is 124x80, intended to be displayed on a 1920x1080 screen res, but that screen is 960x540

here is the sprite displayed with the logical screen size matching the actual screen size so that the image doesn't get scaled:
(http://i.imgur.com/LJCvXc9.png)
Title: Re: Piworld
Post by: Dream of Omnimaga on February 24, 2015, 05:46:34 AM
Aaah I see now. This renders quite well actually so far. I wonder how it will look like at 4K resolution?
Title: Re: Piworld
Post by: 岩倉 澪 on February 24, 2015, 06:47:07 AM
easy to test,
4K w/ linear interpolation:
(http://i.imgur.com/8iVlrET.png)
4K w/ nearest neighbor:
(http://i.imgur.com/xFAVv3t.png)
Title: Re: Piworld
Post by: Dream of Omnimaga on February 24, 2015, 07:07:43 AM
Aah I see now. I was unsure if it was some sort of vectorial or something. How does it look like in both cases if you put multiple blocks next to each others to form a floor, along with some stairs?
Title: Re: Piworld
Post by: Snektron on February 24, 2015, 07:23:47 AM
I've always liked nearest neighbor more than linear interpollation though
Title: Re: Piworld
Post by: 岩倉 澪 on February 24, 2015, 07:28:22 AM
Quote from: DJ Omnimaga on February 24, 2015, 07:07:43 AM
Aah I see now. I was unsure if it was some sort of vectorial or something. How does it look like in both cases if you put multiple blocks next to each others to form a floor, along with some stairs?
Can't test that easily quite yet because of the alpha and the way I'm placing the tile right now is pretty primitive so it isn't easy to just plop in more tiles. It isn't vectorial, but the actual game tiles will be textured models (or I should say I want to experiment with that at least) whereas this is just the tile I made in gimp as a single texture being drawn over two triangles (2D style rendering)

Quote from: Cumred_Snektron on February 24, 2015, 07:23:47 AM
I've always liked nearest neighbor more than linear interpollation though
Yeah I'm liking the nearest neighbor as well
Title: Re: Piworld
Post by: Dream of Omnimaga on February 24, 2015, 07:38:52 AM
Aah I see now. I'm getting more curious with the time about how this will end up looking like really. Also have you gotten any ideas in mind for a playable character? I hope Piworld comes to fruition one day because it looks like it could be a very nice game with unique style. Just don't use those 2009 sprites that had the weird outline around them O.O (the regular 2D pixelated ones would be fine, though, if you go for a Star Ocean PS1/PSP style.
Title: Re: Piworld
Post by: 岩倉 澪 on February 24, 2015, 08:30:49 AM
I do have a sketch of a brand new protagonist character in my notebook along with notes on the players height, I used the sketch of the character for scale when designing how thick the tiles should be. I haven't done any more work on the character other than that yet, but I do have an idea in my mind of what I want it to look like.

For a rough idea, think of the later pokemon games
(http://fc05.deviantart.net/fs70/f/2010/261/b/d/bw_white_sprites_by_liliebiehlina3siste-d2yykav.png)
Title: Re: Piworld
Post by: Dream of Omnimaga on February 24, 2015, 05:13:46 PM
Ooh those would look nice actually. The style would fit well. Otherwise another idea could be to use Charas Project and create RPG Maker VX or XP characters, but rip them for use in your game instead of an RPG Maker project :P (you wouldn't even need RPG Maker installed for that)

I think RPG Maker XP/VX chars are about 32x48 and 32x32 maximum, respectively, depending of their armors and stuff (some chars might be 24 pixels in width in XP)
Title: Re: Piworld
Post by: Snektron on February 24, 2015, 05:17:19 PM
You can also look on opengameart.org if you dont want to create characters yourself :P
Title: Re: Piworld
Post by: Duke "Tape" Eiyeron on February 24, 2015, 07:01:04 PM
Most of the time, OGA content won't have a constant graphical style (except things like "Asset Jesus" 's packs or OGA collaboration plans).
Title: Re: Piworld
Post by: Dream of Omnimaga on February 24, 2015, 09:53:33 PM
Yeah it's hit and miss. Most stuff will be great, but the problem is if you take for example a character from Final Fantasy VI, then from Lufia and Mario RPG, then your game won't look very professional with all those different-looking art. That isn't a big issue with Charas Projects but you need to add weapons yourselves if you want your character to hold them because the built-in wearable items won't fit.
Title: Re: Piworld
Post by: Duke "Tape" Eiyeron on February 24, 2015, 11:22:22 PM
I like to check spriter-resources. I saw once a rad Mario tileset which had its own style which would have well worked instead of NSMB. Don't hesitate to try your lady luck there.
Title: Re: Piworld
Post by: 岩倉 澪 on February 24, 2015, 11:52:12 PM
I'll most likely be doing all the art myself, but I'm not against using other people's art (with credit) if it fits the games style and has an appropriate license, so OGA isn't out of the question
Title: Re: Piworld
Post by: 岩倉 澪 on February 26, 2015, 06:48:49 AM
Houston, we have alpha!
(http://i.imgur.com/IUsk56q.png)
Title: Re: Piworld
Post by: Dream of Omnimaga on February 26, 2015, 06:52:20 PM
Do you mean Alpha as in an alpha version of the executable coming soon or Alpha transparency? Looks nice as always, by the way :)
Title: Re: Piworld
Post by: Snektron on February 26, 2015, 06:57:48 PM
I think alpha transparancy since there's no download, but the image is not showing it off very well :P.
(The black is probably the BG (clearcolor), that'd make sense)
Title: Re: Piworld
Post by: 岩倉 澪 on February 26, 2015, 09:17:50 PM
yep, alpha transparency  :P
Title: Re: Piworld
Post by: Dream of Omnimaga on February 26, 2015, 10:40:20 PM
Ok cool :D. Any chance that the borders might be smoothened out  around the block? It still looks nice but I was wondering at higher res if graphics are stretched.
Title: Re: Piworld
Post by: 岩倉 澪 on February 26, 2015, 11:18:55 PM
at different aspect ratios I'll letterbox, so stretching won't happen
Title: Re: Piworld
Post by: Dream of Omnimaga on February 27, 2015, 12:20:12 AM
Oh I meant larger res such as 4K.
Title: Re: Piworld
Post by: 岩倉 澪 on February 27, 2015, 12:33:51 AM
That tile is already scaled up to 4K
Title: Re: Piworld
Post by: Dream of Omnimaga on February 27, 2015, 03:38:20 AM
Oh I didn't realize, because pixels seemed doubled in size. I was imagining something like this:

(http://img.codewalr.us/IUsk56q.png)
Title: Re: Piworld
Post by: 岩倉 澪 on February 27, 2015, 09:56:20 PM
ahh I see what you are saying now. The actual textured models should look like that at 4K /hopefully/.
Title: Re: Piworld
Post by: CKH4 on February 27, 2015, 10:01:12 PM
I can do 4k testing if you need.
Title: Re: Piworld
Post by: Dream of Omnimaga on February 28, 2015, 12:46:49 AM
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.
Title: Re: Piworld
Post by: 岩倉 澪 on March 01, 2015, 04:39:11 AM
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
Title: Re: Piworld
Post by: Dream of Omnimaga on March 01, 2015, 05:57:07 AM
Aah ok, I was just curious anyway ;)
Title: Re: Piworld
Post by: 岩倉 澪 on March 05, 2015, 09:51:06 AM
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 (https://github.com/miotatsu/piworld/blob/master/platform/cassert.d)
Title: Re: Piworld
Post by: Dream of Omnimaga on March 05, 2015, 08:23:22 PM
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.
Title: Re: Piworld
Post by: 岩倉 澪 on March 05, 2015, 08:58:25 PM
handmadehero.org (http://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

Title: Re: Piworld
Post by: Dream of Omnimaga on March 06, 2015, 05:18:17 AM
Oh right, I remember seeing that page before (I like the parallax scrolling site background :P)

And thanks for the explanation :)
Title: Re: Piworld
Post by: 岩倉 澪 on March 09, 2015, 09:13:25 PM
The hotswap module now uses the SDL2 shared object API
https://github.com/miotatsu/piworld/commit/94a3d0a846a310710ceac1a7a90af0184e361ace (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/ (https://miotatsu.github.io/piworld/)
Title: Re: Piworld
Post by: Dream of Omnimaga on March 09, 2015, 10:17:49 PM
Awesome to hear about the cross-platform part :D
Title: Re: Piworld
Post by: 岩倉 澪 on March 15, 2015, 06:31:38 AM
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 (https://gist.github.com/miotatsu/8ce61942603aa8194cf9)
Title: Re: Piworld
Post by: Dream of Omnimaga on March 15, 2015, 06:34:18 AM
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