Friday, January 10, 2020

Faded

I am back to work on the arcade-style space mining game. I've ditched the 'teraforming' class for now. The planets are much more 80's retro now. They consist of a configurable surface color and grid color. Dotted over their surface are bases, spaceports, and enemy spawners. The planet surface levels are identical to the space level, but with different elements and slightly different behavior - all of which is configurable in plain text files.

I created a fade effect class. So when the player lands on a planet the screen goes black and the surface scene fades in. The black color, fade speed, and fade in/out are all configurable within the level's settings file.

The goal is to drive the game's elements by config files so users can 'skin' their own games and tweak how it plays solely through the game library files and settings files.

The spawners are next, along with the complex AI and collision detection. Then I'll code the building of upgrades using the gathered minerals.

Monday, January 6, 2020

Fighting Revisited

I have been doing some work on the NetSplit game again. Last night I decided that the game should be part action and part puzzle, as opposed to fully puzzle. It has been a long time since I've defined weapons and fighting scenarios. There have been some changes to the allowed syntax and single items no longer need to be defined in a parent group. So it will be interesting to see how broken the fight engine is.

So far so good. The player is able to punch objects. Before I had the damage messages defined in the weapon object. I may stick with that approach, as long as these messages work as expected.

It would be cool to make weapons that can be hacked, and therefore behave differently. Actually there should be lots of objects that can be hacked. In a previous game I had started, there was some hacking but not really behavior changing etc. I just need to be sure to keep the 'hacking' from being tedious. It is a game, after all - and needs to actually be *gasp* fun.

Saturday, January 4, 2020

Data Data Data

I have muscled through building a MySQL web service and a website to consume it. The site is still pretty bleh-looking, but it functions acceptably. I need to update it to be responsive so it looks good on phones and similar devices. But even more importantly I need to build up the data in the database. The whole idea is to construct an extensive wrist watch library. I want it to allow people to find watches using criteria that typically isn't available.

I'm often looking for things like watches that are time-only (No date, etc), or watches with a specific crystal material, or case thickness. Most sites allow users to filter on a couple of these attributes, but very rarely by all of them. So to make the service - and site - useful, I really need a massive library of watches with ALL their details and attributes.

I haven't yet thought of an automated means of doing this, and so far each watch entry takes a bit of time. I have to do web searches to find out specifications not outlined on the various sites selling them, or even the watch brands' own sites.

I have, however, just moved my insert code into procedures. Now I can call these procedures and keep track of the watch id associated with the watch attributes I'm inserting. So now, at least I don't have to hardcode the watch ids. I increment the watch id variable after calling the watch insert. So as long as I call the attributes inserts right after the watch insert, the ids will be correct.

This solution is still slow, but far easier than what I was doing before - and I can break up my calls to the inserts into any number of sql files.

Sunday, December 29, 2019

Mining

After the busy-ness of Christmas I am taking a brief break from thinky things late at night. So I'm playing a little Minetest. Yeah I could run Minecraft in Linux but I like that Minetest is open source and modding is encouraged etc. And I'm not very hardcore so I don't need redstone or other complex aspects, I just like building stuff.

And of course it's always the same thing. Moria. I like digging into mountains rather than building up structures on the ground. I've also tried to build Rapture. That was a fun challenge, trying to keep the water out etc. I'm gonna have to try that one again. But that might have to be in Minecraft, I think looking through the glass walls might look cooler. If it doesn't actually look like you're underwater then it isn't worth the effort.

I really should plan - a little - though. All of my Moria attempts end with me getting bored since I'm really just digging pointless tunnels and random rooms. They look cool, but I should have some goal of some kind. Maybe a scavenger hunt, or perhaps I do need to build it in Minecraft and use redstone etc to make underground puzzles and traps.

But wait - I'm taking a break from thinky stuff aren't I?

Saturday, December 28, 2019

A Spark in the Dark

I am still working through building a web service, and a consumer site to show it off. The consumer is not pretty. It's been years since I've seriously worked in PHP, and even then I was never super knowledgeable on PHP design patterns. Most of my work was basically imitating MVC designs. - And poorly so.

I'm keeping everything as simple as possible. The header loads all the look-up lists and assigns them to the jQuery autocomplete text fields. The specified watch loads into the main real estate. I need to fix it to do search results and other views as well as the watch detail view.

But I'm off topic. I still hate web development. I am being reminded of this dislike every night I work on this project. At the same time I've been doing some front end work during the day. I need to add a couple controls and UI logic applied to them. They are in C# and within a Telerik grid.

Due to the annoying wall between the front and back end I decided to use jQuery to apply the logic. I LOVE jQuery! It is so amazingly powerful - and enjoyable to work with. It is the one shining light in the dark world of angle brackets, tags, inconsistent style behaviour, outdated and accidental scripting languages that have been band-aid'ed into full blown languages. And then there's jQuery. A Javascript wrapper that empowers js to super human levels AND leverages the powerful selector syntax of CSS.

I feel like if js and Node merged into a single front and back end language, and jQuery merged in as well. A single POWERFUL language that makes the front end and back end consistent - syntax-wise.
And of course HTML should become something like Markdown. So much unnecessary typing wordy tags, angle brackets, etc. It's a formatting/layout markup, why not make it perfectly readable. I'm sure there's Markdown to HTML converters etc out there, but a super quick search didn't yield much.

Anyway, the more jQuery I get to use, the more enjoyable my task is.

Sunday, December 22, 2019

Simple Service

I've been working in CodeIgniter for the past couple of weeks, building a wrist watch library site. It is a great MVC framework. It actually works out of the box and it's simple and straightforward. But...
I really hate web development. The client / server barrier is super annoying, and sadly the one thing I found lacking in CI was calling a controller within a view (Like a sub view), doesn't seem to receive the data in the sub view. It can access the parent view's data, but not its own. So you either have to do full page refreshes, or load everything into the parent which could get out of hand.
I didn't want to use POSTs to interact with the backend, I wanted to allow users to bookmark ANYTHING they were looking at. But this quickly became an absolute nightmare. Finally, it became too much. I was no longer having fun.

I decided to just focus on the database. I started fresh, and this time I'm not over engineering it. Watch attributes are pretty stable. People will be searching for specific case sizes, lug widths, crystal material, etc. So I created a fairly flattened table. This makes it much easier to add items without an admin interface. But MySQL query outputs are not fun when you have a ton of fields in a table. I tried setting the output format to JSON but it was having none of it so I settled for VERTICAL output. But that kept annoying me too. And I really didn't want to just have a DB. That's kind of useless.

I decided to create a web service. I've done a little work on services at work, mainly either C# services or tweaking YAML definitions. But this is all updates to existing solutions. This would be good, building a service from scratch. I would like to do NodeJS, but so far I'm not familiar with free Node hosting. I know PHP/MYSQL hosting is super easy to find and configure etc. I decided to use PHP. So far it is great! there were a few 'head-meet-desk' moments, but now I can search the data and see it in JSON. And when I'm done, other people can leverage my growing watch database.
And so can I!
I probably will at some point.

Sunday, December 15, 2019

Ignite

All the web development I've done professionally has been done in C#. If I wanted to build a site using an MVC framework I could simply create an MVC project and the controllers, models, and views just kind of worked. In my free time I run Linux so I typically build sites in PHP and MySQL. I came up with pseudo MVC structures.

I've been wanting to utilize an actual, minimal, MVC framework in PHP etc. Every solution I've tried has either not worked for me or been too tedious to learn - this is me goofing off in my free time after all. I've recently decided to try the Code Igniter framework. It actually worked out of the box. Coding models, views, controllers, and setting up routes has been fairly easy. Most of the struggles I've had so far involve how I'm dealing with back end operations. Loading views into html elements seems to only inherit the main page's data or variables, passed to it from the controller. The 'sub' view - even if I pass it data, that data isn't present.

I'm a total Igniter noob so it's likely just my ignorance. I'll keep researching and messing around with it. When I discover anything I'll share it here.

Introduction to WorldWeaver

A New Iteration  I've been working on the second manifestation of my Interactive Fiction engine - WorldWeaver - for about a year now. I ...