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 / AGK Vs DARK basic

Author
Message
Pfaber1
6
Years of Service
User Offline
Joined: 7th Jan 2018
Location: England
Posted: 9th Feb 2018 17:50
Could somebody tell me if dark basic is faster than AppGameKit and if so by how much.
hendron
8
Years of Service
User Offline
Joined: 20th Dec 2015
Location:
Posted: 9th Feb 2018 18:36
Can I ask why it matters? How much faster one language technically is than another often has little to do with how fast your game/program is going to run. Efficient programming style and resource handling will do much more for the speed of your game than simply choosing one language over another because it's faster on paper. That said, if pure technical execution speed is the only thing you're after, don't use either.

If you want to make a game in a (relatively) short amount of time, AppGameKit is a fine platform to use. DBP is fine for that purpose as well, though you'll be limited to Windows only and will be working on a platform that is not officially supported anymore.
bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 9th Feb 2018 19:39
I think that AppGameKit has now caught up with DarkBasic when it comes to 3d functions. Or am I wrong?
Scraggle
Moderator
21
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
hoyoyo80
8
Years of Service
User Offline
Joined: 11th May 2016
Location:
Posted: 10th Feb 2018 02:46
What 3d function that db had that agk dont?

Im a blitz3d user, from what i see, b3d have access to vertex level. But i never gone that far.
Pfaber1
6
Years of Service
User Offline
Joined: 7th Jan 2018
Location: England
Posted: 11th Feb 2018 17:33
Well it may just be my opinion but the faster the better.
Pfaber1
6
Years of Service
User Offline
Joined: 7th Jan 2018
Location: England
Posted: 11th Feb 2018 17:57
Been using AppGameKit for a little over a month and am now on my second game. The language is nice to use but just wish it was a bit faster. Only tried the 2d stuff so far and it does seem a tad slow compared to blitz3d that I used before. I think it would be better if it compiled into machine code rather than byte code. Maybe they can look at this in the next release. Would be good even if it just did it for PC's.
Pfaber1
6
Years of Service
User Offline
Joined: 7th Jan 2018
Location: England
Posted: 11th Feb 2018 18:16
Think if agk compiled to machine code it would be awesome. Hope someone at tgc takes this on board and does something about it.
Pfaber1
6
Years of Service
User Offline
Joined: 7th Jan 2018
Location: England
Posted: 11th Feb 2018 18:59
I suppose maybe I should try and learn the c++ but don't really want to. Don't really know where to start.
hendron
8
Years of Service
User Offline
Joined: 20th Dec 2015
Location:
Posted: 11th Feb 2018 19:49
Perhaps give PureBasic a look if you haven't already. It's not quite as straight forward as AppGameKit for game dev, but it may be more in line with what you're looking for. AppGameKit Tier 1's biggest advantage is how much it simplifies simultaneous development on multiple desktop and mobile platforms. Of course that convenience comes with some compromises . Still, I'd suggest looking for any possible ways to optimize your code and resource management before jumping ship altogether, but that's just me.
Pfaber1
6
Years of Service
User Offline
Joined: 7th Jan 2018
Location: England
Posted: 11th Feb 2018 20:20
Not jumping ship just now . To be honest I love AppGameKit and maybe I'm just being picky about the speed.
appymedia
9
Years of Service
User Offline
Joined: 24th Jul 2015
Location:
Posted: 11th Feb 2018 20:36 Edited at: 11th Feb 2018 20:36
Whilst the AppGameKit C lib is an obvious stop for a performance bump I've often thought it would be nice to have a solution that the AppGameKit IDE converts your Tier 1 Basic source code / bytecode into C and compiles it for you. The C lib is mapped almost identically so I'd hope it wouldn't be that hard. Guessing most of the work is in working with the build tools for each platform. Maybe TGK can offer a cloud build solution and charge a couple of quid a month or something. GM:S does this already and compiles locally, maybe TGC can see how they do it for a reference point or something.

This way those without the tech chops can enjoy true native speed whilst those that need an odd native thing can go full Tier 2. Tier 1.5 anyone?
appymedia
9
Years of Service
User Offline
Joined: 24th Jul 2015
Location:
Posted: 11th Feb 2018 20:39
Sidenote can we see how long is spent on non AppGameKit lib code (Basic or C) )anywhere for each frame? That way we can see just how much time the interpreter is taking, I'm pretty sure the AppGameKit lib is super fast and more GPU bound except for the physics stuff.
appymedia
9
Years of Service
User Offline
Joined: 24th Jul 2015
Location:
Posted: 11th Feb 2018 20:49
Also, if TGC don't want to start messing with build pipelines on peoples PC's and so on I'd be interested in seeing how much faster a dedicated scripting language like LUA might be.

On most platforms you use the JIT version which would be super fast compared to the current basic implementation. Little lesser on those that require AOT compiling but still faster then the built-in Basic at a guess. Could still have support for fast mobile players for dev etc and so on.

Other LUA engines like Defold and Corona pull it off pretty well. Be a great addition for those that want to structure their code 'properly' etc. Come on in, start with Basic, proceed to LUA and then finally C. Be a good sales pitch for educational purposes as well which I know TGC are involved in.

Tier 1.25 ;p
Pfaber1
6
Years of Service
User Offline
Joined: 7th Jan 2018
Location: England
Posted: 18th Feb 2018 18:09
Well I am new to app game kit and decided to take a look at how to speed things up. Had a play around with the code with some success then turned my attention to the FPS setting. Set it to 300 and it's running perfectly. Tried it on 600 and it's way too fast. I apologize for saying AppGameKit isn't fast enough . The problem was with my programming. Does anybody know the fastest setting the FPS can be set to. ? Just wondering. Anyway have a nice day.
hendron
8
Years of Service
User Offline
Joined: 20th Dec 2015
Location:
Posted: 18th Feb 2018 18:23
Setting the sync rate to 0 will uncap the FPS. A common (almost universal these days) technique is to uncap the FPS and implement timer based movement, so that your game runs at the same relative speed at any frame rate. A forum search for timer based movement will reveal quite a few threads on the subject.
Pfaber1
6
Years of Service
User Offline
Joined: 7th Jan 2018
Location: England
Posted: 18th Feb 2018 18:34
Thanks for that that bit of knowledge might come in handy..
Pfaber1
6
Years of Service
User Offline
Joined: 7th Jan 2018
Location: England
Posted: 18th Feb 2018 19:11
I noted that at 300 FPS my GPU was on 80 percent and at 600 FPS my GPU was on 97 percent. I've got a 2 gigabyte radeon R7 240 graphics card which I should think is pretty average by today's standards.
CJB
Valued Member
20
Years of Service
User Offline
Joined: 10th Feb 2004
Location: Essex, UK
Posted: 21st Feb 2018 08:34
Your monitor can only display around 60 frames per second, so having your game render 600 frames per second is wasting a lot of resources (but handy for benchmarking). You can lock your game refresh rate to the monitor refresh rate using SetVSync(1) which can help prevent tearing, but you need to use timer based movement so that your game runs at the same speed regardless of frame rate.
appymedia
9
Years of Service
User Offline
Joined: 24th Jul 2015
Location:
Posted: 21st Feb 2018 08:56
How common are monitors above 60hz now? I know they exist with 100hz and 120hz if I remember right. I'm guessing this is more for the 1st person shooty online guys that do love a good FPS.... My FPS is bigger then yours! No, mine is! I'm too old for it, 50hz PAL or if I'm feeling 'crazy' 60hz
Pfaber1
6
Years of Service
User Offline
Joined: 7th Jan 2018
Location: England
Posted: 21st Feb 2018 11:04
Appreciate what you are saying but 300 FPS is way quicker than 60 FPS.
Pfaber1
6
Years of Service
User Offline
Joined: 7th Jan 2018
Location: England
Posted: 21st Feb 2018 11:20
I thought the same that 60 FPS would be the limit but this most definitely is not the case.
Mobiius
Valued Member
21
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 21st Feb 2018 14:22
Quote: "t 300 FPS is way quicker than 60 FPS."

I don't think we get your point?
TomToad
6
Years of Service
User Offline
Joined: 6th Jan 2018
Location:
Posted: 21st Feb 2018 14:55
If you are rendering at 300 fps, but the monitor has only a 60 fps frame rate, then you are essentially wasting 4 out of 5 frames as they will never be seen. You are calculating geometry data, pushing it to the graphics card, pushing textures, running shaders, filling the buffers, and flipping buffers around, but ultimately for no purpose as it is all just going to get deleted before it is shown. This wastes a huge amount of the computer's resources. Instead, it is better to render at the monitor's frame rate and run the game logic at 300 fps. Without running the extra renders, you are actually eliminating one of the biggest bottlenecks in the game, allowing you to do even more.
Pfaber1
6
Years of Service
User Offline
Joined: 7th Jan 2018
Location: England
Posted: 21st Feb 2018 16:29
Yes I see what you mean although setting the FPS to more than 60 does have its uses.
hendron
8
Years of Service
User Offline
Joined: 20th Dec 2015
Location:
Posted: 21st Feb 2018 16:29 Edited at: 21st Feb 2018 17:03
Pfaber1,

You're approaching this whole speed thing the wrong way. Your framerate really only begins to matter when you get below 60 fps, because this is around the limit that the human eye can perceive (although there is a case to be made for higher, but this is highly debatable). Anything in your games that move/animate should do so based on actual elapsed time, not based on the FPS. Run these 2 snippets. Which one is faster?





Note that the only difference between the 2 snippets is the first line, setting the FPS. While the 2nd one is running at 10 times the frame rate, the object still spins at a rate of 360 degrees per second.

edit: I should note that this is just a rough example and isn't really the most accurate way to do timer based movement. I really do recommend you look into some of the numerous threads here talking about the subject in more detail.
Pfaber1
6
Years of Service
User Offline
Joined: 7th Jan 2018
Location: England
Posted: 21st Feb 2018 17:03
Hmm I see. Interesting.
hendron
8
Years of Service
User Offline
Joined: 20th Dec 2015
Location:
Posted: 21st Feb 2018 17:23
Just to add -- the reason you want to go through the trouble of using timer based movement, is not everyone who runs your game is going to be running it on the same system specs. Some will have gaming rigs capable of very high FPS, some will have outdated budget computers barely capable of running your game at 60 fps. The point is, if you're moving your sprites or objects at the same rate-per-frame, your game is going to run so fast that it's unplayable on high end rigs, or so slow that it's not playable on low end rigs, or both. However, moving your sprites and objects at the same rate-per-second, your game will run at the same relative speed on any system (provided it's capable of running it at a playable FPS in the first place).
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 21st Feb 2018 20:23
Movement of your game shouldn't be based on frame rate, it should be based on time. Back when everyone had a 486, it was common for games to run at frame speeds. This was fine as everyone was essentially on the same speed machine. Today that's not the case due to the large number of variable PCs. That's why really old games are unplayable on modern hardware without running it through something like Dosbox to slow it down. But if you run a more modern yet 10yr old game on the latest hardware today, it might run smoother but it won't be faster. And as long as you can keep a minimum framerate to match the monitor's refresh rate, the extra frames are useless.

I think there was a good tutorial on timer-based movement somewhere around here. (aimed at DB, but still relative)
Tiled TMX Importer V.2
XML Parser V.2
Base64 Encoder/Decoder
Purple Token - Free online hi-score database
Legend of Zelda

"I like offending people, because I think people who get offended should be offended." - Linus Torvalds
Bengismo
7
Years of Service
User Offline
Joined: 20th Nov 2017
Location: Yorkshire, England
Posted: 21st Feb 2018 20:42 Edited at: 21st Feb 2018 20:44
Its in the AppGameKit documentation... (not that anyone reads documentation)

https://www.appgamekit.com/documentation/examples/timers/1_timer_movement.htm
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 21st Feb 2018 20:54
Not the one I was thinking of but still good. Here's one from the newsletter: https://www.thegamecreators.com/pages/newsletters/newsletter_issue_31.html#9
Tiled TMX Importer V.2
XML Parser V.2
Base64 Encoder/Decoder
Purple Token - Free online hi-score database
Legend of Zelda

"I like offending people, because I think people who get offended should be offended." - Linus Torvalds

Login to post a reply

Server time is: 2024-11-24 00:33:12
Your offset time is: 2024-11-24 00:33:12