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 Classic Chat / Can I port DBPRO code AGK

Author
Message
Cybermind
Valued Member
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: Denmark
Posted: 20th Jul 2013 14:10 Edited at: 20th Jul 2013 14:10
I have run in to some serious troubles using DBPRO, more specific fullscreen issues, so now I am thinking of porting my game code to AppGameKit and try it there, is this possible? I only need basic commands like draw image, control input, reading of arrays and a bit of other stuff.

I have already taken a look at the trial version but I could not find a way to create several documents within the same project, how is this done?

EDIT: The headline should read "Can I port DBPRO code to AGK"

The byte chrunchers are coming...
DIVIDING BY ZERO/BECAUSE WE SUCK...
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 20th Jul 2013 14:19
hi,
drawimage can be done with drawsprite or sprites,
input with mouse/joy/touch/kye is no problem.
user defined types are a little bit special but works someway.
more files can be uses by add new file and include #include "file.agc" in main file.

here is the online docu:
http://www.appgamekit.com/documentation/
Cybermind
Valued Member
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: Denmark
Posted: 20th Jul 2013 14:42
Quote: "drawimage can be done with drawsprite or sprites"


I was hoping to avoid sprites as I have to delete those that get out of screen :-P My current code only updates visible tiles and draw them to the screen with paste image (I meant paste image in the first post, not draw image)

The byte chrunchers are coming...
DIVIDING BY ZERO/BECAUSE WE SUCK...
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 20th Jul 2013 15:53 Edited at: 20th Jul 2013 15:55
you can use 1 sprite for drawing (all your tiles) and change the pos. and image nr.
also you can use a matrix of sprites and set the images u want.
in agk you can use a virtual resolution and the sprite is used
for scaling.
SoftMotion3D
AGK Developer
19
Years of Service
User Offline
Joined: 24th Aug 2005
Location: Calgary,Alberta
Posted: 20th Jul 2013 16:11
Quote: "I was hoping to avoid sprites as I have to delete those that get out of screen "


why delete them when you can just move them?

have a look at my tile engine in this project here

it reuses the sprite tiles and adjusts the image accordingly.

http://forum.thegamecreators.com/?m=forum_view&t=206816&b=41

this game is on page 1 a few posts down (open source)

DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 20th Jul 2013 18:27
In a lot of cases it is quite easy to covert code from one to another. Apart from AppGameKit missing some commands of course, but you can normally get round this. Still, if you have a huge program, it may be a lot of work.

Cybermind
Valued Member
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: Denmark
Posted: 20th Jul 2013 22:00
Quote: "Still, if you have a huge program, it may be a lot of work"


I only have about 7.000 lines in the game itself which is the only thing that needs to be ported.

If I create an array and saves it in a program made in DBPRO, will I be able to read that array in a program made in AppGameKit?

Quote: "why delete them when you can just move them?"


The scrolling in the game is based on tiles that are pasted to screen using paste image, yes I can re-use the same sprites and move them but I still have to create a new method to use the sprites as tiles as they don't work the same way as paste image does :-P

The byte chrunchers are coming...
DIVIDING BY ZERO/BECAUSE WE SUCK...
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 20th Jul 2013 23:59
AGK does not have any commands for reading or writing arrays.

If you know the exact format of the contents of the array that was written, you can probably work out how to read it into an array in AGK. But that is something that would be done on a case by case basis.

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
basjak
14
Years of Service
User Offline
Joined: 16th Apr 2010
Location: feel like signing up for mars
Posted: 22nd Jul 2013 12:19
in fact you can do far more with DBpro rather than AGK. but AppGameKit is for multiplatform.

about DrawImage. you can use paste image, or copy bitmap ....

if you want to flash it, just use cls before.

Cybermind
Valued Member
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: Denmark
Posted: 22nd Jul 2013 13:23
Quote: "about DrawImage. you can use paste image, or copy bitmap ...."


I can't find paste image or copy bitmap in the AppGameKit documention?? If you were referring to DBPRO I am already doing that (I just replaced paste image with a2drawimage from Advanced 2D). The problem is I cannot continue using DBPPRO as I have to choose between running fullscreen and smooth but will only be able to run it on some machine or windowed fullscreen and not so smooth but will run on most machines. That is simply not good enough :-( So now I am looking for an other basic compiler that also handles arrays (as all my data is saved as arrays).

The byte chrunchers are coming...
DIVIDING BY ZERO/BECAUSE WE SUCK...
DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 22nd Jul 2013 22:07
You should be able to load your array in from DB. However, not with loadarray. You would need to open the DB file and read out the info into AppGameKit manually. It has been awhile though, not entirely sure if they are readable, although I think they are off the top of my head.
7000 lines sounds like a lot of editing to me, lol. That would constitute a rewrite for me probably, but still it would depend on the code. you can always get the main stuff you need out and rewrite it using that as your base.

Cybermind
Valued Member
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: Denmark
Posted: 22nd Jul 2013 22:18
I found PlayBASIC to suit my needs for fullscreen but I am not done porting the code yet. Right now I am having trouble writing to an empty file in DBPRO so I can read an array manually in my PlayBASIC code :-P

The byte chrunchers are coming...
DIVIDING BY ZERO/BECAUSE WE SUCK...
DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 22nd Jul 2013 22:26
Well, I don't know anything about Playbasic. Take a look at my AppGameKit editor tutorial. That has some manual file loading and saving in there. Perhaps it will help? I know DB worked in a similar fashion if you chose not to use savearray.

Cybermind
Valued Member
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: Denmark
Posted: 22nd Jul 2013 22:40
I can't find any array handling in the AppGameKit documentation

The byte chrunchers are coming...
DIVIDING BY ZERO/BECAUSE WE SUCK...
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 22nd Jul 2013 23:52
Quote: "I can't find any array handling in the AppGameKit documentation"

That is because there are no functions for array handling.

Arrays are relatively primitive in AppGameKit Basic, compared to arrays in other Basics and languages.

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
JimHawkins
15
Years of Service
User Offline
Joined: 26th Jul 2009
Location: Hull - UK
Posted: 23rd Jul 2013 17:54
I'm struggling to think of a language that has a LoadArray() method!

-- Jim DO IT FASTER, EASIER AND BETTER WITH AppGameKit FOR PASCAL
Cybermind
Valued Member
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: Denmark
Posted: 23rd Jul 2013 22:10
Quote: "I'm struggling to think of a language that has a LoadArray() method!"


I found that I can store my arrays line by line and read them line by line in PlayBASIC

The byte chrunchers are coming...
DIVIDING BY ZERO/BECAUSE WE SUCK...

Login to post a reply

Server time is: 2024-11-24 19:07:47
Your offset time is: 2024-11-24 19:07:47