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 / converting .dba to AGK files

Author
Message
DARKBASIC PRO 3d WORLD EDITOR
14
Years of Service
User Offline
Joined: 2nd May 2012
Location:
Posted: 11th Mar 2015 01:53
Im a beginner/intermediate programmer in DarkBasic Pro but Id like to say I lean towards beginner more so. Any how I was wondering if I made a DB program that took like a document file and line by line converted it into another document by understanding both languages...

A. Will my concept of conversion work?
B. Is it ethically wrong in any way? (Don't really think so but just making sure as I was looking for this type of thing and could not find it)
C. and if I am successful, will this be something I should sell or give away?

Appreciate feedback.. Thanks

- Infinity is Simplicity -
DARKBASIC PRO 3d WORLD EDITOR
14
Years of Service
User Offline
Joined: 2nd May 2012
Location:
Posted: 11th Mar 2015 04:41
I'm sorry I forgot to mention AppGameKit (.cbp) to .dba and back is what I was referring to

- Infinity is Simplicity -
BMacZero
20
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ NA / USA
Posted: 11th Mar 2015 06:36
While the syntax for the two languages is very similar, the command sets available in each have large gaps relative to the other. DBP has more extensive 3D commands, matrix meshes, joystick input and FTP at a quick glance, and of course, as the newer language, AppGameKit has some new stuff like built-in sprite physics and skeletons and HTTP commands that DBP does not have.

DBP and AppGameKit are also designed for fundamentally different things. DBP focuses on PC gaming, and many games that have been made in DBP are going to be built around control schemes that are fundamentally not transferable to mobile devices - and to a lesser extent, also, AppGameKit games that are built largely around touch input may feel clunky on a PC.

Not to discourage you, though - a program that just converts the basics of the syntax and leaves out those other details could be a fun and potentially helpful project - say, for converting all those Code Snippets we have for use in AGK.


On Steam!
BatVink
Moderator
23
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 11th Mar 2015 11:43
I converted my DBPro code to AppGameKit V1, around 3,000 lines of code. The code was purely logic and static objects, sprites, images and sounds (i.e no animation, shaders, and other more advanced jiggery pokery).

I had to use Regular Expressions to do it, and it got me about 80% of the way. After that, I still had some manual messing around to do. The extra messing could possibly have been done with RegEx, but the additional effort outweighed the benefits.

I can't for the life of me find the notes I made at the time. One day they may reappear.

Quidquid latine dictum sit, altum sonatur
DARKBASIC PRO 3d WORLD EDITOR
14
Years of Service
User Offline
Joined: 2nd May 2012
Location:
Posted: 12th Mar 2015 17:00
Yes that makes perfect sense actually for I didnt consider the boundaries of the language particularly because I haven't mastered the concept of ALL commands in AGK. I did however notice that they use sprites but wasn't sure if that was how far they go. I will be purchasing the AppGameKit book sometime soon... but that leaves my theory on 3d models on the app unanswered because I play Ocarina of Time, part of the Zelda series, on a N64 emulator on my droid and it seems to be 3d model based but the emulator might be a different path considering the Zelda rom is not a .apk file.. Perhaps you can shed some light?

- Infinity is Simplicity -
DARKBASIC PRO 3d WORLD EDITOR
14
Years of Service
User Offline
Joined: 2nd May 2012
Location:
Posted: 12th Mar 2015 17:02
Thanks for the insight and also that web site seems helpful.. I will dive into it as soon as I have time

- Infinity is Simplicity -
wattywatts
17
Years of Service
User Offline
Joined: 25th May 2009
Location: Michigan
Posted: 12th Mar 2015 20:29 Edited at: 12th Mar 2015 20:30
Quote: "but that leaves my theory on 3d models on the app unanswered because I play Ocarina of Time, part of the Zelda series, on a N64 emulator on my droid and it seems to be 3d model based but the emulator might be a different path considering the Zelda rom is not a .apk file.. Perhaps you can shed some light?"

Umm.
1. You probably shouldn't speak of such things on this forum. If you're from the US it's illegal to play a rom unless you ripped it from your own cart and still own the cart, and even then it's a gray area.
2. The emulator is an APK. It's basically the android equivalent of an EXE. It loads the rom as data, the rom doesn't run by itself.
3. What does any of this have to do with AppGameKit? Was the emulator written in AppGameKit?
DARKBASIC PRO 3d WORLD EDITOR
14
Years of Service
User Offline
Joined: 2nd May 2012
Location:
Posted: 13th Mar 2015 04:55
Quote: "Umm.
1. You probably shouldn't speak of such things on this forum. If you're from the US it's illegal to play a rom unless you ripped it from your own cart and still own the cart, and even then it's a gray area.
2. The emulator is an APK. It's basically the android equivalent of an EXE. It loads the rom as data, the rom doesn't run by itself.
3. What does any of this have to do with AppGameKit? Was the emulator written in AppGameKit?"


Well I haven't purchased AGK2 yet but I plan on making games for the phoneand I haven't seen commands in AppGameKit geared towards 3d models yet as I'm kind of fresh in AppGameKit but there are ways to convert AppGameKit code or .cbp to .apk... What I'm working on is a 3d game that simulates life with a multiplayer schenario and I'm looking to use 3d models..

- Infinity is Simplicity -
DARKBASIC PRO 3d WORLD EDITOR
14
Years of Service
User Offline
Joined: 2nd May 2012
Location:
Posted: 13th Mar 2015 04:55
Quote: "Umm.
1. You probably shouldn't speak of such things on this forum. If you're from the US it's illegal to play a rom unless you ripped it from your own cart and still own the cart, and even then it's a gray area.
2. The emulator is an APK. It's basically the android equivalent of an EXE. It loads the rom as data, the rom doesn't run by itself.
3. What does any of this have to do with AppGameKit? Was the emulator written in AppGameKit?"


Well I haven't purchased AGK2 yet but I plan on making games for the phone and I haven't seen commands in AppGameKit geared towards 3d models yet as I'm kind of fresh in AppGameKit but there are ways to convert AppGameKit code or .cbp to .apk... What I'm working on is a 3d game that simulates life with a multiplayer schenario and I'm looking to use 3d models..

- Infinity is Simplicity -
DARKBASIC PRO 3d WORLD EDITOR
14
Years of Service
User Offline
Joined: 2nd May 2012
Location:
Posted: 13th Mar 2015 05:07
I just started a week ago and I plan to change some of the names of the places if I want to sell because I'm not trying to get in trouble but I dont think it is illegal to work on it and not distribute... here's a screen shot of the area...

- Infinity is Simplicity -
Kevin Picone
23
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Australia
Posted: 13th Mar 2015 06:31
Quote: "A. Will my concept of conversion work?"


Successful code conversion is all about matching behaviors/dependencies. Assuming source and target languages have similar functionality, then your conversion tool only needs to skim through the input code and output equivalent code for the target. You can get away with some replacements for the bulk of the work. Depending upon the complexity of the input sources the resulting quality will vary greatly.

In the real world though, even languages might be syntactically similar, they can be very functionality dissimilar. This where you need to fill the gaps and invent solutions to recreate/emulate behaviors in the target where no direct translational exists, which is going to be often. Moreover there's no guarantee they apply the same precedence, which will change the behavior of some expressions.


Example:

The vast majority of BASIC dialects include traditional string functions variations such as Instr$(), Replace$(), Left$(), Mid$(), Right$() etc.. so theoretically we can safely assume these would behave the same between BASIC languages. Unfortunately that's not the always the case, as some implementations have reversed parameters with slightly different behaviors given the same input.

When situations like parameter order occur you rearrange the expression, or simple wrap up a emulation function.

So if the source Instring parameters are Pos=Instring(HeyStack$,Needle$) and the target is Pos=Instr(Needle$,HeyStack$). You could include a function in the outsput that emulate the input codes format/behavior, least then you don't have to man handle the expression.




Quote: "
B. Is it ethically wrong in any way? (Don't really think so but just making sure as I was looking for this type of thing and could not find it)
"


No.

Quote: "
C. and if I am successful, will this be something I should sell or give away?
"


It depends on the output quality. It'd be a hard sell if the translation doesn't produced ready to run code in the majority of cases though, which is going to take a heavy amount of work! The last one I wrote, I just gave away, since the scope of the source language is way beyond my interest in it.

Code Conversion Tools (Convert Amos To PlayBASIC)

DARKBASIC PRO 3d WORLD EDITOR
14
Years of Service
User Offline
Joined: 2nd May 2012
Location:
Posted: 24th Mar 2015 12:42
Thanks for your reply!!! Saved me some time as I have a habit of creating projects larger than life!!! I might go back to this though as I haven't started much (50-60 lines)

- Infinity is Simplicity -

Login to post a reply

Server time is: 2026-07-05 17:13:14
Your offset time is: 2026-07-05 17:13:14