Game
The King's Day
7 years ago

Finally Working - Word Wrapping


I’ve been coding the game for about a month now without too many issues slowing me down. Then I had to write an algorithm to wrap a string of words and fit it inside a box or determined size.

It sounds simple enough but it is actually quite a complicated piece of code to write to get it to work properly. Each character may have a different width and each character has its own kerning and I needed to manually add my own space in between words. Plus there is a line-height property and padding around the box that it needs to be in.

I know it has been done before but I like to challenge myself and write my own code from scratch. Now I have a function that converts strings to sprite-based fonts. So I can draw my own font and set each characters property and display it with word-wrapping. Yay!



0 comments

Loading...

Next up

So far the game only has one vehicle but more being planned. It's working; just has a few bugs to work out with collisions. The script I wrote can be applied to any vehicle in the game since the physics do not need to be too realistic.

Sound Manager Working!

RELEASED - Will You Help the King?

Working on a new project called Adventure Ops where you explore a world to discover secrets and solve a mystery. Game is coming along nicely.

The King's Day!

Entity Script System for Storytelling

Deleting Game Files

Been working lately on lots of 'behind-the-scenes' boring stuff that no one really cares about, so here’s a guy playing the sax for some reason.

#screenshotsaturday

We made a lot of improvements on the Freezing Plains visual. Things like pine trees, tiny bushes, some rocks, and others game props!

#IndieGame | #IndieDev | #GameDev | #PixelArt | #WaifuQuest | #WifeQuest | #screenshotsaturday

Today I was setting up the location of the first boss. His name is "Father" and he is the first of the Patagonians. His task is to guard the road to the House.🛡🗡 Bookmark pre-launch page🔖🔖🔖

https://www.kickstarter.com/projects/rdvindiegame/the-patagonian…