Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411493 Posts in 69372 Topics- by 58428 Members - Latest Member: shelton786

April 25, 2024, 06:05:56 AM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsCommunityDevLogsOnce and Future Cactus [Action] [RPG] [JavaScript] [Phaser]
Pages: [1]
Print
Author Topic: Once and Future Cactus [Action] [RPG] [JavaScript] [Phaser]  (Read 1093 times)
niedzielski
Level 0
*



View Profile WWW
« on: November 27, 2016, 05:22:05 PM »



Once and Future Cactus is super early in development. Not much to show yet but I always wanted to be more involved in this community since discovering it a few years back.

Plot
You're Cactus, a human like wanderer resembling a large bar of green soap. As you journey through a handful of settings, you encounter mostly enemies and a few neutral lifeforms you're unable to communicate with. Your only solace and incohesive explanation for the strange world you inhabit is in books and scraps of epistolary information you come across.

Gameplay
Tap or click to interact or move. There will definitely be a handgun and hopefully a large inventory of items, including a detailed log of all discoveries made.

Graphics
The graphics are super low resolution. The avatar is currently 6px tall. A 4x4 fixed width pixel font is in progress. The game is scaled to window size as pixel perfect as the ecosystem allows.

Audio
Lots of ideas but not started yet.

Check out the code on GitHub.
« Last Edit: December 18, 2016, 07:56:45 PM by niedzielski » Logged

niedzielski
Level 0
*



View Profile WWW
« Reply #1 on: December 18, 2016, 07:59:15 PM »

I've been just appending to the original post which isn't how things are down around here. Here's all the updates since this realization in one deuce below. Future updates will appear as replies :]


Dec 6th 2016: I pushed some minor tweaks to the mem font and made some scripts to automate the build. I need to get package.json sorted to actually deliver a ttf file. I'm having trouble getting it show without antialiasing in the game so I may need to add bitmap support somehow.

Dec 8th 2016: A couple fixes to the mem font so it actually gets published in the NPM package. I think I've got that business sorted. Now to work on the antialiasing issue.

Dec 12th 2016: I've been very busy with some upcoming work stuff but I sort of learned how to use Python-Fu directly from GIMP's command line which is nice. I was running TinyScheme scripts before which was fine but I would have used Python if I had known. I updated my list of shebang hacks and converted the TinyScheme script. This is all for that sweet mem font and I said "sort of learned" because I still can't figure out how to convert the result pdb.gimp_image_list() from an INT32 ID to an IMAGE even though similar code worked in TinyScheme.

I still can't disable antialiasing when the font is in game (in GIMP it looks crispy). I've tried all the Phaser and CSS antialiasing options I could find but no dice. I even tried forcing canvas mode and shifting by a half pixel. Oh well.

I'm now trying a sprite sheet with a .fnt file but the font (4x4px) is actually too small to use with the recommend tool at it's native size and still shows up blurry regardless. I'm hoping this is the last pixel perfect / sizing issue I have. I'm gonna write a .fnt file for the new sprite sheet and start testing stock bitmaps if that doesn't work. o/

Dec 13th 2016: I forgot in my last post that I actually already have bitmaps drawing just right (in a previous game prototype I was using vector graphics for everything). So I went forward with making my own .fnt file. I just copied the 5px version from Littera and found this doc on the format which I used to flesh it out a little. It's XML-ish.

I wrote the first unique bits by hand and, with a few lines of Bash to generate the character map, was able to hack together an output for testing quickly. I got the casing wrong on one attribute but after I spotted that it pretty much worked! It's super crisp. However, I've no idea about how fixed width and kerning should play together. That part still looks like rubbish. I've manually added kerning tweaks to a couple characters in the .fnt file and here's what that looks like:



The kerning support in the .fnt file is really primitive. Where needed, kerning specialization between every permutation of character pairs will need to be identified and specified. The font is even less readable without kerning so I'm pretty sure I need it but I don't know what this should look like when I'm showing a countdown sequence, for example. I don't want the numbers bouncing back and forth because of different kerning. Maybe just for numbers it's always the same?

No real commits today. I gotta get all of this from complete hackjob to partial hackjob. In particular, I really hope that if I need kerning I can encode all this information into the FontForge file and still keep that process from GIMP source to FontForge automated. The only other noteworthy mention is that I've started versioning the devlog itself in the repo since I'm taking the trouble to write it and it's all about the game.
« Last Edit: December 21, 2016, 11:53:54 PM by niedzielski » Logged

niedzielski
Level 0
*



View Profile WWW
« Reply #2 on: December 18, 2016, 09:10:49 PM »

I've been busy lately but have somehow done a ton of work too. mem font is pretty much done!

According to Wikipedia, monospaced fonts do not use kerning. It seems legit. Here's a close up of a screenshot I took in Sublime Text showing different characters all occupying the same widths:



So I decided to split the font into monospaced and proportional fonts! There will be many tweaks to the proportional font's kerning and probably some of the shared glyphs of both but it's very functional for what I want.

With so low a resolution, text of any length takes up way more room than I had hoped. I did mock out some screenshots previously but I was still thinking optimistically that I would be able to keep the camera on the character tightly. Since I'm planning on the player uncovering many short passages, I'll need the room for text either via a dedicated inventory and reading screen with high resolution, doubling the pixels drawn for everything but text, or increasing the resolution everywhere.

Here's a shot of the new monospaced font for a FPS counter and some demo text in the prop font at an increased resolution:



I think I'll next start trying to better integrate the Tiled map editor's output functionality with the game. I also want to apply some of the build and packaging learnings from the mem font into the game.
« Last Edit: December 21, 2016, 11:54:11 PM by niedzielski » Logged

Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic