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.

DarkBASIC Professional Discussion / RPG Command-Menu?

Author
Message
Jachan19
15
Years of Service
User Offline
Joined: 1st May 2011
Location:
Posted: 25th Nov 2011 19:15
Like I said in subject, I am trying to program the more-than-one heroes with ATB system but until I arrived to realize this... how can I avoid the conflict of multiply command-menu from other heroes once one of them starts make his turn? like, to pause the others's command menu until the first finished to select while their ATB gauge continues to build?

my Command Menu would be more like this...
* Attack
* White Magic
* Black Magic
* Technicks
* Defend
(NOTE: Items is already inside Technicks-menu)

Also, my idea, whenever the select-location move to either Magic or Technicks, another box of magic / technicks list pop next to that Command-Menu box... Just in any case if you need this included to avoid the other hero's command-menu's.

Let me know any question and I would be happy to answer you any more information to know before any solution you can think of... I am welcome to listen your solutions. =)
Thank you.
Grasmann
17
Years of Service
User Offline
Joined: 1st Sep 2008
Location:
Posted: 25th Nov 2011 21:37 Edited at: 25th Nov 2011 21:38
Am I right if I guess that you are a beginner in programming with dark basic?

Before you can even think of Command Menus you have to build a solid engine for your game to handle all sorts of things.

For a RPG, how I imagine this, you could also need access to some form of database.

My advice is to practise some more before you come up with actual game plans.

Sorry if I got it wrong but it doesn´t look like you have the experience to actually make a real game.

You have to learn the basics, nice and slowly. I don´t mean the hello world ( imo that´s useless bullsh*t ) ... but the techniques to store your information in arrays and stuff like that. You will need it.
IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 25th Nov 2011 23:04
@Jachan19,
Rule #1: Be polite.

You have a second chance now because I stopped your posts appearing - a simple 'No, I'm not a beginner' would have sufficed.

Grasmann
17
Years of Service
User Offline
Joined: 1st Sep 2008
Location:
Posted: 26th Nov 2011 00:55 Edited at: 26th Nov 2011 01:31


I didn´t mean to offend you. It´s just an advice I would have
liked to be given to myself when I started to programm with dark
basic XD.

I thought I could just start with the big game. Actually I learned
much while I tried it but I already started like 5-6 projects with
dark basic only to realize at some point of the development that I
made significant errors in the early stages of my engines, which
were nearly impossible to correct later on.

I learned that nothing is more important than a solid engine, to
have a reliable base frame, which delivers the functionality that
you need to accomplish your goal, the creation of a solid game.

I mean you can do it like I did it myself and try to work with 3D
and shaders and all of that as soon as possible, but I think you
will regret it sooner or later, because you will have to rewrite
big parts of your game, or start over.
Jachan19
15
Years of Service
User Offline
Joined: 1st May 2011
Location:
Posted: 26th Nov 2011 01:29
Okay, I am sorry, IanM, his words just offended me, that's all.

I just want to know the solution to fix this problem I thought because it's my first time to CREATE this part, NOT the --> game <--
He misthought this as a game instead "part".

I tried to look through "RPG" search in forum but too many topics showed up and none of them matched my problems.

Plus, I already tested myself about animated-sprites VS press-key before, the animated sprites froze unless i use "Select / Case" commands... but it only worked in OLD version... I am using current latest version (unless it have been upgraded later already) and it didn't work right now... This is why I am curious how to fix this between animated-sprites and press-key, as if you are playing the actual GBA-system (Final Fantasy 4 ~ 6 Advance, Dawn of Souls).

I don't mind for freezing the animated-sprite when using press-key commands but it does not look right for players to see stopped sprite-guys, correct?

I guess I have to show my program writing of Command Menu first before anybody can think of the solution to solve my problem or what?

P.S.: Really, I want to complete my first RPG game and yet, nobody solve all of my problems just because none of them had interested in my problems,
Grasmann
17
Years of Service
User Offline
Joined: 1st Sep 2008
Location:
Posted: 26th Nov 2011 16:09 Edited at: 26th Nov 2011 16:22
If I understand you correct you are just programming the part with
the command input for battles? >_>

So you want the ATB to go on while you choose a command for a
character right? But you don´t want to have different command menus
to show up on top of each other right? So ... that´s what I meant
you just need a little engine to handle this stuff.

Let´s say you have different Values for each character. I would do
it with a UDT. Maybe something like this:


In the Main loop I would do something like that to avoid multiple command menus:


After a command was chosen and executed, of course you have to clean your array again

Yes, that´s what I would do first ... maybe it can´t be done exactly like that ... something similar will do
Jachan19
15
Years of Service
User Offline
Joined: 1st May 2011
Location:
Posted: 26th Nov 2011 22:20
yes yes, that's what i mean!

And yes, this is also what i mean.
So you want the ATB to go on while you choose a command for a
character right? But you don´t want to have different command menus
to show up on top of each other.

Okay, I will see what I can do with this one... Kinda different from my strings but okay. If you want to re-fix it with my own strings, let me know and I am willing to give you them.

By the way, when you said "you have to clean your array again", does it means "CLS" or "SYNC" or what?
Grasmann
17
Years of Service
User Offline
Joined: 1st Sep 2008
Location:
Posted: 27th Nov 2011 09:47 Edited at: 27th Nov 2011 09:52
No I mean "ARRAY DELETE ELEMENT".

The array "CharacterATBFull()" is meant to hold a list of
character IDs, the IDs of the characters that have a full ATB bar.
The goal is to be able to determine if one or more characters are
"ready" by checking if the array has one or more entries.




Once they executed an attack you have to remove the entry from the
array and reset their attribute "Current_ATB"



If you do this right and use an additional variable to determine
which characters command menu should be used you can even switch
between the ready characters. So let´s say characters 1 and
character 2 are ready and the current command menu is for character
1 but you want to switch to characters 2 to let him attack first.

As I already said these are basics ... it´s kind of elementary to
have a system that manages all kinds of things for your game.
Again I want to apologize if you felt yourself to be offended but
you really have to learn those things.
Jachan19
15
Years of Service
User Offline
Joined: 1st May 2011
Location:
Posted: 28th Nov 2011 00:44
hmm... I did tried to do what you tried to say (and wrote down with those engines)... but it seem bit different from my strings... I think i should give you those strings of mine, so that you would change your strings to mine, to be more clear to understand which string is my string...

Those ones below might not be useful for your array thing but...
if you look carefully, this is for a form of ATB box as X2# is the important key as X2# increase by a formula of heroes's speed, so...
this "X2#" can be same as "currentATB" as I already knew that...
By the way, the max ATB number should be 65536 (i used FF6 ATB-formula).
Also, I used GLOBAL this, so that it can be followed to anywhere on that page, even "GOSUB".



ATB Function right below here. It might have string-colors there but it can be changed by depending the X2# number... the more number it gains, the color it changes. (white (zero) to yellow ( --> 255 - INT(P1ATBX2# / 655 * 2.55) <-- on Blue while the others are 255 (so that it is white to start)... as 255 - 0 = 255 blue to 255 - 255 = 0 blue. make sense?)



This below is the command menu while "Attack" can be switched to "Limit Break" when hit the gauge (that if you did played FF7 or any later...).



Finally... This below is the main part of the command menu location. That's how I wrote before getting the problem in this forum. SelectedCommand# is just the point of "selecting" you are trying to choose, so don't worry about it. This is a DRAFT, not FINAL project, so I am sure it will appeared in center of your screen when you test it, instead bottom-right (this is the final project in my mind).



And...
Okay, but still, you have no right to say that to someone who have a dream to create a RPG game for first time. I am sorry to be angry with you but even so, sometimes I never do "array" codes, it still works without a single array engine though. I had it in my college final-exam and my team with me had been passed that course class easy. It was our class RPG game, to mind you. So, what I am trying to say is that it's just possible to do anything without the important engine, right?
By look at those writings i made, it's not the beginner level, right? Anyway, I am looking forward to see you change what you wrote into my own strings, to clear it bit better.
Grasmann
17
Years of Service
User Offline
Joined: 1st Sep 2008
Location:
Posted: 28th Nov 2011 09:02 Edited at: 28th Nov 2011 09:16
Im sorry but this definitely is beginner level, Im not
trying to offend, but I can´t lie to you either.

They way you do this it is highly limited, plus you need new global
variables for each character. They way I suggested, the way with
arrays, is unlimited, you would have a standardized system to hold
what ever character count you want.

The goal in programming is to avoid duplicated code parts, and you
have plenty of them there.

For example this part here:


You could get rid of all those variables if you would use an array
that holds user defined datatypes of a character. Like this:



Then you can populate this array with the information you need.
You can even shorten things up more with additional udt´s:



Also I don´t really understand why you are using float variables
for values that are obviously meant to be integer values.

Again I want to apologize if you feel yourself offended, but I
won´t tell you to go on with this programming style, because it´s
madness in my eyes. Sooner or later you will have an extremely high
count of global variables, and trust me: That doesn´t make
programming easier.

If you want to stick with your current coding somebody else will
have to help you, because it´s absolutely against my principles to
do it that way.

Login to post a reply

Server time is: 2026-07-10 01:59:29
Your offset time is: 2026-07-10 01:59:29