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 / [WIP] - [Multi Format] - Platypus Peril

Author
Message
Digital Awakening
AGK Developer
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Sweden
Posted: 8th Jan 2016 20:28
There are many things to consider all over the place. Sounds promising and I will keep an eye on this
SpecTre
Developer
21
Years of Service
User Offline
Joined: 24th Feb 2003
Location: UK
Posted: 14th Jan 2016 00:58
Okay so I realised my map editor is too simple to create large levels of more than one screen at a time and now I have changed the camera view I need something better. I really like Tiled but am waiting for native commands for it I like the way it has layers etc. So until then I have made an update and rewrote a map editor program for my game from scratch.

Features:

Create maps of any size
Paint the tiles with the left mouse
Erase with the right mouse
Press space bar to bring my tiles up to select
Press the number keys for layers, e.g. 0 = Layer 0 and so on
Layers not selected fade, so can see layer working on easier
Arrow keys scroll the map
Save map
Load map to continue working on it

Hers a clip:




I am pretty pleased with it and now I have to update the game for the new features with layers etc.
I am doing a rewrite of the code because I have decided to move away from the %age system and use a virtual screen but use the scissor command so can see tiles still at the edges and will still use the full screen. I have found this works well with no distortion and with the main sprite staying in the middle of the screen, is more natural. This seems the same method as Unity as I converted my game to that too and liked the way it worked so changed this

When I update the game I will do a video showing this.

What is funny is that I thought I wouldn't have time for my NaGaCreMo entry and I have found I have completed the map editor in a week lol so I am pleased I have finished something this month!!
The Amiga and Amos were great!
My website LEAP - Download Paint Pot here!
Crazy Programmer
AGK Developer
19
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Lost in AGK
Posted: 14th Jan 2016 14:09
It is looking really nice! I'm glad you found time this month

Sign up for NaGaCreMo!
SpecTre
Developer
21
Years of Service
User Offline
Joined: 24th Feb 2003
Location: UK
Posted: 14th Jan 2016 14:21
Cheers Will it does the job without being too fancy and I can add to it for extra data to be put in the save file. Thanks for the inspiration and making me get my act together in getting coding again after Xmas
The Amiga and Amos were great!
My website LEAP - Download Paint Pot here!
Digital Awakening
AGK Developer
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Sweden
Posted: 15th Jan 2016 20:58
That's really all you need for your own level editor. Makes level editing so much easier. One thing with large maps is that a way to select, move and copy parts of the level is very nice for making larger changes. like moving a big part further away. BTW, I think you should put a single color sprite behind your tile selector

I use a virtual resolution and the scissor command for RTA. Works great!
SpecTre
Developer
21
Years of Service
User Offline
Joined: 24th Feb 2003
Location: UK
Posted: 16th Jan 2016 04:21
Will look at the copy and paste it's funny you mention the single colour sprite behind the tile selector as I did that after making the video
The Amiga and Amos were great!
My website LEAP - Download Paint Pot here!
DavidAGK
AGK Developer
10
Years of Service
User Offline
Joined: 1st Jan 2014
Location:
Posted: 16th Jan 2016 08:39
Agree with DA, a copy and paste function is very useful. Another top function that I use is a keyboard shortcut to change the current brush to the tile that you are currently over. Saves having to bring up the tile pallet or scroll through it in my case. I use it all the time.

I'm definitely a fan of coding your own map editor. Gives you complete control over something that is integral to your development. When I looked around there were a bunch of "just about to be released" map efitors with dates going back a few years!! Do it yourself and you're never left waiting!
SpecTre
Developer
21
Years of Service
User Offline
Joined: 24th Feb 2003
Location: UK
Posted: 16th Jan 2016 12:55
Quote: "Another top function that I use is a keyboard shortcut to change the current brush to the tile that you are currently over."


A good idea which I think I will put in there


I just need to add another layer then for the parallax level and it's ready to do a level and re write the Platypus game
The Amiga and Amos were great!
My website LEAP - Download Paint Pot here!
SpecTre
Developer
21
Years of Service
User Offline
Joined: 24th Feb 2003
Location: UK
Posted: 16th Jan 2016 13:59
Well as I said this is a simple map editor for my own use so is nothing fancy. If you want to see how or how not to make a map editor then the code is below!
I have not added the few extra features I want yet but it might help you out if you want to create an editor yourself.

There is a sample atlas file and sub images txt file which need to go in the media folder to have a play with. I have obviously not put the Platypus level blocks in because I am using them for my game, these ones are from the free Kenny images.


Features I need to add yet:
Start up menu so you can enter the size of the map and level name when you start the program and also if you want to load a previously saved map.
Extra layer/s for parallax levels.
Cut and paste.


Oh if you look at the code and think GOSUB!!! then I am not snobby about the gosub command and think it is quite useful

If you alter this and make it super awesome then post the code back here and maybe we can all use it


The Amiga and Amos were great!
My website LEAP - Download Paint Pot here!

Attachments

Login to view attachments
DavidAGK
AGK Developer
10
Years of Service
User Offline
Joined: 1st Jan 2014
Location:
Posted: 16th Jan 2016 16:40
GOSUB....aaah, the days of AMOS still burn bright....
Using Tier 1 AppGameKit V2
Started coding with AMOS (Thanks Francois Lionet)
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 16th Jan 2016 20:21
wow! that's incredibly generous. thank you

Sign up for NaGaCreMo!
SpecTre
Developer
21
Years of Service
User Offline
Joined: 24th Feb 2003
Location: UK
Posted: 16th Jan 2016 23:11
Quote: "GOSUB....aaah, the days of AMOS still burn bright.... "


Amos.........those are the good old days


Quote: "wow! that's incredibly generous. thank you"


Hope it can help someone and if you make it awesome then don't forget to post back


Just need to do the couple of updates for parallax etc and then can design the first level before coding a re write of my Platypus Peril game!!
Getting excited to update it now and make it much better
The Amiga and Amos were great!
My website LEAP - Download Paint Pot here!
SpecTre
Developer
21
Years of Service
User Offline
Joined: 24th Feb 2003
Location: UK
Posted: 28th Jan 2016 19:09 Edited at: 29th Jan 2016 03:05
Okay here is another video clip of the rewrite of the game so far.
This includes the new camera scrolling and also a map loaded in from my map editor above. The new Level 1, which if you look carefully includes the level 1 from the first build as part of the map
I apologise for the sound as I forgot to disable the mic so you can hear the news from the TV in the background haha



What do you think?

As you will notice I am using a blue block as the player as I haven't put the Platypus in this rewrite yet, I am completely starting again in this version so bear with me with this
The map supports multi size screens and always uses the full screen without using the %age system which I find is better.

In this version so far I am using the Box2D physics system built into AppGameKit as I thought I would give it another try. The last version I completely wrote my own physics system.
I have nearly got the ladders working, however there are a couple of issues with this.
One is you can't jump whilst on the ladder and you also can't jump if you are at the top or bottom of the ladder so I am trying to get around this.
Bit stuck with it so far here. It is funny though as this is where I am also up to with my Unity version and have the same problem with ladders there too. I sorted this issue in my own physics system in the last build so I will keep trying

Here is a section from my loop code for the ladders:



Any ideas, advice or feedback would be handy

Cheers.

[EDIT]
Just been messing with the code again and I have now managed to solve the top of the ladder part by having the top piece as a platform and making it passthrough when pressing up and down by turning on and off the SetSpritePhysicsIsSensor command. This enables the top of the ladder to be solid when stood on top so can then jump but when press up/down you can walk through it
Quite pleased!
Now just to sort the jumping on the ladder bit. This should be ok to do I think but I need some sleep first
The Amiga and Amos were great!
My website LEAP - Download Paint Pot here!
Crazy Programmer
AGK Developer
19
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Lost in AGK
Posted: 29th Jan 2016 04:13
It is looking very nice! I'm liking this version way better

Sign up for NaGaCreMo!
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 29th Jan 2016 05:08 Edited at: 29th Jan 2016 22:15
very very nice!
as far as the ladders/movement are concerned i'd setup a finite-state machine;
something like;


as far as the ladder is concerned i'd just allow the player to go up/down/left/right within the x-bounds of the ladder and if they go too far left/right the physics engine just takes over and they fall
if they jump (and you don't want them to catch the ladder again) just disable the up/down movement for the ladder until they hit a platform again

Sign up for NaGaCreMo!
SpecTre
Developer
21
Years of Service
User Offline
Joined: 24th Feb 2003
Location: UK
Posted: 29th Jan 2016 12:07
Thanks guys.

Will have to look at the Case system as I haven't used it before.
The Amiga and Amos were great!
My website LEAP - Download Paint Pot here!
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 29th Jan 2016 22:16
you won't regret it. it makes things sooooo much easier

Sign up for NaGaCreMo!
SpecTre
Developer
21
Years of Service
User Offline
Joined: 24th Feb 2003
Location: UK
Posted: 1st Feb 2016 02:30 Edited at: 1st Feb 2016 11:39
Well I could slap my forehead and give out a big sigh right now
Just discovered the GetSpriteContactSpriteID2 command set which has saved me a massive amount of for next loops, I mean a hell of a lot!!!!
I was doing x,y,layer loops, thats 3 times for each x and y for the map which could be 4 or 5 screens wide and 2 or 3 high in order to check for sprite collisions!!!!

All I needed was to check the Contacts with the player which could be 2 to 4 contacts at the most!!!!! See how good these commands are at saving time! Wow!!!

I only found these commands whilst I was looking at the physics commands in the instructions and by chance!..................Crazy!!!! lol
Now to look at the case system

The Amiga and Amos were great!
My website LEAP - Download Paint Pot here!
SpecTre
Developer
21
Years of Service
User Offline
Joined: 24th Feb 2003
Location: UK
Posted: 2nd Feb 2016 01:04
So I have just replace an easy IF statement section of the code with the CASE version and I agree it is easy to use although I haven't used it before, not totally convinced yet if there is a benefit however a more complicated IF/ELSEIF etc section will be needed to be converted to see if it benefits really so will stick with it for now

The Amiga and Amos were great!
My website LEAP - Download Paint Pot here!
Crazy Programmer
AGK Developer
19
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Lost in AGK
Posted: 2nd Feb 2016 18:39
Congrats on your new founded discovery

Progress is moving along quite nicely!

Sign up for NaGaCreMo!
SpecTre
Developer
21
Years of Service
User Offline
Joined: 24th Feb 2003
Location: UK
Posted: 2nd Feb 2016 19:31
Cheers Will, seems to be taking a long time to get there but I suppose I have started from scratch and done a map editor again lol !!!
The Amiga and Amos were great!
My website LEAP - Download Paint Pot here!
Crazy Programmer
AGK Developer
19
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Lost in AGK
Posted: 2nd Feb 2016 19:47
Quote: "I have started from scratch and done a map editor again lol !!!"


Haha I am about to do the same. Every time I stop to think, there is something else that should of been done.

Atleast its a learning experience and we are getting closer and closer

Sign up for NaGaCreMo!
SpecTre
Developer
21
Years of Service
User Offline
Joined: 24th Feb 2003
Location: UK
Posted: 3rd Feb 2016 00:27
Quote: "Atleast its a learning experience and we are getting closer and closer"


Until I decide to redo my map editor again haha
The Amiga and Amos were great!
My website LEAP - Download Paint Pot here!
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 8th Dec 2016 13:05
unlocked
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Quidquid latine dictum sit, altum sonatur
TutCity is being rebuilt
SpecTre
Developer
21
Years of Service
User Offline
Joined: 24th Feb 2003
Location: UK
Posted: 8th Dec 2016 20:17 Edited at: 8th Dec 2016 21:04
Hi all and thanks Batvink for unlocking this thread,

as you can see my last post was on the 3rd Feb 2016!! and since then I still haven't had time to do any more work on this project.
Rather than it sat festering, I thought I would upload all my versions to date on here and also the map editor to see if anyone wants to do some work on it or if you can get any use from the code.
It is not the best code in the world and 10 months old! I think I have got a little better since then but you may find it handy?

I was also in the process of converting it to C++ (tier 2) but not in a working state yet.

Ultimately this game will be released as a free game on various stores, so if you want to add something to it then upload a new zip file and the new improved code to here. Once it gets to a stage where it can be released, if you have done something on it, then you will be credited in the game

This could be like a team project for AppGameKit members, a sort of forum project maybe where those that want to partake could spend a few minutes at a time messing with the game until it's ready?
What do you guys think?

Would be nice to have an AppGameKit forum project where everyone could chip in.

If nobody wants to work on it then no worries, you might get some use from the code but please don't release the game yourself with the same graphics and idea.

There are 3 versions so far which I will upload:

1 - A static screen version. (Coded character controller)
2 - Version which scrolls with the main character in the centre of the screen. (Coded character controller)
3 - Bigger level version with a blue block as the main character as I haven't put the main character in yet. (AGK physics controller)

The static screen version also has a built in map editor for it.

The main map editor has multiple layers.

So far the game has one level set out and a character using double jump.
Ladders are implemented however there is a couple of bugs in this to iron out as you can't jump when at the base of the ladder.

Things I was going to put in when get the chance:

Parallax scrolling.
Wall jump and slide.
Mushrooms to eat for energy.
Eggs to save.
Bad guys - (Gfx so far for Evil Platypus, Rats, Slime)
Water sections.

All the graphics are in the zip files for these.


Hope you can have some fun with this or maybe you might find the code helpful at least
Might be quite useful to read all the thread from start to finish to see where I was going with this but I was thinking, retro 2D platform, Chuckie Egg and Monty on the Run.
The Amiga and Amos were great!
My website LEAP - Download Paint Pot here!

Attachments

Login to view attachments
SpecTre
Developer
21
Years of Service
User Offline
Joined: 24th Feb 2003
Location: UK
Posted: 8th Dec 2016 20:27 Edited at: 8th Dec 2016 20:37
Here are the other 2 zip files I missed off and below is the code for each one.

MAP EDITOR:




FIXED SCREEN WITH BUILT IN MAP EDITOR:

The Amiga and Amos were great!
My website LEAP - Download Paint Pot here!

Attachments

Login to view attachments
SpecTre
Developer
21
Years of Service
User Offline
Joined: 24th Feb 2003
Location: UK
Posted: 8th Dec 2016 20:31 Edited at: 8th Dec 2016 20:41
SCROLLING SCREEN WITH WORKING MUSHROOMS AND EGGS:



LATEST VERSION 1.1 with functions! and AppGameKit physics:

The Amiga and Amos were great!
My website LEAP - Download Paint Pot here!
SpecTre
Developer
21
Years of Service
User Offline
Joined: 24th Feb 2003
Location: UK
Posted: 8th Feb 2017 19:02
Just a little code improvement for pressing left and right keys.



I have added the variable xMovement which takes the keyRight value of 0 or 1 if the right key is pressed and added it to the minus value of keyLeft which is now either 0 or -1 if the left key is pressed.
This now either produces the following:

Left key pressed = -1
Right key pressed = 1
Left and Right keys together = 0
No keys pressed = 0

xMovement is then multiplied to player.xPlayerMove# giving it positive or negative movement for right or left and 0 for no movement.
This is also good as when both keys are pressed nothing happens, this bugged me before because it changed direction when both pressed and it gets rid of the if statement checks for the keys.

Try it and see which you prefer.
The Amiga and Amos were great!

Login to post a reply

Server time is: 2024-04-23 07:10:44
Your offset time is: 2024-04-23 07:10:44