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/AppGameKit Studio Showcase / making a 2D platform game test run

Author
Message
ando
4
Years of Service
User Offline
Joined: 21st Feb 2020
Location: Australia
Posted: 8th Jan 2022 07:18 Edited at: 10th Jan 2022 02:03
Made two levels just for fun and learning AGKS.
If you find there is a problem, please let me know.
Cheers.

EDIT: new zip uploaded.
BASIC appeared in May 1964. Lightning flashed, the wind roared and the Earth moved.
And nine months later I was born.
So here I am.
I am Basic.
Code is in my genes.

Attachments

Login to view attachments
Virtual Nomad
Moderator
18
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 8th Jan 2022 12:16
runs fine here, ando.

i don't know how precise you want the collision to be but in my single run-through, there was 1 instance where i'm pretty sure a frog(?) was (barely) touching me but didn't harm me.
ando
4
Years of Service
User Offline
Joined: 21st Feb 2020
Location: Australia
Posted: 8th Jan 2022 15:31
Thanks for the feedback Virtual Nomad. I'm glad it worked because this is the first time that I'm not using fractions of width and height to position things.
I'm just using hard numbers for position and hoping that SetVirtualResolution() will take care of things for me.

I'm only using a distance check for fake collision detection. I could tweek the code a bit but it is not super accurate with rectangle sprites.
I'm not using the physics system for this project and I'm not sure but I think I can't use the collision shapes without the physics ???
Thanks.
BASIC appeared in May 1964. Lightning flashed, the wind roared and the Earth moved.
And nine months later I was born.
So here I am.
I am Basic.
Code is in my genes.
Game_Code_here
3
Years of Service
User Offline
Joined: 2nd Jun 2020
Location:
Posted: 8th Jan 2022 22:44
Ok, When I loaded the game the screen was real big and the other game sprites where very small and my player was stuck in the black part of the screen. the jump was the up arrow . Looks cool but does not load properly.
ando
4
Years of Service
User Offline
Joined: 21st Feb 2020
Location: Australia
Posted: 8th Jan 2022 23:55 Edited at: 8th Jan 2022 23:57
Thanks GCH.
Looks like I have to go back to using fractions of width and height to position and scale things for better compatability.
BASIC appeared in May 1964. Lightning flashed, the wind roared and the Earth moved.
And nine months later I was born.
So here I am.
I am Basic.
Code is in my genes.
Game_Code_here
3
Years of Service
User Offline
Joined: 2nd Jun 2020
Location:
Posted: 9th Jan 2022 08:46
What I do in my 2d stuff is use

SetDisplayAspect( 1.1 )

Instead of using any virtual resolution's. This fixes any position or size problems.
ando
4
Years of Service
User Offline
Joined: 21st Feb 2020
Location: Australia
Posted: 9th Jan 2022 09:27
Interesting. Thank you, I will take a look at that.
BASIC appeared in May 1964. Lightning flashed, the wind roared and the Earth moved.
And nine months later I was born.
So here I am.
I am Basic.
Code is in my genes.
ando
4
Years of Service
User Offline
Joined: 21st Feb 2020
Location: Australia
Posted: 10th Jan 2022 02:13
@ GCH, I was about 90% of the way "fixing" my code when I saw your advice so I'll try your way next time, thanks.
I'm pretty sure I did things the hard way here. (and messy)

New zip in my first post, maybe it will work this time on different screen sizes.
I'll make a smaller test program next time just to try and learn how things work.
Cheers.
BASIC appeared in May 1964. Lightning flashed, the wind roared and the Earth moved.
And nine months later I was born.
So here I am.
I am Basic.
Code is in my genes.
Game_Code_here
3
Years of Service
User Offline
Joined: 2nd Jun 2020
Location:
Posted: 10th Jan 2022 03:05
ando

The best easy way is like I said is

SetDisplayAspect( -1.0 )

Then everything you position do it by

positionspritebyoffset()

Keep everything between 0 to 100

Then every computer can play your game.

It just takes practice.

I will try your new update now.
Virtual Nomad
Moderator
18
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 10th Jan 2022 03:14 Edited at: 10th Jan 2022 03:18
Quote: "can't use the collision shapes without the physics"

you can SetSpriteShape?? without physics and GetSpriteHit/Group, etc, still works. try hovering over the corners:

what you can't do without physics enabled is add additional shapes (directly) to a sprite.

otherwise, the docs are misleading where the SetSpriteShape commands are under the Physics header in the Sprite set :/

alas, they NOT in the 2DPhysics set
ando
4
Years of Service
User Offline
Joined: 21st Feb 2020
Location: Australia
Posted: 10th Jan 2022 10:12
Thanks to the both of you for your help.
I'll do some experimenting with this stuff.
BASIC appeared in May 1964. Lightning flashed, the wind roared and the Earth moved.
And nine months later I was born.
So here I am.
I am Basic.
Code is in my genes.
ando
4
Years of Service
User Offline
Joined: 21st Feb 2020
Location: Australia
Posted: 11th Jan 2022 09:00
I had a play with your code Virtual Nomad and then played with making a few changes including SetDisplayAspect(-1.0).

I think it should be fairly easy to make a map editor and then save map data as a text file ready to be loaded in a game.

I remember playing the old Jetpack dos game. I think that had a built in map editor.


BASIC appeared in May 1964. Lightning flashed, the wind roared and the Earth moved.
And nine months later I was born.
So here I am.
I am Basic.
Code is in my genes.
Game_Code_here
3
Years of Service
User Offline
Joined: 2nd Jun 2020
Location:
Posted: 16th Jan 2022 01:59
If you figure out a built in map editor let me know so I can also use it
PartTimeCoder
AGK Tool Maker
8
Years of Service
User Offline
Joined: 9th Mar 2015
Location: London UK
Posted: 16th Jan 2022 14:43
Making editors is actually easier than making the game, editors are just about data, games have the data, gameplay, A.I, balance, so much more to think about, if you can make a half decent game a editor should be cake.
Open Source plugins
Cl - DnD Plugin
Buy Me A Coffee
Game_Code_here
3
Years of Service
User Offline
Joined: 2nd Jun 2020
Location:
Posted: 17th Jan 2022 04:53
Quote: "if you can make a half decent game a editor should be cake."


I do not know, I never thought about it or tried it.

Give me a example and I can work on it for a 2d platformer.
ando
4
Years of Service
User Offline
Joined: 21st Feb 2020
Location: Australia
Posted: 18th Jan 2022 00:37 Edited at: 18th Jan 2022 00:41
I made a little test using SetDisplayAspect(-1.0) and using the 0 to 100 coordinate system.
I also used the collision shapes.
It is so much easier using those methods. Thanks Game_Code_here and Virtual Nomad for steering me in the right direction.

I'll upload the little test demo i was playing with.

I will probably go with modular backgrounds so it will be good for creating, saving and loading levels.
I made one once before using a different BASIC language so AGKS should make it fairly easy to do it again.
If you are going to have 50 or 100 levels then it would be much quicker and easier to use a built in editor to make them all.

BASIC appeared in May 1964. Lightning flashed, the wind roared and the Earth moved.
And nine months later I was born.
So here I am.
I am Basic.
Code is in my genes.

Attachments

Login to view attachments
Game_Code_here
3
Years of Service
User Offline
Joined: 2nd Jun 2020
Location:
Posted: 18th Jan 2022 01:06
Now that ran great and loaded perfectly.

Good job.

So This time no foes to dodge but it is ok. looking good so far.
ando
4
Years of Service
User Offline
Joined: 21st Feb 2020
Location: Australia
Posted: 18th Jan 2022 09:55
I put the baddies back in. Collisions could use some fine tuning maybe.
Hopefully it works ok. Took me exactly 20 mins to play through it.

BASIC appeared in May 1964. Lightning flashed, the wind roared and the Earth moved.
And nine months later I was born.
So here I am.
I am Basic.
Code is in my genes.

Attachments

Login to view attachments

Login to post a reply

Server time is: 2024-02-28 18:22:55
Your offset time is: 2024-02-28 18:22:55