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.

Work in Progress / Magic World - DB Pro version

Author
Message
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 26th Aug 2004 01:57 Edited at: 26th Aug 2004 02:13
It's well on the way, so it warrants a thread here now. I will need assistance at some point, hopefully anyone with any interest in this will keep checking back to see if they can answer my questions.

For those interested, the original thread by Robin King, the author, is here, with a link to the source:

http://forum.thegamecreators.com/?m=forum_view&t=25138&b=10

Any initial thoughts appreciated. My goal is to port it to DB Pro, so that Advanced Terrain can be added.

I want to start by thanking Robin King for a fantastic product, and for making the source available to all.

BatVink
http://biglaugh.co.uk/catalog AMD 3000+ Barton, 512Mb Ram, 120 Gig Drive space, GeForce 5200 FX 128 Mb, Asus A7N8X Mobo.
Terms & Conditions apply
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 26th Aug 2004 02:13
Variable Names
This is a Blue IDE thing. Blue doesn't cope very well with variable names the same as command names. Which is good in my opinion.

RGBR => RGBRR
RGBG => RGBGG
RGBB => RGBBB

Missing Media
Robin.bmp is missing. Created a simple graphic. It appears in "about the Author".

The Mouse
This was a problem. It moved left and right, but it wouldn't move up and down.

I had this thought in the back of my mind that mousemovex and mousemovey lose their values once you've queried them. So I found the first reference to them in the main loop, and loaded them into 2 variables. Everywhere else, I reference the variables instead of the commands.
Eventually found all references to mousemovey(), replaced all, and it now runs smoothly.
This may cause problems elsewhere, in sub-loops, but I'll deal with them as they arise.

Functions
Magic World doesn't use functions. This is my prefered method of coding, so I will be moving functionality block by block as and when possible. I obviously only want to do this once I know the specific code works in Pro, so it will be an "as and when" process to the very end.

The Initialisation and Splash screen are moved. Loading resources has also moved. I've discovered in this process that DB Pro doesn't take kindly to DATA statements in functions. Or maybe it's in include files, I don't know at the moment. So DATA statements will, for now, be dispersed across the code. And there is a lot of them!

Variables
In order to allow functions to run as expected, and also to consolidate declaration of variables, I have started to move them into a global declaration area.

I'm also moving the initialisation of this data too. Again, it's down to the way I like to code, not because of technical issues.

Static Objects
Static Object code removed. This is a DB Classic thing, not available in Pro.
Because I can't test this yet, I've left in the Load and Save routines - it just doesn't load static objects or create new ones!

This will also aid backward compatibility.

BatVink
http://biglaugh.co.uk/catalog AMD 3000+ Barton, 512Mb Ram, 120 Gig Drive space, GeForce 5200 FX 128 Mb, Asus A7N8X Mobo.
Terms & Conditions apply
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 26th Aug 2004 02:17 Edited at: 26th Aug 2004 02:17
The program now runs

All of the work in the previous post was needed to get Magic World onto it's legs in DB Pro. It doesn't all work yet, but it's standing.

Basic Testing
A few basic tests show it's working. I can add Matrices, resize them, deform them, move the camera, change from wireframe, add basic objects and a few other things.

I can also see some things need work. The pointer and height markers are colourless. The Load/Save box crashes the program. "About the Author" crashes too.

One step at a time...

BatVink
http://biglaugh.co.uk/catalog AMD 3000+ Barton, 512Mb Ram, 120 Gig Drive space, GeForce 5200 FX 128 Mb, Asus A7N8X Mobo.
Terms & Conditions apply
Peter H
20
Years of Service
User Offline
Joined: 20th Feb 2004
Location: Witness Protection Program
Posted: 26th Aug 2004 02:18
looks interesting

"We make the worst games in the universe."
David T
Retired Moderator
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: England
Posted: 26th Aug 2004 02:29
How fast you got it?

Get 15 new commands, all the date / time commands left out of DBPro for free!
DOWNLOAD PLUGINS HERE: http://www.davidtattersall.me.uk/ and select "DarkBasic"
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 26th Aug 2004 02:39
Quote: "How fast you got it?"


My specs are below. When first loaded I get 230 FPS.

BatVink
http://biglaugh.co.uk/catalog AMD 3000+ Barton, 512Mb Ram, 120 Gig Drive space, GeForce 5200 FX 128 Mb, Asus A7N8X Mobo.
Terms & Conditions apply
David T
Retired Moderator
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: England
Posted: 26th Aug 2004 02:45
One word.

Nice.

Get 15 new commands, all the date / time commands left out of DBPro for free!
DOWNLOAD PLUGINS HERE: http://www.davidtattersall.me.uk/ and select "DarkBasic"
Turoid
21
Years of Service
User Offline
Joined: 1st Nov 2003
Location: The Netherlands
Posted: 26th Aug 2004 02:51
how much percent is is done ? I liked MW from dbc, will it have the same interface?

syntax error??? it isn't an error, it is a feature

BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 26th Aug 2004 03:21
% converted - probably about 90%. But it's the last few percent that always take the most time. I have not fooled myself into thinking it's nearly finished.

% updated with new functionality - 0%. It will be a work in progress. As well as the advanced terrain stuff, I want to iron out a few niggles, such as making the paths relative, not absolute as they seem to be now.

Will it have the same interface? I have no intention of fixing something that isn't broken. Having said that, the loading and saving boxes don't work yet. I also think the text input cold be a bit more proactive, lots of people think it's "crashed" when it's waiting for input.
Maybe Rob K's blue GUI could spruce it up a bit, and fix the bits that aren't working a lot quicker. I don't have Blue GUI, so I'll have to look into it.

BatVink
http://biglaugh.co.uk/catalog AMD 3000+ Barton, 512Mb Ram, 120 Gig Drive space, GeForce 5200 FX 128 Mb, Asus A7N8X Mobo.
Terms & Conditions apply
Turoid
21
Years of Service
User Offline
Joined: 1st Nov 2003
Location: The Netherlands
Posted: 26th Aug 2004 04:24 Edited at: 26th Aug 2004 04:27
Quote: "
Having said that, the loading and saving boxes don't work yet."


sorry i didn't read the thread completly

syntax error??? it isn't an error, it is a feature

Peter H
20
Years of Service
User Offline
Joined: 20th Feb 2004
Location: Witness Protection Program
Posted: 26th Aug 2004 04:27
hehe, fast editing there jopie

"We make the worst games in the universe."
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 27th Aug 2004 19:49
Text based screens / windows

There are a few screens which rely on text. I've used the "About the Author" screen to test the requirements needed for these functions.

Firstly, it's important to realise Text works very differently in Pro. In Classic, it was "Persistent". That is, once it was on the screen, it stuck. In pro, if you want text to "Stick", you must output it every cycle.

This is not good practice in my opinion. I prefer to use Sprites for text that remains constant. So I have SPRITEd the Author screen, and simply put the sprite to the screen. This is done by making a bitmap, composing the content, grabbing an image and SPRITEing it.

Sprite priority
Now I am using sprites more than in the original product, I need to consider priority. I found with the author screen that the pointer wasn't visible. And the other problem is that right now I don't know exactly where the pointer sprite is first initiated. So I've created a dummy pointer, in order to set it's priority in the program initialisation.

The next big thing should be windows - load and save, filter box etc. These will be different again from the above scenario, because the text is dynamic.
I've ordered Rob Knight's Blue GUI, I think it will add to the ease of use. So these will have to wait for the download - I think Rob must be on holiday right now.

BatVink
http://biglaugh.co.uk/catalog AMD 3000+ Barton, 512Mb Ram, 120 Gig Drive space, GeForce 5200 FX 128 Mb, Asus A7N8X Mobo.
Terms & Conditions apply
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 28th Aug 2004 00:32
Colouring Objects
I thought this wasn’t working. I spent a lot of time debugging this…it worked all along! The lesson learnt – always check how the program worked before you started messing.
The process is: Right-click colour selector, change sliders, click the “Sampler” box to apply.

Conclusion: The colour selector and application works fine.

BatVink
http://biglaugh.co.uk/catalog AMD 3000+ Barton, 512Mb Ram, 120 Gig Drive space, GeForce 5200 FX 128 Mb, Asus A7N8X Mobo.
Terms & Conditions apply
Turoid
21
Years of Service
User Offline
Joined: 1st Nov 2003
Location: The Netherlands
Posted: 28th Aug 2004 01:42
looking great, cant wait to use this!!

syntax error??? it isn't an error, it is a feature

BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 31st Aug 2004 20:03
Load/Save boxes
Well, I finally got this working, but it's not pretty. Again, it's down to the difference in "persistent" 2D graphics. The result is a partially drawn screen, showing the essential load/save box but a shabby background.

I now have Blue GUI, so I will use the standard Windows Load/Save functionality, once I've deciphered exactly what is happening in the original MW source. This would make it difficult for othyers to modify in the future, so I will attempt to leave the original code in place, and use a flag to determine whether it uses old or new.

BatVink
http://biglaugh.co.uk/catalog AMD 3000+ Barton, 512Mb Ram, 120 Gig Drive space, GeForce 5200 FX 128 Mb, Asus A7N8X Mobo.
Terms & Conditions apply
David T
Retired Moderator
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: England
Posted: 31st Aug 2004 23:29
Sounding good

Get 15 new commands, all the date / time commands left out of DBPro for free!
DOWNLOAD PLUGINS HERE: http://www.davidtattersall.me.uk/ and select "DarkBasic"
Mr Underhill
21
Years of Service
User Offline
Joined: 23rd Apr 2003
Location: The Forgotten Worlds...
Posted: 1st Sep 2004 01:47
Alright, BatVink!
I was going to do something similar to what you're doing, but I gave up a while ago (the mouse controls were buggy for some reason).

It's good to see that someone is still up to the task. Magic World was awesome in DBC, and I'm sure your version will be top-of-the-line.

Keep it up, man! I want to try it out!

"You don't need a reason to help people."-Zidane (FFIX)
Jade Phoenix Software is on the way! Get ready for the rebirth of gaming!
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 1st Sep 2004 02:25 Edited at: 1st Sep 2004 02:27
Quote: "the mouse controls were buggy for some reason"


Oh yes! Here's my quote from above...

Quote: "I had this thought in the back of my mind that mousemovex and mousemovey lose their values once you've queried them. So I found the first reference to them in the main loop, and loaded them into 2 variables. Everywhere else, I reference the variables instead of the commands.
Eventually found all references to mousemovey(), replaced all, and it now runs smoothly.
This may cause problems elsewhere, in sub-loops, but I'll deal with them as they arise.
"


That alone was about 2 hours work. I was right, it did cause problems elsewhere, but they were easily fixed. At the moment I have a little flashing light when I'm in the main loop. When it stops flashing, I know I've left the main loop, and the mouse may start acting up.

BatVink
http://biglaugh.co.uk/catalog AMD 3000+ Barton, 512Mb Ram, 120 Gig Drive space, GeForce 5200 FX 128 Mb, Asus A7N8X Mobo.
Terms & Conditions apply
Peter H
20
Years of Service
User Offline
Joined: 20th Feb 2004
Location: Witness Protection Program
Posted: 1st Sep 2004 02:52
Quote: "mousemovex and mousemovey lose their values once you've queried them"

i'll have to remember that



"We make the worst games in the universe."
Mr Underhill
21
Years of Service
User Offline
Joined: 23rd Apr 2003
Location: The Forgotten Worlds...
Posted: 1st Sep 2004 08:19 Edited at: 1st Sep 2004 08:20
Ahh...that sounds about right...
except that x-coordinate movement worked fine, but y-coordinate didn't...

"You don't need a reason to help people."-Zidane (FFIX)
Jade Phoenix Software is on the way! Get ready for the rebirth of gaming!
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 1st Sep 2004 08:36
Yes, that is because the code does far more with mousemovey() than mousemovex(). There is a lot of checking y to establish whether the mouse is in the 3D area or the menu, and if it's in the menu, which row of buttons.

BatVink
http://biglaugh.co.uk/catalog AMD 3000+ Barton, 512Mb Ram, 120 Gig Drive space, GeForce 5200 FX 128 Mb, Asus A7N8X Mobo.
Terms & Conditions apply
Zero Blitzt
20
Years of Service
User Offline
Joined: 18th Jan 2004
Location: Different Stages
Posted: 1st Sep 2004 10:31
What do you need help with at this point?

This project = important


Come to #coding. We promise we wont kick you!
DISCLAIMER: Promises may not actually be upheld.
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 1st Sep 2004 16:39
I think I'm Ok at the moment Zero. My task list has just 2 items on it at the moment:

1. Convert the buttons to BlueGUI
2. Convert the screen coordinates so that I can extend it beyond 640 x 480.

Then, I can release V 0.99.

Why BlueGUI? Well, at the moment all of the button coordinates are hard-coded. The code that checks for the button being pressed goes along the lines of:

If x > 137 and x < 159 and y > 441 and Y < 459...

To make the conversion easier, I can change the buttons to BlueGUI, and put them on a parent panel. Once on a panel, I can reposition them all in one go.

Why reposition them, I hear the crowd roar? Simple...if I want to allow a higher resolution, the buttons have to move! Like I say, they are hard-coded positions, so they will always start at height 399 right now.

Someone could save e some time if they can tell me if

1. The Blue GUI buttons respond to right-clicks and double-clicks
2. I can still use Mouse Clicked() in standard DB Pro code whilst clicking on a BlueGUI button. Or does BlueGUI "steal" the clicks?

BatVink
http://biglaugh.co.uk/catalog AMD 3000+ Barton, 512Mb Ram, 120 Gig Drive space, GeForce 5200 FX 128 Mb, Asus A7N8X Mobo.
Terms & Conditions apply
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 4th Sep 2004 07:21
Colouring Objects II

I have now implemented the Color Picker from BlueGUI. If anyone can answer the following, it will help...

1. Can you detect if the Colotr Picker Cancel button has been pressed? I get a colour value of 0, but this could equally be a legitimate request for the colour black.

2. Can you pass the current colour to the colour picker? At the moment, it always defaults to black, but yoiu may want to start with the current colour, and adjust it slightly.


Load/Save boxes
This is now fully and successfully implemented using BlueGUI.

BatVink
http://biglaugh.co.uk/catalog AMD 3000+ Barton, 512Mb Ram, 120 Gig Drive space, GeForce 5200 FX 128 Mb, Asus A7N8X Mobo.
Terms & Conditions apply
Mattman
21
Years of Service
User Offline
Joined: 5th Jun 2003
Location: East Lansing
Posted: 5th Sep 2004 13:15
cool ,good luck with this!

[url='http://www.ufanz.com/teams/tracking.asp?ti=689&mi=97723][/url]
Turoid
21
Years of Service
User Offline
Joined: 1st Nov 2003
Location: The Netherlands
Posted: 8th Sep 2004 03:53
when do you think that its finished ? really looking forward to use it

syntax error??? it isn't an error, it is a feature

BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 8th Sep 2004 08:05
I spend time on it when I can...

work...my laptop will compile it, but won't run it ...only 16 meg graphics card.

home...home at 7pm, eat, play with kids, put them to bed, tidy up, do baby bottles, talk to missus(!), watch a bit of telly...

I am adding 2 things right now: An ini file, and allowing different screen resolutions. The ini file will allow me to test without recompiling all of the time, so it will speed up development in the long run.
I've found you can't run the windows ini DLL functions directly from DB Pro in Windows XP. It just doesn't lke it. So I'm now using TCA's plug-in (TCA, please document the fact that you need the Maths plugin to run the ini plugin too!).

I'm now sticking with the original menus for now. I've got most of it repositioning with a change in screen size.

The hardest part of screen resizing is the position of the "hand" and the actual 3D position in space. It's out of Sync right now.

BatVink
http://biglaugh.co.uk/catalog AMD 3000+ Barton, 512Mb Ram, 120 Gig Drive space, GeForce 5200 FX 128 Mb, Asus A7N8X Mobo.
Terms & Conditions apply
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 9th Sep 2004 09:16
It's silly O' Clock, but progress has been made.

Ini file reading and writing working (thanks to TCA's plugin).
Only used for screen resolution now, but will be used more extensively later.

Screen resizing working to a good degree. There is a slight mismatch of the "hand" and the pointer at larger resolutions, but it's manageable. Checking the original resolution, there is a slight "wandering" of the two even at 640 x 480.

Come sweet slumber, enshroud me in thy purple cloak.

BatVink
http://biglaugh.co.uk/catalog AMD 3000+ Barton, 512Mb Ram, 120 Gig Drive space, GeForce 5200 FX 128 Mb, Asus A7N8X Mobo.
Terms & Conditions apply
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 14th Sep 2004 21:28
Now available for beta testing:

http://forum.thegamecreators.com/?m=forum_view&t=39152&b=8

BatVink
http://biglaugh.co.uk/catalog AMD 3000+ Barton, 512Mb Ram, 120 Gig Drive space, GeForce 5200 FX 128 Mb, Asus A7N8X Mobo.
Terms & Conditions apply

Login to post a reply

Server time is: 2024-11-22 17:47:13
Your offset time is: 2024-11-22 17:47:13