00:00
00:00
CrankyRabbit
Would-be DJ/Producer. Plays too many video games. Drew a webcomic once. Old fart.

Age 52, Male

Coordinator

New Zealand

Joined on 5/7/04

Level:
19
Exp Points:
3,605 / 4,010
Exp Rank:
14,700
Vote Power:
6.04 votes
Rank:
Safety Patrol
Global Rank:
30,388
Blams:
94
Saves:
224
B/P Bonus:
6%
Whistle:
Normal
Medals:
2,346
Supporter:
1y 5m 13d

Reading old C++ code

Posted by CrankyRabbit - January 21st, 2017


Six years ago I was attempting to learn enough Flixel code to make a game, but that fell through. I just didn't have the time and energy. Phaser came to the rescue.

Currently I'm slowly poking along building a framework for the game to reside in out of Phaser's state system. I like it. It makes me think of Second Life's states, just without a default{} one. The step I'm at is working out how to make a basic preloader animation - I'm just thinking a background image, some text and a loading bar.

Also I'm rereading some very old C++ code. You see, I once went down to a small games startup in in the late 90s, floppy in hand and a head full of Aspergers assurance that I'd land a job and it would be fun and easy.

The floppy held a simple demo of my game concept: You move your player piece around a tiled playfield and swap places with other tiles. When you match three in a group, scoring happens, new tiles fall out of the sky, rinse and repeat. (I did have a theme for the finished game, revolving around "cute anime kitteh inflicts horrific violence on monsters and other people and things" but it never got that far.

Some of the code I'm seeing boggles me. The playfield updating function has a switch(step){} logic that is empty for the majority of the case: branches. On second glance I get it though - I was thinking of making the player and destination tile "hop" rather than just slide straight, and any sideways motion would have been put in there.

Frankly, I'm beginning to wonder if I could make an object for tiles with their relevant properties and just send calls to that. It might make actually programming the important part easier than calling every damn thing from the main game loop like I did twenty-odd years ago.

It's good for me to look at this stuff. Otherwise I'll get caught up in contemplating canvas sizes, art styles, sound and music assets, and shopping for cheapo drawing tablets on Trade Me.

Well... I might make some simple assets again. Just for testing purposes.


Comments

Comments ain't a thing here.