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 / Asteroid Blast - made with AGK

Author
Message
KISTech
16
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 30th Jun 2011 21:01
I've been working with the AppGameKit Beta now for a few weeks, and wanted to share with those of you that are waiting anxiously to get your hands on it what I've been up to.

I needed a game idea that wouldn't necessarily be something I would sell later, but would be enough to test as many aspects of the kit as possible.

The result is Asteroid Blast.



It needs a few more little tweaks, but it's basically finished.

Hodgey
14
Years of Service
User Offline
Joined: 10th Oct 2009
Location: Australia
Posted: 30th Jun 2011 23:04
Wow, that looks great KISTech! An excellent example of what AppGameKit can do.

Quote: "It needs a few more little tweaks, but it's basically finished."

All I can suggest is giving the score a fancier font.

When a bullet hits an asteroid and we see sparks fly, is that your own algorithm for handling those sprites or is that AGK's particle system?

Thanks for sharing KISTech!

The Slayer
Forum Vice President
14
Years of Service
User Offline
Joined: 9th Nov 2009
Playing: (Hide and) Seek and Destroy on my guitar!
Posted: 30th Jun 2011 23:28
Nice to see some stuff created with the AppGameKit! Thanks for giving us a glimps of whut's possible to do with this kit, KIStech.

Quote: "is that your own algorithm for handling those sprites or is that AGK's particle system?"

I think it is a selfmade particle function, but I would like to hear that it is in fact a built in AppGameKit particle system, though.

Also, is it possible to scroll the background?

And, what is the resolution this game runs in? Can you tell us the framerate this ran too?

Thanks!

KISTech
16
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 1st Jul 2011 00:46
Quote: "is that your own algorithm for handling those sprites or is that AGK's particle system?"


The sparks are from AGK's particle system. It's very easy to use and quite flexible.

Quote: " is it possible to scroll the background?"


Yes, although the method you choose is up to you. There are probably 2-3 different ways you could do it. Since I'm just now starting on another project that will involve that, I don't have any specifics.
I will say the backgrounds you see in Asteroid Blast are 800 x 600, and you're only seeing 320 x 480 of the upper right corner.

Quote: "what is the resolution this game runs in? Can you tell us the framerate this ran too?"


This uses the Virtual Resolution method, and is set at 320 x 480.

The frame rate seems to be locked in at 60 fps. It jumps around a bit on menus and at the beginning of the level, but once you start playing it settles in at 60.

Hodgey
14
Years of Service
User Offline
Joined: 10th Oct 2009
Location: Australia
Posted: 1st Jul 2011 12:06
Quote: "The sparks are from AGK's particle system. It's very easy to use and quite flexible."

That's good news, I think I'll make good use of AGK's particle system.

Quote: "The frame rate seems to be locked in at 60 fps"

That's fine with me, I always use a sync rate of 60 in DBPro and aim for 60 fps.

Have you tried running it on mobile OSs like iOS and android?

KISTech
16
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 1st Jul 2011 19:05
At the moment we only have access to the Windows compiler, so I haven't seen it run on anything else yet.

Virtual Nomad
Moderator
18
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 2nd Jul 2011 05:30 Edited at: 2nd Jul 2011 05:31
nice example of a few basics there, kistech.

am i needlessly concerned that some of the bullets strike asteroids but do nothing to them? some of the large ones are destroyed with one hit but that's not always the case. is there programming in there that requires some of asteroids to take more than one hit before destruction?

and, while i've skimmed very little of the agk info thus far, i have yet to see any code examples... care to/can you share?

Virtual Nomad @ California, USA . DBPro V7.5
AMD Phenomâ„¢ X4 9750 Quad-Core @ 2.4 GHz . 8 GB PC2-6400 RAM
ATI Radeon HD 3650 @ 512 MB . Vista Home Premium 64 Bit
KISTech
16
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 2nd Jul 2011 20:37 Edited at: 3rd Jul 2011 01:34
There is an algorithm that sets up the asteroids at start up. During that process it sets their scale. If the scale is greater than a certain value then the asteroid has to be hit twice to explode. However the impact should be causing an explosion.

Since making this video I did fix the explosions for the asteroids that hit the shield. They were all happening in the upper left corner instead of at the location of the asteroid.

[edit]
I'm checking to see if it's ok to post the source, or if it's to soon.

The Slayer
Forum Vice President
14
Years of Service
User Offline
Joined: 9th Nov 2009
Playing: (Hide and) Seek and Destroy on my guitar!
Posted: 3rd Jul 2011 00:40
Quote: "and, while i've skimmed very little of the agk info thus far, i have yet to see any code examples... care to/can you share?"

You could also check out the vids about the AppGameKit in the latest newsletter. They show some code.

Cheers

Hodgey
14
Years of Service
User Offline
Joined: 10th Oct 2009
Location: Australia
Posted: 3rd Jul 2011 01:40
@ Virtual Nomad, you can also check the first page of the "AGK Survey" thread stickied at the top of this board. Scoll down until you find Lee's post and there is a code snippet demonstrating all of the basics such as declaring variables.

KISTech
16
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 3rd Jul 2011 19:41
Ok. Here is the AppGameKit source code for Asteroid Blast.

PLEASE NOTE:
* The commands you see may or may not be the same in the final product. It's a beta after all, and things sometimes change.


The Client:



The Server:


DrT
15
Years of Service
User Offline
Joined: 10th May 2008
Location: 26.78 degrees North, -70.49 degrees West
Posted: 3rd Jul 2011 21:06
KISTech:
Thanks for the source.
Where is the server that you are saving high scores to?
I haven't played around with networking so any info would be greatly appreciated.
Will you use this same method when you submit it to an app store?
KISTech
16
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 3rd Jul 2011 21:41
I have a dedicated server here just for hosting game server programs. Worlds Apart Online, Fields of War, and the Asteroid Blast server are all currently running on it.

The networking in Asteroid Blast is very basic.

The client connects to the server at the start, and the server responds with the full list of the 10 high scores. Which gives the client a current list to compare the player's score to.

In the event the player gets a score that qualifies the client connects and sends the player's initials and score to the server.

Much more complicated scenarios are possible. This is just a quick, connect, send some data, and disconnect.

With the latency of cell phone networks though, I don't think a true multiplayer game would work over the internet, but it would work fine over a local Wifi connection.

baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 10th Aug 2011 22:55
Nice work KISTech!! Very kind to share the code too

KISTech
16
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 10th Aug 2011 23:19
Thanks! The code is slightly out of date, as some of the commands have changed syntax slightly since I posted that, and I've updated the input methods to be more cross-platform.

This will likely be released to all available app stores for free with ads in the main menu, but not on the game play screen. We'll have to see how that all plays out when the AppGameKit is released.

Josk
16
Years of Service
User Offline
Joined: 2nd Apr 2008
Location:
Posted: 10th Aug 2011 23:47
Thanks for sharing the code, it's always handy to see code in action.
Nomad Soul
Moderator
17
Years of Service
User Offline
Joined: 9th Jan 2007
Location: United Kingdom
Posted: 11th Aug 2011 14:38
I've just looked at the code for this game and unfortunately its clear I will never be able to make an iphone game after all.

Thanks for sharing. At least I didn't burn $75 on AppGameKit to find this out.

I though the scripting language was supposed to be much easier than C++ but it looks ridiculously hard to me.

XanthorXIII
AGK Gold Backer
12
Years of Service
User Offline
Joined: 13th May 2011
Location:
Posted: 11th Aug 2011 16:48
Nomad - It's actually not that hard. The amount of code he has in this project is probably the turn off but it doesn't take that long to write that much. I can probably agree that it could use some clean up by using include files and such but with the amount of time involved with testing, I can attest that sometimes you have to get the job done one way or another.
$75 is a pretty fantastic price for something like this but you have to start off slow when coding games. This is not KISTech's first game. My games have been a little slower coming but I have one working right now that took me a few months to write due to job/school etc... and that was with another tool. I'm planning on moving my game over to this, so that may be another Month of coding but I think the results will be much better.
If you really want to code games, I would seriously recommend starting with a small game such as Pong and working your way up from there.
That's what I had to do.
Mobiius
Valued Member
21
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 11th Aug 2011 17:06
Really? You think that's hard? It's no harder than DBP, and way easier than the C++ version you can use??

My signature is NOT a moderator plaything! Stop changing it!
Josk
16
Years of Service
User Offline
Joined: 2nd Apr 2008
Location:
Posted: 11th Aug 2011 19:03
Its not that hard, it can just appear a bit overwhelming.
KISTech
16
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 11th Aug 2011 19:33
@Nomad Soul,
This is not that hard, and certainly nothing close to C++. Granted I have nearly 30 years of programming experience, but the AppGameKit script is really not hard at all. Worlds Apart Online with it's 27,000 lines of DBPro code, now that's hard.

If you've already been programming with DBPro and made some good progress, then this will be just as easy. It's actually easier because there are fewer commands, and you're dealing with nothing but sprites. If your ultimate goal is to publish an iPhone game, this is the best route for a novice programmer.

Overall the program is 1,604 lines, but the real meat of the game loop is only about 500 lines. The rest is all setup, an option screen, a high score screen, an instructions screen, and some networking. This is truly a very small program.

@All,
For those interested, here is the latest version that's been updated to be more cross-platform compatible for input, and updated for changes in syntax during the beta. I dropped the second virtual joystick, and replaced it with 2 virtual buttons. I also changed all of the mouse click functions because there was a better, more cross-platform way to detect a mouse click or a touch event with the same command.

Then I added code to detect the platform it was running on. If you're running it on Windows, Mac, or MeeGo it wont display the virtual controls and you can use the keyboard controls.

It makes a big difference when you can test on something with a touch screen. The game takes on an entirely different feel, even though the gameplay is exactly the same. It could just be the difference in screen size, but it's wild either way.

I've tested this on Windows, Mac, and an iPod Touch (4th gen).



DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 11th Aug 2011 20:51
I can understand your concerns Nomad soul, there does seem a lot of variables and such needed to be set up for such a simple game demo. However everyone has there own style of programming. I wouldn't let this code put you off because it looks complicated. Remember, KIStech is new to AppGameKit and this is his first proper demo. So his code is possibly longer than really needed. You tend to learn shortcuts as you develop with a language.

I have only glanced over the code, but I don't see anything mega difficult in there in itself, it is just the amount of code that can overwhelm a little. I would say if you can duplicate what KIStech did in DB, you can do it in AGK.

The main gripe so far from reading around is the lack of image and bitmap manipulation commands. I use both a lot currently in DB. Using sprites only, and not being able to paste them does put me off a little. Even the lack of dot and line commands annoys me, and in all honesty I rarely use them in any finished project. However I do sometimes use them to get a general idea of the screen layout before making the relevant sprites or planes. This is a relatively small gripe though in the main.

One question I would ask though is the speed of the game. Did you have any issues with it? For me I would have had to increase the rate of movement by at least 2x for it to be anything like playable and fun. It may be you didn't pay any regard to that and just did a demo. It could be due to the avi capture. I do worry about a phones ability to throw this stuff around compared to say, a quad core PC and a reasonably fast video card.

Obviously this is the PC version we have seen, as you stated the beta version you used was windows only. Compared to DB pro, how fast does AppGameKit seem?

http://s6.bitefight.org/c.php?uid=103081
KISTech
16
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 11th Aug 2011 21:21
Are you referring to the side-to-side movement of the ship? It seems slow, but it adds to the difficulty of the game. If you have 2 asteroids on either side of the screen you have to choose which one you'll go after, because if you don't have the shield to extend your reach you probably aren't going to make it across to get the other one in time.

I played around with the speed of things quite a lot, and have played the game more times than I can count. It's fairly well optimized for the objective of the game.

As you progress in level, the rate at which the asteroids fall increases slightly.

For overall app speed, it runs just as well on my iPod Touch 4th gen as it does on the PC running a 3GHz Core2Duo and nVidia 9800GT. However this is a very simple game with less than 200 sprites loaded. More complex games will of course impact performance on slower devices.

DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 11th Aug 2011 21:56
I refer to the overall speed really. I used to play a lot of shooters such as R-type, Nemesis, Thunderforce, Parodius, Fantasy Zone etc. The difficulty on your demo here looks somewhat easier in comparison. Like I said it depends on what you were going for. It sounds as if you got it how you wanted, I would have made it a little more fast and furious, because that is what I expect from a shooter.

Good to know you have similar performance on both test systems, I take it you had an update since you mentioned windows only in prior posts. I was wondering mainly regarding speed as in DB compared to AppGameKit on a PC. Does AppGameKit seem similar, better or worse? Have you done any speed comparisons in both? It would be interesting to hear how they compare on a like for like basis.

http://s6.bitefight.org/c.php?uid=103081
KISTech
16
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 11th Aug 2011 23:29
AGK runs about the same as DBP apps on a PC.
I haven't really run into any performance issues from AppGameKit yet.

Login to post a reply

Server time is: 2024-04-20 06:30:39
Your offset time is: 2024-04-20 06:30:39