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.

Code Snippets / [DBP] - [Non-Optimized] [2D] RPG-esque Overhead Progress Bar

Author
Message
Mr909
11
Years of Service
User Offline
Joined: 2nd Jun 2012
Location:
Posted: 20th Oct 2012 01:27 Edited at: 20th Oct 2012 01:28
Okay, I really didn't want to give away the secret to the most interesting part of this battle system I'm working on, but since I'm just so darn proud of it, I figured I'd show off my code to the wonderful people here at the forums.

Essentially, this "meter" type can increase in size, have items added to it, have subdivisions added/subtracted, all while animating liquid smooth. It's essentially designed for queue logic, i.e. it will clear up the first bar, then continue on to the second, third, so forth.

Practical applications would be:
(With single meter)
RPG health/mp bars hovering over the character.
Basic time remaining bars
Upgrade/experience progress bars
Basic loading bar
(With multiple meters)
Attack-queue system
Segmented loading bar that keeps center
Progress bars for multiple tasks of the same unit in an RTS or similar.

Unless you want the meter to move to different parts of the screen using the same animation technique used to get it to grow, mcenter(0), propx, and propy need to be taken out in favor of the x and y variables of the type. I tried to simplify the code for general use, but I didn't remove that bit since I figured some would still use it.

In this (Demo) version of the code, you can increase progress by holding up. Notice how the bars recenter after every bar is removed. I would have added a separate key to add a new bar, but hey, I want to get this over with.


MrValentine
AGK Backer
13
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 20th Oct 2012 01:59
Very nice and well done,

Thanks for sharing! - Added to my Flagged list of Forum material...

Mr909
11
Years of Service
User Offline
Joined: 2nd Jun 2012
Location:
Posted: 20th Oct 2012 21:30
Thanks buddy.
Sergey K
20
Years of Service
User Offline
Joined: 4th Jan 2004
Location:
Posted: 21st Oct 2012 00:08 Edited at: 21st Oct 2012 00:09
This one, also 2d rpg menu,

i see you working on some kind of 2d rpg game?
if so, good luck with that!
also i would like to hear more about it

Advanced Updater for your games!
Mr909
11
Years of Service
User Offline
Joined: 2nd Jun 2012
Location:
Posted: 21st Oct 2012 00:15
At the moment, I'm working on the core engine for something I haven't prepared as well as I'd like to say I would.

I have a lot up in the air, I'm mostly just trying to prove to myself that I can do all the underlying framework, math, etc. I have several different projects in mind, but what I really need to do is learn all the basics. If I had a 2d sprite designer worth his salt on my team, I could tell you what I wanted to do (and, surprisingly, little of it has to do with this code). If I had a 3d modeler on my team, I could tell you what I wanted to do (and, surprisingly, that has a lot more to do with this code). But since I don't, I'm working on a core engine, probably for some little text-adventure project until I can get someone interested in one of the above.
Sergey K
20
Years of Service
User Offline
Joined: 4th Jan 2004
Location:
Posted: 21st Oct 2012 00:20
im not a pro modeler or drawer, but i know something about 3dmax and i might help you if u want..

do you have skype/msn? (skype preferred)

Advanced Updater for your games!
Mr909
11
Years of Service
User Offline
Joined: 2nd Jun 2012
Location:
Posted: 21st Oct 2012 00:47
Sadly, at the moment, I'm limited to neither, and probably will be for quite awhile. If you'd like, you can shoot me an email, but I think if you're looking for someone to help, you'd best be placed elsewhere. I don't have a track record of being easy to work with, and at the moment I hardly know what I'm looking to make this engine into.
Sergey K
20
Years of Service
User Offline
Joined: 4th Jan 2004
Location:
Posted: 21st Oct 2012 00:57
nah dont like emails.
well good luck anyways.

Advanced Updater for your games!
Mr909
11
Years of Service
User Offline
Joined: 2nd Jun 2012
Location:
Posted: 22nd Oct 2012 20:28
Thanks buddy, much appreciated, if I ever get my act together, decide what I want to do, and put up a forum, you'll be among the first considerations.

Login to post a reply

Server time is: 2024-02-26 00:35:30
Your offset time is: 2024-02-26 00:35:30