Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

2D All the way! / Dynamicly Load Images and other Questions

Author
Message
Nio
21
Years of Service
User Offline
Joined: 14th Aug 2004
Location:
Posted: 15th Aug 2004 02:57 Edited at: 15th Aug 2004 03:46
I'm trying the trial version of DBPro and working on my fist 2d Game. I have a decent coding background in PHP.

Right now I'm trying to build a simple engine for a "Choose your own adventure" type story game. And the goal is to have scenes with a background and up to 3 characters and their text as they "talk". But I'm having some problems.

I will have 100s of fairly large images that I would like to load into the game when I need them instead of loading them all in when the program starts. Right now I can't seem to get my custom mouse arrow to work along with my functions to load my images dynamically. Also Since I'm loading images dynamically I don't want to pack them all in a single EXE. I'd rather keep it in like a media folder to later be installed via install shield or whatever. But too I want the files encrypted so people can't use my images. Since I'll have a lot of images for each character(expressions etc) It doesn't make sense to load them all into the EXE since that will become very large. So I need to load them dynamically and then clear them from memory for the next image etc.

The other problem is the animated sprites seem to wobble and they look a little distorted as if they were stretched. Also how can I pause the animation. Say for blinking eyes. It would be nice to get it to pause when they are open for a few seconds instead of just blinking constantly.

Also when I get to putting the text that a character is saying on the screen I wanted it to be typed out. I.E. Animated on the screen one letter at a time as if it was being typed on the screen. Any tips on how that could be done?

I understand coding theory pretty well with my PHP background but I need to figure out how the general flow of syntax works here. Like having an intro splash screen with some choices then going to the main game and though those scenes. Or how to save and load a game.

This is what I have so far below. Any tips ideas or help would be greatly appreciated. In the end I hope to have a system where I just write the scenes out placing the characters etc. Mouse click goes though the text blocks. A choice comes up here and there to branch the story around. SO each scene would need some kind of identifier. Which is also true for when I need to save the game in progress to jump back to that scene.

Anyway. I hope someone reads all this and is willing to lend some knowledge. Thank you for your time. (See my code below.)

-Nio

Login to post a reply

Server time is: 2026-06-11 14:49:18
Your offset time is: 2026-06-11 14:49:18