QB64.org Forum

Active Forums => Programs => Topic started by: Cobalt on February 06, 2020, 03:29:55 pm

Title: Dragon Warrior 64 Final
Post by: Cobalt on February 06, 2020, 03:29:55 pm
Here it is at last, the final major update.
Unless somebody finds a major bug or I manage to completely fix every cosmetic bug there will be no more updates to upload.

I did have to make some major changes to internals so any saved games will have to be erased and restarted.

It does have a better feel when playing with a Joypad but it is not required.
(now with cool battle feature! opps I forgot to turn it back on!)

[/color]
DEFAULT Controls:
Start button = A (upper case)
A Button = Space bar (accept selection)
B Button = Enter (cancel action\ selection)
Arrow keys for movement.


Title: Re: Dragon Warrior I(aka Dragon Quest I)
Post by: SMcNeill on February 07, 2020, 12:35:50 pm
A little snippet of code for you to study, which you might want to incorporate into your game:

Code: QB64: [Select]
  1. Buttons = _LASTBUTTON(3) ' number of buttons on the joystick
  2. Axis = _LASTAXIS(3) 'number of axis on the joystick
  3.  
  4.     IF _DEVICEINPUT = 3 THEN 'joystick
  5.         FOR i = 1 TO Buttons
  6.             IF _BUTTON(i) THEN PRINT "Button "; i; "Down"
  7.         NEXT
  8.         FOR i = 1 TO Axis
  9.             IF ABS(_AXIS(i)) = 1 THEN PRINT "Axis "; i; "Pushed"; _AXIS(i)
  10.         NEXT
  11.     END IF
  12.  
  13.     _LIMIT 30

I've got one of the XBox style joysticks hooked up to my computer, with 12 buttons and 6 axis on it, and this little routine reads every input just fine.  Each button is an independent value of _BUTTON(1) to _BUTTON(12), and the 3 directional pads are represented by the axis.

Button values of -1 means the button was pressed down.
Axis values of -1 mean the axis was pushed fully left (or up), while values of 1 mean it was pushed fully right (or down), which is why I have this little demo checking for ABS() = 1.

_DEVICES is simple enough to add into an existing program, and you should be able to add it to your game with very little effort and offer joystick input for your users.  ;)

I'd also like to suggest adding a little config set-up option later, so an user can customize which of their keys relate to BUTTON A, BUTTON B, SELECT, START, and movement keys.
Title: Re: Dragon Warrior I(aka Dragon Quest I)
Post by: DANILIN on February 08, 2020, 08:12:47 am
if an unusual qb64 is required
maybe it makes sense to place an exe
by testing in virustotal
or post images from a running program
Title: Re: Dragon Warrior I(aka Dragon Quest I)
Post by: Cobalt on February 08, 2020, 02:57:02 pm
Steve: your ahead of the game.... customize-able controls are planned, along with gamepad controls. those controls however will be designed around a gamepad controller similar or same as the old NES controller. Multi-Axis and 5+ button controllers will be an End User issue to figure out.

Danilin: No an EXE would be a bad idea, due to certain issues with Linux and Mac OS differences from Windows. This may require changing of some of the code to run on those systems. its easier to just download a readily available copy of QB64 than having to download and install a virtual machine or emulator and scan for viruses that may or may not be detected. and while I believe my system to be clean I will make no guarantee to that affect.
However if you want to or are Requesting an EXE I have no problem providing one, but I'm not going to just upload one randomly.

I might consider adding a pre-compiled exe when a project reaches the final release, but Dragon Warrior is a few weeks from that.

I'm Glad people are checking it out, save for Fellippe no one has yet let me know what they think so far. :(

I've already fixed a few bugs:
 Player no longer 'jogs' when changing maps
 Corrected key press to leave 'STATUS' screen to 'enter'(current B Button)
   -was set to ESC for some reason, can not remember why.
 Fixed finding Fairies Flute, was giving player Hand Axe instead.
 Fixed finding Edrick's Token location.
 Fixed Golem fight location
 Adjusted text display rate to be closer to original game speed.
  - unfortunately this a caused a new bug, Extra letter printing in wrong location when scrolling :(
 Fixed some odd math when trying to battle monsters that greatly out classed the player
  -(attacking such a monster would actually heal the monster!)

I have added a few game things:
 Added Random encounters
 Added battle music
 added some battle sound effects.

thats all for now, currently adding sound effects and back ground musics. Two things I know I need to figure out is 'entering' buildings in certain towns, and adding a 'lit' area when player is in certain caves.
Title: Re: Dragon Warrior I(aka Dragon Quest I) UPDATED!!
Post by: Cobalt on February 12, 2020, 08:00:29 pm
Okay the 02/12/2020 update list of what-nots.!

Corrected message display speed,
  this introduced a bug which displayed the first character of the next line outside the scroll area
  -this is now fixed too
When player healed the HP was able to go above Max Hp- now fixed
Quick stat window should display when command window is opened- now fixed
When staying at inn screen should fade out and sound should play- now added
   slight issue with screen not completely fading out- still open
   sound effect is now added.
Should have been a pause between winning a battle and the leveling up message if player reach next level- fixed
  Sound effect for defeating monster added
  Sound effect for leveling up added
  Several battle sound effects added
Fixed an issue when if you had a key any door in map would open even if you were not standing next to it- fixed
  added opening door sound effect.
Corrected erroneous stair sound effect being used for going UP stairs. was actually runaway from battle SFX. Fixed
In some instances the previous message display would not get erased and would still be present in the next message. fixed
Added battle music.
Situation where after making an Excellent hit the message would keep displaying every attack. Fixed
  sound effect for excellent hit added.
Erroneous attack scores for monsters corrected, thanks Fellippe & Vwatch! FIXED
Issue with first message display of game not pausing after correctly. Fixed
Slight Tweak needed to certain player sprite to correct position. Fixed
Swap YES\NO input to default to YES rather than NO. Done
Correct monster 0 hit attack to a miss message. Fixed
Displays level up stat even if player had 0 gain in that stat. Fixed
   no longer displays 0ups!
Corrected player fighting over leveled monster causing monster to heal beyond max hp. fixed
Had a battle begin after entering a town! Fixed
Several SFX added.


Known things to get done.
With perfect timing player can open standard command window when entering battle, crashing battle routine.
  Biggest issue is it take perfect timing, have only been able pull this off once.
Finish adding fixes to all Inns.
Monsters with Magic ability need their MP calculated at the start of battle like their HP is.
Add the darkness aspect to caves.
  so player can't see beyond own sprite without TORCH or RADIANT spell.
Add Princess Sprite to cave prison.
Make it possible to enter building in towns.
 this affects the 4 towns. and halts the game as player cannot buy keys to move on.
 -should just be a matter of adding a trigger space to the entrance of the "Building" as they are actually handled as a separate map
Added Custom Controls menu at title screen.
  This is a major addition as this same menu will allow the use of a Controller.
   -Although customizing the inputs for keyboard or 4 button controller should not pose any major issues. (fingers crossed)
Need to add my UniKorn Produckions splash screen. with music.
Need to add a credits and Thanks screen. Somewhere...
The location for creation of the Rainbow Bridge needs to be setup.
Changing the Text and white pixels on screen to red-ish when Hp gets below 20% of Max needs figured out.
  this was easy with a paletted image setup.....
   -may end up having to create more sprites with the color shift to handle this.
Need to make damage areas on maps actually do damage!
Need to do something about NPCs standing in players way! this happens WAY TOO often.
   May have to add a "BLOCK NPC" flag to certain tiles to keep them from blocking key areas?
Need to control how much NPCs are able to move around map. some are no where near where they should be.
  Not sure if I need to add a "Patrol" region to the maps for each NPC and assign them to only beable to move in that area?
  Or perhaps I am giving them too much ability to move and need to cut back on that chance.
Need to finish player spells, only have the Heal and Hurt spells(both low and high levels) completed at the moment.
Over all the battle mechanics seem off.
   the player misses way too much compared to the original game.
   and the hit values don't feel right.
Not too certain about the level up values I have seen, the original game gave Fixed amounts based on a formula using players name.
   Wanted to make things more random but first level up may need reigned in. This way the player can use what ever name they want
   (up to 8 characters) with out having to worry about being penalized with poor stats.
Minor issue with not being placed correctly after being defeated in battle.
  Should appear in same place as starting game, however I have found player on top of king or spaced too far away.
  as this is hard coded in to start in an exact location I have been baffled by this one.
Have to figure out what monster appear in which caves, and how that is done. Guessing each level has its own set rather than
 having a grid where certain monster appear. Have found NO information on this yet.
Have to add monsters to the deserted town, without adding them to every other town!

Actually need to Give some thought to the End of the game now! WOW never really thought I would make it this far.

If somebody does want a pre-compiled EXE just ask and I'll pop it up, just take note this will be compiled on a WINDOWS OS.
Title: Re: Dragon Warrior I: The Control UpDate!
Post by: Cobalt on February 17, 2020, 11:15:16 pm
So there is now customize-able controls, you can also choose between using a joystick\pad or the keyboard.

This is still highly beta stuff, not fully tested out but upon initial testing seems to work.

The only know issue is with controllers that use a BUTTON state for direction control as apposed to and AXIS control.

Right now the game handles the latter control type. I lack a controller that uses a BUTTON state for the direction controls.
  So I cannot do the required research to add support for that type of controller at this time,
  Fellippe brought this type of controller to my attention.

The program also now creates a CFG config file to store custom settings in, volume setting, keyboard and controller setup, ect.
  So you do not have to reset things every run.
Title: Re: Dragon Warrior I: The STxAxTIC UpDate!
Post by: Cobalt on February 22, 2020, 02:08:58 pm
The New update adds and intro and a few bug fixes and adds enough functionality to make it about 50% of the way through the game. For every fix I add I find 3 more that need done, and for every quest item I setup I find 2 others that need setup first. so getting there via the long way.
Title: Re: Dragon Warrior I: The STxAxTIC UpDate!
Post by: FellippeHeitor on February 22, 2020, 11:16:23 pm
This is a very enjoyable game, Cobalt. The amount of work you're putting into it will definitely pay off in the end (it does already, but I won't say it so you don't stop developing it :-))

I hadn't played the original before I tried your version, but I did watch a video of the original on the Nintendo console to get the idea, and man, this clone rocks.

That red slime was a hard one to kill, tho... it's probably by design!

I believe @pforpond will enjoy this, given their history of enjoying/developing similar games.

PS: Please turn the code into an attachment ASAP. This thread is taking forever to load due to the size of the code in the codebox.
Title: Re: Dragon Warrior I: The STxAxTIC UpDate!
Post by: Cobalt on February 29, 2020, 12:52:19 pm
controller issue testing only, use with caution just in case.....
all done! Thank Fellippe.
Title: Re: Dragon Warrior 64: The 'Game to Play' UpDate!
Post by: Cobalt on March 03, 2020, 03:32:17 pm
Have fun and Enjoy.!
Title: Re: Dragon Warrior 64: The 'Game to Play' UpDate!
Post by: Ashish on March 04, 2020, 11:15:33 am
Nice game! Intro is very impressive (promoting QB64). Also music and game story is good.
Title: Re: Dragon Warrior 64: The 'Game to Play' UpDate!
Post by: Cobalt on March 23, 2020, 11:46:43 am
Thank you to those of you who have played the game!

Made slight tweak to the level up code so you don't start loosing stats so early now(around level 5-6!)

moving stuff from main post too here...
Things I'm considering doing:

Making the "Special Thanks" screen come at the end, allowing it to scroll nicely through the list of people with out any time constraints.

Re-coding the NPC Talk routine to eliminate all the duplication. probably an extra 600-700 lines from the shops due to that.

Just an overall once through the code trying to clean as much up as I can, and add extra comments in certain areas.


Title: Re: Dragon Warrior 64: The 'Game to Play' UpDate!
Post by: Cobalt on May 19, 2020, 09:04:58 pm
Play the update bump.
Title: Re: Dragon Warrior 64: The 'Game to Play' UpDate!
Post by: Virtusoroca on May 19, 2020, 11:47:59 pm
Didnt played yet but opened the code and read some messages. Wow. What a massive project! A lot of passion! Really got my attention. I didnt played the original so not sure if I can contribute. But I definitly  have much to learn from that. Thanks for the effort and the result so far.
Title: Re: Dragon Warrior 64 Final
Post by: Cobalt on May 25, 2020, 01:44:23 pm
Well I hope somebody has fun playing this game. Will try to get a 'TV promotional commercial' style video up sometime in the not too distant future.
Title: Re: Dragon Warrior 64 Final
Post by: bplus on June 09, 2020, 12:25:59 pm
@Cobalt and @Qwerkey

Yeah! we finally have one of Cobalt's in Games. Screen shots are amazing.

Cobalt what are you using for tile designer? if you don't mind me asking.
Title: Re: Dragon Warrior 64 Final
Post by: Qwerkey on June 09, 2020, 01:03:51 pm
It goes without saying (but I'm saying it!) that I concur with bplus.  A professional project indeed.
Title: Re: Dragon Warrior 64 Final
Post by: RobinGravel on August 08, 2021, 02:03:26 pm
Sorry to bring Dragon Warrior 64 back. I just discovered it.

I get glitches in this game.

It happens when a fight starts. I get this message. Once I clicked on continue, the hero walks without fight.




The other glitch is the hero stops moving in the world. It happens after I went to a town after passed a cave from left.
Title: Re: Dragon Warrior 64 Final
Post by: Cobalt on August 08, 2021, 06:20:20 pm
The other glitch is the hero stops moving in the world. It happens after I went to a town after passed a cave from left.
the first bugs anybody as reported.. at least I know you played it! :D

looking into the first glitch, happens when the monster runs away, some how a variable is getting changed remotely.

I need to know more about the second one, just where in the map you are. a screen shot would help.
Title: Re: Dragon Warrior 64 Final
Post by: Cobalt on August 08, 2021, 07:06:13 pm
first bug tentatively quashed. Should no longer out of range when a monster flees.
Title: Re: Dragon Warrior 64 Final
Post by: RobinGravel on August 08, 2021, 08:14:38 pm
It works.

Bad news: it wrote my save game into a new one, losing any progress I've made.

I was reached to level 7.

I can't reproduce the other bug.
Title: Re: Dragon Warrior 64 Final
Post by: Cobalt on August 08, 2021, 10:23:00 pm
It works.

Bad news: it wrote my save game into a new one, losing any progress I've made.

I was reached to level 7.

I can't reproduce the other bug.

Poomp, well can you give me a screen shot of the area you were in and It would give me an idea where I can look.
Title: Re: Dragon Warrior 64 Final
Post by: RobinGravel on August 08, 2021, 11:22:37 pm
Here:

 [ This attachment cannot be displayed inline in 'Print Page' view ]

I see no problems now.
Title: Re: Dragon Warrior 64 Final
Post by: TempodiBasic on August 09, 2021, 09:54:14 am
Hi Cobalt
there are so many files at first post of this thread:
I have downloaded the last DW1-Fullsource.bas... and now do I need all these other files?
for the final step can you group them into a .zip or .rar or another compression file?
It will be easier for a dummy like me to get all the files needed.
Title: Re: Dragon Warrior 64 Final
Post by: TempodiBasic on August 09, 2021, 10:20:06 am
Ok
no DragonWarriorData need!

I compile DW1_FullSource.bas and played to game....
Cool! And great introduction.
Good Job.
Title: Re: Dragon Warrior 64 Final
Post by: Cobalt on August 09, 2021, 11:26:17 am
Hi Cobalt
there are so many files at first post of this thread:
I have downloaded the last DW1-Fullsource.bas... and now do I need all these other files?
for the final step can you group them into a .zip or .rar or another compression file?
It will be easier for a dummy like me to get all the files needed.

The Zip file is over in the GAMEs section, I will be asking Qwerkey to update it once I have a quick look for the second bug that Robin mentioned, about getting stuck.
Title: Re: Dragon Warrior 64 Final
Post by: RobinGravel on August 09, 2021, 05:28:41 pm
Another bug:

The game quits in the dialogue with a seller (playing with a keyboard).

Title: Re: Dragon Warrior 64 Final
Post by: Cobalt on August 09, 2021, 05:43:42 pm
What keys are you using, I have been unable to reproduce the unexpected exit.
Title: Re: Dragon Warrior 64 Final
Post by: RobinGravel on August 09, 2021, 08:07:17 pm
By pressing ESC.

Title: Re: Dragon Warrior 64 Final
Post by: Cobalt on August 09, 2021, 09:47:35 pm
well thats the real bug your not supposed to be able to use ESC, it acts as an emergency quit should the game hang or something. the control setup should not have allowed the ESC key to be mapped to a control.

If you remap that button to something other than ESC the issue should resolve. I'll have to look as to why you were allowed to map it in the first place though.
Title: Re: Dragon Warrior 64 Final
Post by: TempodiBasic on August 10, 2021, 08:32:47 am
Hi Cobalt
I'm not able to find Zip file with all need files of the game

my screenshot
  [ This attachment cannot be displayed inline in 'Print Page' view ]  
I have solved manually
Thanks
Title: Re: Dragon Warrior 64 Final
Post by: RobinGravel on August 10, 2021, 08:48:33 am
well thats the real bug your not supposed to be able to use ESC, it acts as an emergency quit should the game hang or something. the control setup should not have allowed the ESC key to be mapped to a control.

If you remap that button to something other than ESC the issue should resolve. I'll have to look as to why you were allowed to map it in the first place though.

I know it's wierd but sometimes I could press ESC just by put down the keyboard to the desk.

I use a cordless keyboard.

Also I was not aware ESC would quit the game until now.
Title: Re: Dragon Warrior 64 Final
Post by: Cobalt on August 10, 2021, 02:38:10 pm
Hi Cobalt
I'm not able to find Zip file with all need files of the game
I have solved manually
Thanks

@TempodiBasic  https://www.qb64.org/forum/index.php?topic=2695.0
thats where the zip is.
Title: Re: Dragon Warrior 64 Final
Post by: Cobalt on August 10, 2021, 02:45:23 pm
I know it's wierd but sometimes I could press ESC just by put down the keyboard to the desk.

I use a cordless keyboard.

Also I was not aware ESC would quit the game until now.

Well its more of a left over development thing. there is no documentation on it, its just kind of there.
You probably noticed it in the shops cause they were one of the last parts I finished. And just never removed it.
Title: Re: Dragon Warrior 64 Final
Post by: RobinGravel on August 10, 2021, 10:40:32 pm
The game quits fo no reason again by pressing Enter.

I didn't touch ESC key.

I think it happens when pressing Enter quickly.
Title: Re: Dragon Warrior 64 Final
Post by: Cobalt on August 11, 2021, 12:33:55 pm
The game quits fo no reason again by pressing Enter.

I didn't touch ESC key.

I think it happens when pressing Enter quickly.

what do you have your controller config set up as?
here is a new source too.
Title: Re: Dragon Warrior 64 Final
Post by: RobinGravel on August 11, 2021, 01:39:51 pm
Arrow keys to move the character.

Select = B

 Start = A

      B = Enter

      A = Spacebar


Still happens here in the menus.

  [ This attachment cannot be displayed inline in 'Print Page' view ]


I pressed Enter to remove menus and the game quits.

Title: Re: Dragon Warrior 64 Final
Post by: Cobalt on August 11, 2021, 02:28:44 pm
I can not get it to do any kind of out of place exit with my hardware, but I tweaked a few more locations in the code. see if its still exiting, if so I'm not sure.

Have you had any issues selecting items or spells within the menus, like has it skipped over things when using the arrow keys?
Title: Re: Dragon Warrior 64 Final
Post by: RobinGravel on August 11, 2021, 09:13:03 pm
I found a chest with no description.



Here the entrance of the cave

Title: Re: Dragon Warrior 64 Final
Post by: Cobalt on August 12, 2021, 11:22:17 am
I found a chest with no description.



Here the entrance of the cave



if that is the chest I think it is, you probably picked up the Death Necklace. which is a random chance item, shows up like 1 in 18 chance. its only purpose is to sell for like 1300g. why it didn't show I'm not sure. Did it add to your inventory? That chest's normal contents are 120g.

Hey thanks a lot for actually playing the game, your the first one to report any of these issues.
Title: Re: Dragon Warrior 64 Final
Post by: RobinGravel on August 12, 2021, 12:23:48 pm
It's the first time I opened this chest.

Nothing is added to the inventory.
Title: Re: Dragon Warrior 64 Final
Post by: TempodiBasic on August 12, 2021, 12:36:30 pm
@Cobalt  #32
Thanks I have got it the same evening when I post.
Very gentle.
Title: Re: Dragon Warrior 64 Final
Post by: RobinGravel on August 12, 2021, 12:51:06 pm
I also noted there are some differences between DW64 and Nes with tiles/backgrounds.

It reminds me DW2 from NES.

Some musics in your game are in stereo.

Is NES a stereo system?


Note: I can't put images in my post. :(

Title: Re: Dragon Warrior 64 Final
Post by: Cobalt on August 25, 2021, 01:56:46 pm
It's the first time I opened this chest.

Nothing is added to the inventory.

Actually, if you looked at your ITEMs you would see a glitch in the item window, that is from the 'invisible' item. Apparently for what ever reason the Death Necklace isn't being loaded in to the item array. or the index is wrong.  You can sell the blank item for 0gp too!

I also noted there are some differences between DW64 and Nes with tiles/backgrounds.

It reminds me DW2 from NES.

Some musics in your game are in stereo.

Is NES a stereo system?

The tiles and sprites are what I saw playing the game on the original NES console.(image below) Which I believe is different from the Japanese(and perhaps other regions) version of the game, which were simpler. For whatever reason.

As for audio, its a clone not an emulator. So all the audio is recorded 2 channel, 16bit, 44100hz. I believe the original hardware was Mono 8bit, at something like 11025hz(or less?).
Title: Re: Dragon Warrior 64 Final
Post by: Cobalt on September 02, 2021, 11:01:15 am
Several bug fixes thanks to Robin.
and a couple of others.

Probably the last update for 2021. but who knows.

No major changes so previous saved games are still good, if you have opened the 'blank' chest you will need to sell the 'blank' item from your inventory to free the space up.

Still some graphical bugs(main one is the background fails to black out in dungeon when monster flees, displaying monster over dungeon).
Title: Re: Dragon Warrior 64 Final
Post by: RobinGravel on September 02, 2021, 10:38:47 pm
The 'invisible' item worths nothing?

  [ This attachment cannot be displayed inline in 'Print Page' view ]  


Also in the menu when selling, the cursor moves too fast to select items.
Title: Re: Dragon Warrior 64 Final
Post by: Cobalt on September 05, 2021, 11:10:18 am
The 'invisible' item worths nothing?

Afraid so. the index for that item is &H00, which is the 'nothing' item. and has no value, as well as no name.
and rather than corrupting the save data, I opted to just leave it as such.

Also in the menu when selling, the cursor moves too fast to select items.

Oh I thought that was corrected(asked about it back on reply #37). Make sure you have the latest BAS file, but I'll look at it again.