If this is your first visit, be sure to check out the FAQ by clicking the link above. You have to register before you can post.

If you have recently signed up, please make sure you log in so that your activity is registered. This is required for automatic promotions to work and to ensure your account is not deleted during the registration process.

AthenaOfDelphi

Moderation Process Reminder

Since this appears to be a problem, please be aware that some areas of the site are moderated. When you post to these areas, you will be told that your post is awaiting moderation.

You will not be able to see posts that you have made that are waiting to be moderated.

Do not think that because your post has not appeared that an error has occurred. If this happens an error message will be displayed (you should note this and report it in the 'Site News/Feedback' forum.

Luna Game Library - Simple & Elegant Game Programming

OVERVIEW
Luna Game Library™ (LGL) is a 2D game library for PC's running Microsoft Windows® and uses Direct3D® for hardware accelerated rendering. It's robust, designed for easy use and suitable for making all types of 2D games and other graphic simulations.

You access the features from a simple and intuitive procedural API (Luna.API) to allow you to rapidly and efficiently develop your graphics simulations. There is support for buffers, textures, sprites, sound, archives, tweeting, IAP, databases, remote highscores, video playback and much more.

You can also use the thin, object oriented framework (Luna.Framework) to manage your game projects in a more structured, oop manner. You can define your game in terms of actors, where these actors live and are managed on an actor list. These actors can interact by sending messages and do collisions. All of this can be encapsulated into an application using the game class.

Sup bro. How have you been? Hope all is well. Thanks. Yea, I forgot to mention (sorry about that) was also inspired by your projects as well. I will be working on examples and things this week. Oh, hehe, in the very beginning I had the idea of Lua integration thus the name/logo. Delphi starter is now free so it became less of a priority. Maybe at some point I may or if someone does it first.

New features added since last post:
- Further refined the highscore code
- Local and remote database support (local=SQLite3, remote=MySQL, unified as Database and DatabaseTable objecgts)
- Polygon object
- Polypoint auto-trace (can trace a sprite and apply a polygon around it. This will be used for fast polypoint collision detection)
- Sprite object (can be organized as pages (texture) and images can be defined in grid or rect format)
- FrameSpeed can be use to implement multiple timers in your project. For example you have the simulation running at 30 fps, but you want your sprite animation to update at 15 fps, you can do:

Code:

if FrameSpeed(mytimer, 15) then
begin
...
end;

- FastText can now define a range of glyphs. For example 32-127, 'tm', '(c)' are automatically defined by default. Since the unicode range is HUGE i'm using a sparse array to manage the glyphs range. It's very efficient.

Planned features to come:
- Entity object (instance of a sprite, has position, can do collision, etc)
- Actor object (instance of an entity, can live on a scene object in the game world, etc)
- State machine for actors
- More...

I'm using frame-based timing in the library. I wanted to have an efficient way to do timing where rendering and updating where decoupled and your simulation is controlled as much as possible. Ideally if your game loop can run as fast as possible while your simulation ran at a known and predictable would give your the overall best visual experience.

I expose two main routines for this: SetTargetFrameRate and GetDeltaTime. Call SetTargetFrameRate to 30, 60 fps for example and then when you call GetDeltaTime it will return a value that when you multiply by your object's speed, will try and keep them moving at the target frame rate. For example, if your game loop speed was 60 fps, GetDeltaTime would return 0.5. The timing code automatically handles and smooths out large delta time values and prevents large spikes. The end result is silky smooth motion where updating and rendering are decoupled. You get the best possible over visuals while keeping your simulation running at a known and predictable rate.

Physics, on the other hand needs to run at fixed rates. When I eventually get around to adding physics support I will then also add support for this also.

Progress continues... adding edities, scene, statemachine etc. I was looking at some very old code today and notice this certain section was just wrong. Doh! The way it was implemented in the old code base I never had any apparent problems. Hehe. But when I came across it, I could instantly see it was not correct. Made the correction and it works as expected in the new code base. Amazing. I've not looked at some of this code in 10-15 years and I am able to go right in and work with it.

Got polypoint collision detection in now. Did some test last night and I'm confident that I can get IAP (in-app purchase) integrated. For the moment, the only payment gateway will be Strip. Strip is super easy to setup and configure without all the troubles that you go through with most gateways. At the moment the fees are (2.9% + 0.30) per transaction. The process payment call will be asynchronous, calling a user defined event routine with status updates. Cool, excited to see how this works out.

When you call IAPSale, the operation will be pushed into a background thread. When completed the aEvent routine will be called and you can then check the results with the GetIAPResponseXXX routines. If the transaction was approved GetIAPResponseApproved will be true and the transaction id (which is needed for refunds etc) will be returned. When testing, simply use your test API key you get from stripe. For a real purchase use the live key.

Since you also have database support, you can store your data on a remote database, on the local filesystem, encrypted, etc., as simple or elaborate as you wish.