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 / App Game Kit Single Screen Platformer Game Example

Author
Message
GarBenjamin
AGK Developer
7
Years of Service
User Offline
Joined: 30th Nov 2016
Location: USA
Posted: 29th Jul 2018 02:36 Edited at: 15th Aug 2018 01:14
Hello again.

I am making a simple single screen platform game project now. Just something to illustrate how I use states to control player and enemy behavior, etc.

The idea is hopefully it be helpful to some new AppGameKit users.

This thread will basically serve as the dev log showing where the progress is with screenshots and / or videos.

Unlike my other threads this time I will not post continual source code updates and instead just wait until the project is done then upload the project source code in this first post.

So far the stage and player graphics are completed. The player control including collisions with the platforms are implemented.

Platform collision checking isn't flawless yet but for the most part it all works fine. The way I approach development is throw some stuff in then test and fix any glaring issues and call that update done.
The next time I do a dev session I fix anything I noticed during the additional playtesting I did after that last dev session including when I record videos.
That's the first thing I do and then I move on to adding more stuff in that dev session. And so it goes until I call the project completed.



Basically player states are implemented by simply defining some constants such as....



Spawn isn't implemented yet and currently the player begins in Idle state. Spawn will be implemented the next time I work on this.

Anyway, the actual processing is done by the PlayerUpdate() function that is called once per frame (main loop).

Basically all this does is check the player's current state and process everything that can & is happening withing that state...




UPDATE 08-11-2018 IT IS DONE AND SOURCE IS RELEASED!



Updated again changing colors... just for the heck of it. Obviously anyone can change this stuff to anything they want.


Updated added collectibles possibly some minor improvements here and there I don't remember now.


You can view the project over at my BitBucket account here.

In case you are not familiar with source control, BitBucket, etc here is a direct link to the project zip file over there.

NOTE: I gave the project source a clean-up pass but am sure I still have some old junk that I had tested at one point and is no longer needed hanging around in there. I may clean it up at some point.

I think this was WAY OVERKILL for a project illustrating one way to use states and create a single screen platformer game in AppGameKit but hopefully the source is easy enough to follow.

Probably the easiest way to start is to simply check out the PlayerBulletManager file just to get a feel for the general structure of things and see how those states are used.
Then take a look at something like the EnemySpider file which is the simplest enemy. Next the EnemySoldier file which adds in simple LOS and shooting (actually the LOS is just a proximity box check). Finally check out the EnemyElite file which is the most complex enemy AI. After that you can check out the PlayerManager. I think that is a logical way to ease into it and wrap your head around things as quickly as possible. After that just dig into whatever. It is all quite straightforward. If you have any questions about states let me know.
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 29th Jul 2018 02:42
Looks good GarBenjamin
fubar
jonion
7
Years of Service
User Offline
Joined: 22nd Jun 2017
Location: Spain
Posted: 29th Jul 2018 07:41
A few days ago I found your 2D shootemup template, and it's awesome. I'm trying to understand how everything works, it's very structurated with a lot of types... but it's fantastic.

This platformer example looks very good, I like simple graphics and the walk/jump animation!

Sorry for my bad english. My last english class was in the great Commodore64 years.
GarBenjamin
AGK Developer
7
Years of Service
User Offline
Joined: 30th Nov 2016
Location: USA
Posted: 29th Jul 2018 18:11
Thanks fubarpk and jonion I am glad you liked the shmup project.
TI/994a (BASIC) -> C64 (BASIC/PASCAL/ASM/Others) -> Amiga (AMOS/BLITZ/ASM/C/Gamesmith) -> DOS (C/C++/Allegro) -> Windows (C++/C#/Monkey X/GL Basic/Unity/Others)
GarBenjamin
AGK Developer
7
Years of Service
User Offline
Joined: 30th Nov 2016
Location: USA
Posted: 29th Jul 2018 18:42 Edited at: 30th Jul 2018 16:03
Probably should go through some of the structure of this project at this point.

Asset management seems like a logical place to start. Meaning how are the graphics loaded, stored and accessed.

I created this type...


A global variable is declared using this type...


And the following AssetsLoad() function is called before the main loop before the player is initialized.


The sprites64x64 image is a sprite sheet which will contain all of the 64x64 images and currently contains the 12 images used for the player animations.
The following sprites64x64 subimages.txt file defines these images...


These image IDs are stored in the assetsGameplay.player array.This means anytime we need to reference one of the images used by the player sprite such as animating Idle, Walk, etc the images are readily available in this array.

EDIT: Not sure why the code is not being color-coded I used the code lang=agk tag.
TI/994a (BASIC) -> C64 (BASIC/PASCAL/ASM/Others) -> Amiga (AMOS/BLITZ/ASM/C/Gamesmith) -> DOS (C/C++/Allegro) -> Windows (C++/C#/Monkey X/GL Basic/Unity/Others)
SpecTre
Developer
21
Years of Service
User Offline
Joined: 24th Feb 2003
Location: UK
Posted: 30th Jul 2018 13:46
@GarBenjamin I think this will be a good project for the community. I like your gfx style too and will keep a look out for this project to see how it progresses. Nice work.
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 30th Jul 2018 14:21
Mechanics look good so far.

Gar, your last two posts have rather larger than normal text. You have a tag left open or something? Maybe it's breaking the code tag highlighting?
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
GarBenjamin
AGK Developer
7
Years of Service
User Offline
Joined: 30th Nov 2016
Location: USA
Posted: 30th Jul 2018 16:06
Thanks SpecTre and Phaelax.

I intentionally used the large text just because when on my laptop it was easier reading at that resolution. I just removed the large text styling to see if it would fix things but did not. I don't know why it isn't styling the AppGameKit code.
TI/994a (BASIC) -> C64 (BASIC/PASCAL/ASM/Others) -> Amiga (AMOS/BLITZ/ASM/C/Gamesmith) -> DOS (C/C++/Allegro) -> Windows (C++/C#/Monkey X/GL Basic/Unity/Others)
GarBenjamin
AGK Developer
7
Years of Service
User Offline
Joined: 30th Nov 2016
Location: USA
Posted: 31st Jul 2018 02:04
Updated the platform collision detection.
Updated the player jump and fall velocities slightly.
Implemented player shooting with firing flash and of course the bullets management.

Looks like next time I work on this it will be time to bring out some enemies.

TI/994a (BASIC) -> C64 (BASIC/PASCAL/ASM/Others) -> Amiga (AMOS/BLITZ/ASM/C/Gamesmith) -> DOS (C/C++/Allegro) -> Windows (C++/C#/Monkey X/GL Basic/Unity/Others)
GarBenjamin
AGK Developer
7
Years of Service
User Offline
Joined: 30th Nov 2016
Location: USA
Posted: 2nd Aug 2018 14:55
I hope to work on this again tonight and get some enemies out and about. Planned for last night and got hit with a stomach bug or something. By time workday was done I was ready for sleep.

Tonight!!!
TI/994a (BASIC) -> C64 (BASIC/PASCAL/ASM/Others) -> Amiga (AMOS/BLITZ/ASM/C/Gamesmith) -> DOS (C/C++/Allegro) -> Windows (C++/C#/Monkey X/GL Basic/Unity/Others)
GarBenjamin
AGK Developer
7
Years of Service
User Offline
Joined: 30th Nov 2016
Location: USA
Posted: 3rd Aug 2018 03:29 Edited at: 3rd Aug 2018 03:31
Okay, pushed this further along tonight.

Now has enemy spawners and enemies that are spawned. The enemies don't do anything after they spawn but at least they do spawn. lol

I kind of looked at it like there is a big spaceship up above off screen and enemies beam in to the platforms below. So that gives some context here as to what is going on.

I made use of the previous collision zones that were created by scanning the platform collision image. A list of spawn locations are created by examining these collision zones and providing some spacing between each spawn point . I think it ended up finding a little over 70 spawn locations. A couple of rules for that are the platform has to be at least a certain width and it cannot be the lowest most platforms (the ground) at the bottom.

Probably overkill for something like an example platform game project but I wanted to make it a little interesting.
Each spawner has a list of 12 sprites of a growing and shrinking circle and together they produce the beam in fx.

Anyway, next dev session I will focus on bringing these enemies to life.

TI/994a (BASIC) -> C64 (BASIC/PASCAL/ASM/Others) -> Amiga (AMOS/BLITZ/ASM/C/Gamesmith) -> DOS (C/C++/Allegro) -> Windows (C++/C#/Monkey X/GL Basic/Unity/Others)
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 3rd Aug 2018 05:58 Edited at: 3rd Aug 2018 08:23
Looking very nice matey.
I made a creepy spider tank thingy for a bad guy if you want. It's 32x32. if you want another size or something else let me know ok?
I tried to make it blocky like the character style you got going there

Attachments

Login to view attachments
GarBenjamin
AGK Developer
7
Years of Service
User Offline
Joined: 30th Nov 2016
Location: USA
Posted: 3rd Aug 2018 13:06
Hey blink0k that is an awesome little critter. Sure I will use it. Thanks!

I hope to work on this again tonight.
TI/994a (BASIC) -> C64 (BASIC/PASCAL/ASM/Others) -> Amiga (AMOS/BLITZ/ASM/C/Gamesmith) -> DOS (C/C++/Allegro) -> Windows (C++/C#/Monkey X/GL Basic/Unity/Others)
GarBenjamin
AGK Developer
7
Years of Service
User Offline
Joined: 30th Nov 2016
Location: USA
Posted: 4th Aug 2018 00:32
Another update just working on getting the basics down.

I had already made two robotic humanoid enemy types for this. They don't have arms will shoot out of their heads or chests.

Next dev session I will add the spidertank critter blink0k provided to the sprite sheet. It might spawn in the same way or maybe it will come out of blowing up the larger elite enemy robotic soldiers.

TI/994a (BASIC) -> C64 (BASIC/PASCAL/ASM/Others) -> Amiga (AMOS/BLITZ/ASM/C/Gamesmith) -> DOS (C/C++/Allegro) -> Windows (C++/C#/Monkey X/GL Basic/Unity/Others)
Richard_6
7
Years of Service
User Offline
Joined: 3rd Feb 2017
Location:
Posted: 4th Aug 2018 13:33 Edited at: 4th Aug 2018 13:33
Looking super cool and fun Gar!
GarBenjamin
AGK Developer
7
Years of Service
User Offline
Joined: 30th Nov 2016
Location: USA
Posted: 4th Aug 2018 16:21 Edited at: 4th Aug 2018 16:24
Thanks Richard. Out to breakfast at the moment and decided to check the forum.

I did work on it a bit this morning before I left. Added Blink's awesome spiderbot and it looks very cool in there crawling around.

Looking forward to working on this again when I get home. I am not going to go "crazy" on this since the purpose is not a game intended for release even on web game portals such as GameJolt but instead just an example project of one way to do a platformer in App Game Kit. I need to keep reminding myself of this. Lol

That being said I will work on some slightly different behaviors for these 3 enemy types and that should be very good for illustrating one way to use states for enemy AI / behaviors.

Actually maybe I should release these things on my GameJolt account. Be a great way to advertise App Game Kit. Just make a screen at start FULL PROJECT SOURCE AVAILABLE ON THE APP GAME KIT FORUMS HERE! WHY NOT CHECK OUT APP GAME KIT TODAY?

Something to think about maybe possibly.
TI/994a (BASIC) -> C64 (BASIC/PASCAL/ASM/Others) -> Amiga (AMOS/BLITZ/ASM/C/Gamesmith) -> DOS (C/C++/Allegro) -> Windows (C++/C#/Monkey X/GL Basic/Unity/Others)
GarBenjamin
AGK Developer
7
Years of Service
User Offline
Joined: 30th Nov 2016
Location: USA
Posted: 4th Aug 2018 17:37 Edited at: 4th Aug 2018 17:47
I was thinking... maybe someone should make an example game project based on the old Magic Forest that was included with AMOS BASIC kind of showing the roots of the language etc. I remember long ago first checking out Magic Forest and that other game project that sounded like a werewolf howling at the start ah Castle AMOS it was called! My first impression from seeing those was "wow this thing is wicked powerful!"

A slightly updated version of that old Magic Forest included as an example game project might be a good thing.

Alright, out to mow some of the lawn before the insane heat kicks in then back in for some game dev!



Apparently they made a sequel. Never played or even seen this one before outside of YT videos. Maybe for AGA only or possible a demo project included for TOME. I dunno.


Not a platformer but this is that Castle AMOS game...

TI/994a (BASIC) -> C64 (BASIC/PASCAL/ASM/Others) -> Amiga (AMOS/BLITZ/ASM/C/Gamesmith) -> DOS (C/C++/Allegro) -> Windows (C++/C#/Monkey X/GL Basic/Unity/Others)
GarBenjamin
AGK Developer
7
Years of Service
User Offline
Joined: 30th Nov 2016
Location: USA
Posted: 5th Aug 2018 01:57
Did some work earlier after I got home and posted the videos of the AMOS example programs. Got out of the house for a while (working inside for my job I like to be outside as much as I can when I can!) and just now worked again on this.
That makes like 3 different development sessions on this today. Probably close to 3 hours of time too!

But it has made a good amount of progress including tweaking the colors again. lol I told you I do that a lot iteratively through a project. I kept thinking that red background although it looked kind of stormy / armageddon like which I was originally going for it didn't really fit in that well. I thought maybe be better to change the backdrop to match the platforms more.

Added the spiderbot images Blink provides to the sprite sheet then the AssetManager and so forth getting it spawning as well.

Implemented a very simple line of sight function for the enemies to use then implemented firing for the two humanoid type of robots.

Adjusted the bullets for both player and enemies including making them fade out when their life expires.

And that's it.... this is where we are now.


TI/994a (BASIC) -> C64 (BASIC/PASCAL/ASM/Others) -> Amiga (AMOS/BLITZ/ASM/C/Gamesmith) -> DOS (C/C++/Allegro) -> Windows (C++/C#/Monkey X/GL Basic/Unity/Others)
GarBenjamin
AGK Developer
7
Years of Service
User Offline
Joined: 30th Nov 2016
Location: USA
Posted: 6th Aug 2018 14:15 Edited at: 6th Aug 2018 14:26
I got a couple more dev sessions on this yesterday and made some great progress.

I will do another one tonight then make a video for where it is at now. For now it is another Monday morning with the full workday ahead I need to do first.

Anyway I should also add some information in here about how things are being done.
TI/994a (BASIC) -> C64 (BASIC/PASCAL/ASM/Others) -> Amiga (AMOS/BLITZ/ASM/C/Gamesmith) -> DOS (C/C++/Allegro) -> Windows (C++/C#/Monkey X/GL Basic/Unity/Others)
GarBenjamin
AGK Developer
7
Years of Service
User Offline
Joined: 30th Nov 2016
Location: USA
Posted: 7th Aug 2018 02:14 Edited at: 8th Aug 2018 11:47
Just finished another dev session on this and here is a video showing where this project is at currently.



Yeah I spent a good amount of time adding polish. Well... ... ... as much as I hate falling into the black hole of focusing on that kind of thing it's only because it greatly slows down progress on the core gameplay stuff which is critical. Doing the work of polish and playing around with that kind of thing itself has always been very fun to me.

Still... I didn't spend all of my dev time just playing around with that stuff. I tweaked things here and there for better playability. I added collisions between the player bullets and the enemies, a hit flash on the enemies and of course that led me into adding the explosion FX and I thought why not make something a little cool. lol I also added the basic HUD and thought why not add a little visual flair to it as well.

I also tweaked the backdrop colors again because I thought the grays were just too extreme so tinted them just a bit towards what they were previously. Also updated the platforms and stage image and collision mask image a bit for playability.

Probably other stuff I don't remember now.

Next dev session I WILL focus on the important stuff again. Basically the point of this project is to be an example on using states to manage enemy AI, player control, etc. LOL!
Ah well I had some extra fun with it.
TI/994a (BASIC) -> C64 (BASIC/PASCAL/ASM/Others) -> Amiga (AMOS/BLITZ/ASM/C/Gamesmith) -> DOS (C/C++/Allegro) -> Windows (C++/C#/Monkey X/GL Basic/Unity/Others)
GarBenjamin
AGK Developer
7
Years of Service
User Offline
Joined: 30th Nov 2016
Location: USA
Posted: 8th Aug 2018 14:00
Okay, focused on states last night which can be seen on the Elite enemies. Those are the tallest ones.
When they reach the edge of the platforms they scan up and down for the player and shoot if they find them.

TI/994a (BASIC) -> C64 (BASIC/PASCAL/ASM/Others) -> Amiga (AMOS/BLITZ/ASM/C/Gamesmith) -> DOS (C/C++/Allegro) -> Windows (C++/C#/Monkey X/GL Basic/Unity/Others)
GarBenjamin
AGK Developer
7
Years of Service
User Offline
Joined: 30th Nov 2016
Location: USA
Posted: 9th Aug 2018 03:57 Edited at: 9th Aug 2018 16:02
Didn't do much tonight other than some refactoring of some code. Nothing new added.

I thought it might be good to go over some of the current state code the enemies use.

This is just the high level and does not get into the state implementation details which are each contained in their own dedicated methods.

Still it might be useful to see how the upper level code differs between the shorter and taller robot to produce the behaviors seen in the video.

This is the main update method for the soldier enemy type (the little humanoid robot)


And here is the main update method for the elite soldier enemy type (the taller humanoid robot)
TI/994a (BASIC) -> C64 (BASIC/PASCAL/ASM/Others) -> Amiga (AMOS/BLITZ/ASM/C/Gamesmith) -> DOS (C/C++/Allegro) -> Windows (C++/C#/Monkey X/GL Basic/Unity/Others)
Supertino
7
Years of Service
User Offline
Joined: 22nd Jun 2017
Location: Behind you!
Posted: 9th Aug 2018 10:56
Looks fantasic, makes me want to go make another retro game but I am keep my spare time free for the WoW expansion this month and next. Have three spooky ghosts, ( the max I can give )
GarBenjamin
AGK Developer
7
Years of Service
User Offline
Joined: 30th Nov 2016
Location: USA
Posted: 10th Aug 2018 02:34
Thanks Supertino! I enjoyed your games especially PanGEMic and Lunar Escape 2600. Great stuff and yes it would be very good to see more games from you.
TI/994a (BASIC) -> C64 (BASIC/PASCAL/ASM/Others) -> Amiga (AMOS/BLITZ/ASM/C/Gamesmith) -> DOS (C/C++/Allegro) -> Windows (C++/C#/Monkey X/GL Basic/Unity/Others)
GarBenjamin
AGK Developer
7
Years of Service
User Offline
Joined: 30th Nov 2016
Location: USA
Posted: 10th Aug 2018 02:41 Edited at: 10th Aug 2018 02:41
Another dev session... progress was made.

Yes I added a bit more polish BUT these were actually STATES! ... player spawning and death states.

I am thinking I probably should have made a very simple platformer with nothing but rectangles and absolutely 0 FX. LOL! I think that would have been much better as an example of using states because code would have been limited to basically just state code of enemies roaming around and player control. But when I work on this I think I forget and think I am building an actual game.

TI/994a (BASIC) -> C64 (BASIC/PASCAL/ASM/Others) -> Amiga (AMOS/BLITZ/ASM/C/Gamesmith) -> DOS (C/C++/Allegro) -> Windows (C++/C#/Monkey X/GL Basic/Unity/Others)
GarBenjamin
AGK Developer
7
Years of Service
User Offline
Joined: 30th Nov 2016
Location: USA
Posted: 11th Aug 2018 02:03 Edited at: 11th Aug 2018 02:04
More states and player abilities!

Added ducking for the player and also the ability to drop down from a platform.

For the Elite enemy I noticed in the last video (not sure if you ever do this but if you don't ever record videos of your games I highly recommend doing so... watch them and you will notice things you never notice while playing) shooting the Elite enemies in the back when they were walking or standing at edge of an platform looking for you in particular made them look quite dumb... so now they react to getting shot from behind.

OH! More FX stuff... nothing major just you know that huge battle that happened here has the air filled with radioactive ash... and that can be seen by the 3,500 sprites that make up the radioactive ashstorm.

Of course I tweaked the background colors again. Ha ha.

I have to say this AppGameKit BASIC is quite powerful. Also I am almost ready to call this example project done.

TI/994a (BASIC) -> C64 (BASIC/PASCAL/ASM/Others) -> Amiga (AMOS/BLITZ/ASM/C/Gamesmith) -> DOS (C/C++/Allegro) -> Windows (C++/C#/Monkey X/GL Basic/Unity/Others)
Richard_6
7
Years of Service
User Offline
Joined: 3rd Feb 2017
Location:
Posted: 11th Aug 2018 13:46
Quote: "I have to say this AppGameKit BASIC is quite powerful."
I agree

Quote: "Also I am almost ready to call this example project done. "
Everything looks great. Have you used any physics, Gar?

GarBenjamin
AGK Developer
7
Years of Service
User Offline
Joined: 30th Nov 2016
Location: USA
Posted: 11th Aug 2018 15:46 Edited at: 11th Aug 2018 15:48
Thanks Richard!

I always use game physics for this stuff but by "using physics" I am pretty sure you mean using the canned physics systems. No I never use that stuff (never did with Unity either.... I played around with it a few times but always seemed so weird to me like it is overcomplicating things).

I just use my own forces such as PLAYER JUMP FORCE and GRAVITY (and FRICTION if needed... this one doesn't use it).

For applying forces to objects each object type simply have xForce and yForce variables. Then I can make it so when applying damage I call ApplyDamageForce passing in the damage amount and the forces to be applied. Amount is subtracted from their health and the forces are added to their current x and y forces with checks of course to keep these within a reasonable range. Each frame before any state processing happens the forces are applied to the objects.

That platformer game project I worked on right before this one with the rectangles where the player had the dash attack that is exactly how the dash impact applied damage and transferred movement forces causing the dash attack to knock them sliding backwards aways.
TI/994a (BASIC) -> C64 (BASIC/PASCAL/ASM/Others) -> Amiga (AMOS/BLITZ/ASM/C/Gamesmith) -> DOS (C/C++/Allegro) -> Windows (C++/C#/Monkey X/GL Basic/Unity/Others)
GarBenjamin
AGK Developer
7
Years of Service
User Offline
Joined: 30th Nov 2016
Location: USA
Posted: 12th Aug 2018 03:21 Edited at: 15th Aug 2018 01:15
IT IS DONE!


You can view the project over at my BitBucket account here.

In case you are not familiar with source control, BitBucket, etc here is a direct link to the project zip file over there.

NOTE: I gave the project source a clean-up pass but am sure I still have some old junk that I had tested at one point and is no longer needed hanging around in there. I may clean it up at some point.

I think this was WAY OVERKILL for a project illustrating one way to use states and create a single screen platformer game in AppGameKit but hopefully the source is easy enough to follow.

Probably the easiest way to start is to simply check out the PlayerBulletManager file just to get a feel for the general structure of things and see how those states are used.
Then take a look at something like the EnemySpider file which is the simplest enemy. Next the EnemySoldier file which adds in simple LOS and shooting (actually the LOS is just a proximity box check). Finally check out the EnemyElite file which is the most complex enemy AI. After that you can check out the PlayerManager. I think that is a logical way to ease into it and wrap your head around things as quickly as possible. After that just dig into whatever. It is all quite straightforward. If you have any questions about states let me know.
Golelorn
8
Years of Service
User Offline
Joined: 20th Nov 2016
Location:
Posted: 12th Aug 2018 04:02
Nice.

Anyone play this?

https://www.youtube.com/watch?v=YMTdr026bZU

It was later used as Super Mario Bros for C64, except a few sprites were replaced. I don't think there was ever a port for a "real" Super Mario.

I love the art style.
GarBenjamin
AGK Developer
7
Years of Service
User Offline
Joined: 30th Nov 2016
Location: USA
Posted: 12th Aug 2018 05:14 Edited at: 12th Aug 2018 05:17
I remember Giana Sisters back in the day. Didn't have it but saw it in a few magazines. It was pulled from shelves soon after release because they had made it as a port of SMB and Nintendo had no interest in it so like you said they changed the graphics and name and released it anyway. Nintendo sued them and it was shut down shortly after release from what I understand.

Whenever I have checked out videos of it (I spend a lot of my free time just watching videos of classic games and Indie games) it always looks slow... I think the floaty jumps. No sure why but I am not a big fan of floaty jumps that are so common these days especially with games using the built-in physics systems. I guess if everything is done well it doesn't really matter though.

Maybe I will make a side scrolling platformer project some time. Would be fairly straightforward to make a one level example project like Giana Sisters.

-----------------------------------

Alright... I updated the colors just for the heck of it... visibility I guess. I don't know. Wanted a change maybe.

Obviously anyone can change this stuff to anything they want.
TI/994a (BASIC) -> C64 (BASIC/PASCAL/ASM/Others) -> Amiga (AMOS/BLITZ/ASM/C/Gamesmith) -> DOS (C/C++/Allegro) -> Windows (C++/C#/Monkey X/GL Basic/Unity/Others)
GarBenjamin
AGK Developer
7
Years of Service
User Offline
Joined: 30th Nov 2016
Location: USA
Posted: 12th Aug 2018 17:05
Updated the PlayerManager code so player now dies when falling down into one of the gaps between the platforms at the bottom.
Source is committed and pushed over to the repo so downloading will get the update.
TI/994a (BASIC) -> C64 (BASIC/PASCAL/ASM/Others) -> Amiga (AMOS/BLITZ/ASM/C/Gamesmith) -> DOS (C/C++/Allegro) -> Windows (C++/C#/Monkey X/GL Basic/Unity/Others)
Richard_6
7
Years of Service
User Offline
Joined: 3rd Feb 2017
Location:
Posted: 13th Aug 2018 14:22
Thank you, Gar! I'm planning to use this as a master reference for my next platform fighting game.
GarBenjamin
AGK Developer
7
Years of Service
User Offline
Joined: 30th Nov 2016
Location: USA
Posted: 13th Aug 2018 16:01 Edited at: 13th Aug 2018 16:08
LOL well some stuff will be useful... the state code and architecture possibly and a random bit here and there.

But I decided instead of hardcoding enemy spawn locations (and collectibles that I was going to add) I made that bit procedural so it scans the collision zones and builds a list of all of the spawn locations across the platforms. So that bit not needed for your project I'd guess.

I actually did decide last night to add in collectibles. The player starts with no ammo and instead some ammo collectibles are spawned at random points at the start. HUD now has an ammo display as well.

I will make a video of this "final" update and commit and push updates to the remote repo tonight.
TI/994a (BASIC) -> C64 (BASIC/PASCAL/ASM/Others) -> Amiga (AMOS/BLITZ/ASM/C/Gamesmith) -> DOS (C/C++/Allegro) -> Windows (C++/C#/Monkey X/GL Basic/Unity/Others)
GarBenjamin
AGK Developer
7
Years of Service
User Offline
Joined: 30th Nov 2016
Location: USA
Posted: 13th Aug 2018 19:35 Edited at: 15th Aug 2018 01:15
Alright I think this is truly DONE as far as I am going to do. Originally had planned on adding collectibles so I went ahead and added the CollectibleManager and so the framework is there to add in various collectibles as desired.

I only added 1 kind collectible... ammo for the player's gun. When the "game" starts the player has no ammo and must first collect some. The Collectible Manager makes sure 1 (and only 1) clip are located somewhere on the ground level.

I committed the updates and pushed over to the repo at BitBucket. So just grab the download and you will have the latest version with these updates.

You can view the project over at my BitBucket account here.

In case you are not familiar with source control, BitBucket, etc here is a direct link to the project zip file over there.

fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 16th Aug 2018 08:12 Edited at: 16th Aug 2018 08:14
Plays quite well GarBenjamin thanks for sharing

Quote: "that can be seen by the 3,500 sprites that make up the radioactive ashstorm."

That is one heck of allot of sprites, I would've expected a shader using noise be used here or
perhaps one large sprite using uvshifting but I still get great frame rates on my pc so maybe
not necessary
fubar
george++
AGK Tool Maker
17
Years of Service
User Offline
Joined: 13th May 2007
Location: Thessaloniki, Hellas
Posted: 16th Aug 2018 09:53
Hi GarBenjamin, I like this style.
Keep up on this project!
GarBenjamin
AGK Developer
7
Years of Service
User Offline
Joined: 30th Nov 2016
Location: USA
Posted: 16th Aug 2018 12:41 Edited at: 16th Aug 2018 12:42
Thanks fubarpk and george.

The 3,500 sprites for the radioactive ash was just in the video. It was way overkill for the game so I dropped it down to 500.
IronManhood
9
Years of Service
User Offline
Joined: 6th Feb 2015
Location: US
Posted: 16th Aug 2018 16:13
GarBenjamin
AGK Developer
7
Years of Service
User Offline
Joined: 30th Nov 2016
Location: USA
Posted: 16th Aug 2018 16:33 Edited at: 16th Aug 2018 17:06
Definitely should be able to but really this was never intended to be an actual game and only show how to use states for enemy control. Lol. I just got into it and turned it into a playable game then added fluff like the particles for the heck of it. I've just always wrote my own particle system managers mainly because I don't want to spend the time figuring out other ones to get the same results. Ha ha.

I did use the built-in particle system in the shmup template though for explosions and they worked very well for that. Here basically be creating one (or maybe 2 or 3) particle emitters that sit above the top of the screen showering out particles that drop down with a loooong lifetime. But again I see that as why spend all of that time implementing and tweaking values when can just knock it out in minutes.

That said... I do want to get into using the AppGameKit native stuff more. I know using the tweens, particle systems and even physics would probably offer even faster game development. Maybe. So I am going to start testing that stuff more. Up to now I have tried physics systems and this other stuff in various engines and always found it made things more complex more time consuming to get the exact results I am after than if I just wrote my own stuff from scratch. But I am definitely open to exploring it all with AppGameKit!

I just started an ultra low rez 80x72 Tower Defense game last night before sleep. Didn't get much done yet just the tile map levels loading and displaying and first level built. Well I mean the level map has 3 layers containing all info needed... the visual scene, the ground that can be built on (and vice-versa) and the waypoints set for the enemy path.

Anyway instead of my normal approach to enemy movement one of the things I am going to do is use tweens for the movement and possibly animations too (or maybe use the AppGameKit animation system). I normally do basically everything in code. Another big reason I favor this approach is I can port my stuff to anything even Assembly reasonably straightforward if I had a desire to. BUT I am thinking I will probably stay with AppGameKit despite me being interested in checking out Defold so I should use more of what it has to offer.
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 17th Aug 2018 09:51 Edited at: 17th Aug 2018 10:09
Quote: "You might could get away with using a particle system instead of sprites."

Or use a shader like this except vertical scrolling instead of horizontal



It could be done so that you use it as your background and if theres a color black at the uvlocation of the texture don't draw the current back ground one
which would give depth

One of the shader experts may be able to help lol not me they still blow my mind lol
Should then be able to have thousands
fubar
GarBenjamin
AGK Developer
7
Years of Service
User Offline
Joined: 30th Nov 2016
Location: USA
Posted: 17th Aug 2018 13:45 Edited at: 17th Aug 2018 14:54
I'll check that shader out after work tonight. That reminds me I was planning on getting back to my experiments with shaders been a long time but when I finished up the platformer example project I had forgot all about that and had more interest in making a complete game. lol

We can already have thousands of particles... way more than is needed... using sprites.

You can change the amount at the very top of the FXManager.agc file.

I max at around 4,300 (the number is 0-indexed) when I increase above that on my laptop the frame rate drops below a steady 60 fps.

And it could be further optimized if transparency wasn't needed I am pretty sure I made these sprites all transparent for one reason or another. Originally I had them all doing a subtle color cycle animation but it was too distracting so axed it.

For me anyway I'd never need more than 1,000 maybe 1,500 to do about any FX needed for a game. HOWEVER... I could see for doing some kind of demo thingy using more but even then a few thousand particles sprites moving around in a complex pattern would be quite a sight.

Anyway it would be interesting to see where other people max out and drop below 60 fps when increasing the dust particle count.

Login to post a reply

Server time is: 2024-11-23 17:37:09
Your offset time is: 2024-11-23 17:37:09