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.

Newcomers AppGameKit Corner / Just download AGK for Linux - Need Tier2 example(s) to get going

Author
Message
Andries
9
Years of Service
User Offline
Joined: 7th Mar 2015
Location:
Posted: 7th Mar 2015 16:26
I have seen some older posts on people who needed Tier2 example(s) to get going in C++ with the AppGameKit flow, but found the answers posted over there possibly outdated/unclear.

The Tier2 directory of my download does not seem to contain any 'showcase' directory, as mentioned in some other posts. In order to get going with the C++ way of making apps, I would need a documentation of the AppGameKit C++ interface and/or some corresponding examples. The 'Projects' directory contains only Tier1 examples.

Any help where I can find C++ projects to start learning from, would be greatly appreciated.

- Linux preferred
Hodgey
14
Years of Service
User Offline
Joined: 10th Oct 2009
Location: Australia
Posted: 12th Mar 2015 19:20
I haven't used AppGameKit v2 on Linux (so the following could be wrong) but the typical way that Tier 2 projects work is that there's a source file (maybe interpreter.cpp idk what it is called anymore).

Inside this source file you should see 3 functions:
void app::Begin() - called on app start up
void app::Loop() - continuously called
void app::End() - called on app exit

You'll have to design your app around these functions e.g

Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 14th Mar 2015 23:49
Hodgey has the basics correct.

You can do lots of setup and creating in the app::Begin() method, but nothing actually displays there.

And you absolutely need the agk::Sync(); at the end of the app::Loop() method, or nothing displays. That is the best place for it.

I've attached a zip file with code that shows off lots of things about Tier 2 and how things fit together.

It even shows how to use the same code on all platforms (using '#ifdef').

Cheers,
Ancient Lady

Attachments

Login to view attachments

Login to post a reply

Server time is: 2024-04-19 07:40:05
Your offset time is: 2024-04-19 07:40:05