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.

AppGameKit Studio Chat / [SOLVED] DB Pro to AGK coding

User Offline
Joined: 9th Dec 2022
Posted: 4th Feb 2023 01:46
Is there a guide than can show the difference in coding from DB Pro to the AppGameKit ?

db pro uses these commands --- how does AppGameKit code work to do the same thing

1] cls to clear the screen
2] wait key to wait for a key to be pressed

wait key

program waits for a key to be pressed before it ends

3] in this example

for i = 1 to 5
print ("hello world")
next i

print (a)

A$ = "test one"
print (A$)


it prints hello world
then prints test one above hello world
then prints 100 above test one

in db pro i can use command set cursor (x,y) to tell it where on the screen to print --- how does AppGameKit code do the same thing ?
also in db pro i can use the command ink rgb(100,200,30),rgb(0,0,0) to tell it what color to print in --- how does AppGameKit code do the same thing ?

4] is there a way in AppGameKit to have the editor NOT indent the coding ?

from :

print ("hello world")

to :

print ("hello world")

i have been programming db pro since the paid version 4 and i can do the programming i want to do
but when it comes to AppGameKit , the coding is WAY different and i am having a TERRIBLE time learning AGK
my mind is so conditioned to use db pro in makes my head hurt when trying to learn AGK
would be very helpful if there was a guide like a dictionary of one language to another but in my case
a guide from db pro to AGK

is there such an animal out there or a web site that has it ???

trying to learn thru youtube is going to take a long time

The author of this post has marked a post as an answer.

Go to answer

Virtual Nomad
Years of Service
Recently Online
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 4th Feb 2023 04:46 Edited at: 4th Feb 2023 05:31
This post has been marked by the post author as the answer.
i used dbpro for a few years then stopped coding altogether for a few years before i picked up AppGameKit (a few years ago). there was a transition/learning (unlearning)-curve that seemed pretty sharp which is what you're experiencing now before AppGameKit became more natural.

leading up to AppGameKit, i read (every single) post in AppGameKit Chat and got a pretty good feel for how i should go about doing things and there were a few posts similar to yours here re: migrating from DBPro to AppGameKit but nothing like a transition guide. i remember a couple years ago a DBPro user came to AppGameKit and spoke about writing one which never happened...

1 thing that took some getting used to was the fact that there are no spaces in the AppGameKit commands so i use a couple versions of "camel case" to keep my code readable. that helped me a lot where i don't believe i did that with DBPro.

meanwhile, to your direct coding questions:

1) CLS: see ClearScreen() and SetClearColor().

2) wait key: see THIS SNIPPET which is the closest functionality that i've seen. with that, don't forget a big difference between DBPro and AppGameKit is that AppGameKit is meant to be 1) written on different OSs and 2) exported to different platforms and especially mobile where there really won't be a strict "wait key" notion. instead, we have things like the snippet and notions of:

Until GetPointerPressed()

with that, you'll notice that AppGameKit tries (pretty hard and pretty successfully) to be "all encompassing" from a Desktop & Mobile perspective while you will discover some scenarios fall short (where you'll need to take advantage of the more than 1,500 commands (i believe?) to create the functionality that you might have been accustomed to in (a strictly-Windows) DBpro (single command) scenario.

3a) set cursor (x,y): AppGameKit has basic Print and PrintC (etc) functionality but no SetCursor(). instead, AppGameKit has a Text command set that is 10 times more robust than a "simple" Print command set that you are accustomed to coming from DBPro (which is pretty much used in a light "debug" manner for me until i'm ready to flesh out a set of Text Objects for a given project).

3b) ink: see SetPrintColor()

4) "have the editor NOT indent the coding": from within the Studio IDE, see Edit/Preferences then Enable Auto Indentation and Enable Smart Indentaion.

otherwise, i recommend skimming through all the command sets. you'll be able to connect some dots when it comes to DBPro vs AGK; it should also help getting your mind into "the AppGameKit lane", in general.

i'd also skim through some of the meatier posts on a given topic that might interest you, look at some of the [AGK]-tagged Code Snippets (including mine; link found in my sig), to see how some of us have been "doing things" while also being bite-sized real/working code examples (also found in the online docs for many commands (ie, see the user example for CreateText() ).

that should be enough to help get you into the thick of things. and, i hope it helps!
unfortunately, i believe i've forotten ANYTHING i might have known in DBPro so i'm no help with a transition guide. perhaps it's something you could do at some point? (take notes! (or, not ) ).

otherwise, as you have more questions, feel free to post. with that, i do recommend using the AppGameKit Discord server for a sometimes quicker response or just general chat. invite link found near the top of the first post HERE.

btw, while i mentioned a sharp learning curve for me, thankfully it wasn't a monstrous, sweeping curve. i was back on the straightaway before i knew it... and never looked back.
User Offline
Joined: 9th Dec 2022
Posted: 4th Feb 2023 07:06
Thank you very much , you have been most helpful

my head still hurts

this is going to take awhile , i keep having flashbacks to when i had my first computer --- 8088
writing like 5 - 6 command lines in basic to print simple line of text ; then i got a WILD hair up my XXX
and thought ...." i think i will try my hand at binary coding"
BAD IDEA ha ha ha
i very quickly learned that it would probably take like 5 thousand lines of codes to do the same thing i did in basic

this multi platform coding is just exhausting ; will take a great deal of reading for me
Virtual Nomad
Years of Service
Recently Online
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 4th Feb 2023 16:24 Edited at: 4th Feb 2023 16:27
you just reminded me of a couple of things.

alistair recently and kindly offered his Hands On DBPro ebooks for free. as you delve into AppGameKit you might again look for DBPro functionality/command equivalents - i (and anyone else) can refer to those books and offer work-arounds/advice in replicating.

another is the (glaring) omission in AppGameKit of MOUSEMOVEX/Y which is handy for FPS/3D cameras. the general consenses is to place the pointer in the center of the screen at the end of each loop then grab the current mouse x/y the next time around and use the differences to replicate as i've done HERE while we wait for native implementation. now, since we can (and will want to) export to other platforms (for me, mostly HTML and android, beyond WIN), you'll find that not everything works in every platform/scenario.

ie, SetRawMousePosition(640,360) won't work in HTML.

some have started modifying the .js player so maybe we'll see it implemented some day but as you've already noted in "this multi platform coding is just exhausting", be prepared to be extra creative or do some "extra" work to accomodate. ie, see the Controls instructions HERE.

so, yeah. your head will hurt. but, with AppGameKit, i've written and have been able to share a ton more than i could with DBPro, so...
Kevin Picone
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Australia
Posted: 5th Feb 2023 01:13

One thing that can be beneficial when moving code from one dialect to another is to write a wrapper of commonly used commands in the target language that use the original names.

So by picking through VM's post above you could make a CLS function that like so,

I shouldn't need to mention i'm talking concepts here; so the example may or may not run in AGK. My Point being that the community members could build a wrapper of common functionality make the transfer less tedious.

PlayBASIC To HTML5/WEB - Convert PlayBASIC To Machine Code

Login to post a reply

Server time is: 2023-09-24 23:47:22
Your offset time is: 2023-09-24 23:47:22