Posted: 14th Jul 2011 0:23
Ok so hopefully a simple question, I've been working on my first full DBPro game and have a bit of existing code. For the most part is this interchangable with the AppGameKit Tier 1 code? Meaning, will I be able to copy it over, replace various DBPro commands like SET SPRITE ... with their AppGameKit equivalent, or am I going to get stuck starting over? This question is probably best for someone with some hands on experience already with the beta. Thanks.
Posted: 14th Jul 2011 0:49
Yes and No. I know, not very helpful.

You will likely be able to take small sections at a time and recode them in AppGameKit fairly easy. For example, to load an image, make a sprite out of it, scale it by 50% and position it in the center of the screen would look like this.

+ Code Snippet
rem sw and sh would be variables you set for the resolution width and height

iTest = LoadImage("TestImage.png", 0)
sTest = CreateSprite(iTest)
SetSpriteScale(sTest, 0.5, 0.5)
SetSpriteOffset(sTest, GetSpriteWidth(sTest)/2, GetSpriteHeight(sTest)/2)
SetSpritePositionByOffset(sTest, sw/2, sh/2)



Text is another area that is very different from DBPro, but again they've made it so easy it wont take much time to convert.

To create a text object using your custom bitmap font, set it's size, set it's color, and position it just above center.

+ Code Snippet
iFont = LoadImage("MyFont.png", 0)
tTest = CreateText("This is a test.")
SetTextFontImage(tTest, iFont)
SetTextColor(tTest, 255, 64, 64, 255) rem Red Green Blue Alpha
SetTextSize(tTest, 24)
SetTextOffset(tTest, GetTextTotalWidth(tTest)/2, GetTextTotalHeight(tTest)/2)
SetTextPositionByOffset(tTest, sw/2, sh/2 - 24)



You can see more source code in the Asteroid Blast thread. One or two of the commands have changed a little since I posted that, but nothing to major.
Posted: 14th Jul 2011 2:41
I've been thinking about writing a converter/optimizer tool, where one of the functions would be to translate DBPRO source code into AGK tier 1 and/or tier 2.
Posted: 14th Jul 2011 3:54
Hmm, my game is mostly sprites, seems like this won't be too difficult. Thanks for the input.

Btw KISTech, just noticed you're in Portland, I'm from there originally, Seattle now.
Posted: 14th Jul 2011 5:51
Yay, another Oregonian on the boards!! There's another near Coos Bay.

I moved up to Portland from California in 1982. We lived in Southest, on the edge of Gresham.

Moved away in 90 for school and a job, then moved back in 96. Just couldn't stay away.
Posted: 15th Jul 2011 17:02
Such a tool would be very useful to DBPro users moving projects over to AGK. Let me know if you decide to make it.

Rick