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 / Dynamic memory

Author
Message
haliop
User Banned
Posted: 14th Aug 2012 13:11
in basic how do you do that?

in C++ i use vectors but i dont know whats the equalint on basic..
im reading step by step the AppGameKit help document and was wondering

Hodgey
14
Years of Service
User Offline
Joined: 10th Oct 2009
Location: Australia
Posted: 14th Aug 2012 13:16
You can resize arrays by DIM-ing it again. E.g



haliop
User Banned
Posted: 14th Aug 2012 14:29
ohh nice!! cant do that in C++ with arrays

Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 14th Aug 2012 16:33
Just be aware that resizing a mult-dimensioned array does not work properly in AppGameKit right now.

And, you cannot put arrays in user defined types (UDTs), but you can make arrays of UDTs.

Cheers,
Ancient Lady
AGK Community Tester
haliop
User Banned
Posted: 14th Aug 2012 17:01
why dont they work? is it a bug in AppGameKit?

Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 14th Aug 2012 18:49
Redimming a multi-dimensioned array is a known bug, reported, confirmed and hopefully to be fixed.

Not using an array in a UDT is a known issue and not likely to be fixed. The problem is a memory allocation one. Since an array can be redimmed, there is no way to know how big the UDT is and therefore no way to reliably allocate stuff, especially if you make an array of the UDTs.

Cheers,
Ancient Lady
AGK Community Tester
haliop
User Banned
Posted: 14th Aug 2012 20:15
ok , well for now im trying to think of a very easy game to create still have no concrete idea just want to know AppGameKit basic to master it a bit and then turning to C++ which im better at.

actually learning basic is really easy i am super impressed with it.
it is so easy

Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 14th Aug 2012 21:49
If you are good with C++, start with Tier 2 (native, aka C++).

You will be much happier in the long run and won't be looking for ways to get around stuff.

The only issue with Tier 2 (that I've run into) is that you can't call Sync() anywhere you want to to update the display.

In Tier 2 you have access to all the same commands as Tier 1 (Basic) and all the power of proper OOP, standard strings, lists, etc..

JimHawkins will try to suggest you go with AppGameKit Pascal (unofficially Tier 3). If you are a proficient Pascal programmer, that might be your best choice.

Cheers,
Ancient Lady
AGK Community Tester
haliop
User Banned
Posted: 14th Aug 2012 22:06
i havent touched pascal in yearsss

and i will probabaly go native soon but i want to learn basic a bit see whats it all about and if i can create a small cool game.

Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 14th Aug 2012 22:53
Happy Programming!

AGK is fun to play with.

Cheers,
Ancient Lady
AGK Community Tester
JimHawkins
14
Years of Service
User Offline
Joined: 26th Jul 2009
Location: Hull - UK
Posted: 15th Aug 2012 00:28
Quote: "JimHawkins will try to suggest you go with AppGameKit Pascal (unofficially Tier 3). If you are a proficient Pascal programmer, that might be your best choice."


I'm not saying anything. Each to their own.

-- Jim
Hodgey
14
Years of Service
User Offline
Joined: 10th Oct 2009
Location: Australia
Posted: 15th Aug 2012 11:59
You could put it in your signature Jim.

JimHawkins
14
Years of Service
User Offline
Joined: 26th Jul 2009
Location: Hull - UK
Posted: 15th Aug 2012 12:55
Good idea, Hodgey!

-- Jim DO IT FASTER, EASIER AND BETTER WITH AppGameKit FOR PASCAL

Login to post a reply

Server time is: 2024-05-02 06:22:42
Your offset time is: 2024-05-02 06:22:42