Slick Forums

Discuss the Slick 2D Library
It is currently Sun May 19, 2013 6:25 pm

All times are UTC




Post new topic Reply to topic  [ 53 posts ]  Go to page 1, 2, 3, 4  Next
Author Message
PostPosted: Thu Aug 20, 2009 12:52 am 
Offline
Regular
User avatar

Joined: Thu May 07, 2009 5:09 pm
Posts: 143
Location: Okanagan, BC, Canadia
Hopefully, in sharing some screenshots with you (and an early version webstart or two) I'll become motivated to put more work into G2DP *every single day*. That's the idea, at least.

I suppose some of you may have seen the webstarts or teaser screenshots in other posts on these forums. I'd like to make this the official development thread for G2DP (in addition to it's home on the interwebs).

I'll continue to modify this original post, switching out the screenshot as the game starts to look better. Likewise, the webstart will link to the current working version of the game.

So here's the screenshot to start it off.

Image

Real Webstart: g2dp.jnlp

SVN: http://n3wt0n.unfuddle.com/svn/n3wt0n_g2dp/
SVN User: guest
SVN Pass: g2dppassword

Feedback, comments, questions and encouragement are... encouraged.


Last edited by kdnewton on Tue Sep 22, 2009 6:54 am, edited 3 times in total.

Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 20, 2009 1:30 am 
Offline
Regular

Joined: Sun Oct 05, 2008 9:24 pm
Posts: 173
Nice. The physic demo is actually fun. A whole game of that would be grand!


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 20, 2009 10:16 am 
Offline
Slick Zombie

Joined: Wed Apr 02, 2008 1:32 pm
Posts: 1313
Location: Italy
i like it :D
it's what i want to do :D a simple, nice, phisycs based plaftormer :D

sources will be available for study ?

_________________
Blog | Last game Gravity Duck tribute | In progress Gravity Duck tribute


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 20, 2009 2:00 pm 
Offline
Site Admin
User avatar

Joined: Thu Jan 01, 1970 12:00 am
Posts: 3143
Seriously that is awesome. I really want this - any chance we'll see the source or a lib that we can all make use of? I've wanted to write a simple paltformer for ages but writing up all the boilerplate code cuts into everything else I want to do ;)

So good!

Kev


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 20, 2009 4:04 pm 
Offline
Regular
User avatar

Joined: Thu May 07, 2009 5:09 pm
Posts: 143
Location: Okanagan, BC, Canadia
Wow! Thanks for the great response, everyone.

kevglass: Some of the code is based on the platformer example that you had posted April 4, 2008. I was looking to get something up and running and since you had already provided the onGroundImpl(Body body) method, I just went ahead and used that.

I would love to post the source, and I was looking into a read-only SVN link but my service doesn't seem to provide one. I'm using a free Unfuddle account, so I'm still looking into how to make it available to guests.

I'll push to clean up some irrelevant pieces of code and rough artwork that is not used, and then post a read-only SVN.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 20, 2009 5:57 pm 
Offline
Regular

Joined: Sun Dec 07, 2008 5:22 am
Posts: 238
Location: Vancouver, BC, Canada
Nice; runs smooth, good frame rates, and it's responsive.
If your looking for free svn hosting, might I suggest http://www.xp-dev.com/; it supports read only accounts.

_________________
If at first quads don't succeed tri tri again.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 20, 2009 6:29 pm 
Offline
Regular
User avatar

Joined: Thu May 07, 2009 5:09 pm
Posts: 143
Location: Okanagan, BC, Canadia
That xp-dev is better hosting than Unfuddle. Thanks.

I did figure out the SVN read-only for Unfuddle. I had to create another account and give it read-only access.

I've updated the original post with the SVN information.

SVN: http://n3wt0n.unfuddle.com/svn/n3wt0n_g2dp/
SVN User: guest
SVN Pass: g2dppassword

Now that other eyes can fall on my code, I'll apologise if some of the comments seem to be lacking or maybe refer to something that isn't even there any more. I've been changing so many things so often within my tests that I haven't been paying attention to the existing comments.

I'm also a chronic "quick saver" so I probably commit my code way too often. I'll work on that and will try not to leave anything in a broken state.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 20, 2009 7:13 pm 
Offline
Regular
User avatar

Joined: Thu May 07, 2009 5:09 pm
Posts: 143
Location: Okanagan, BC, Canadia
I've updated the original post with the proper webstart, g2dp.jnlp.

I also just realised that I did not have to package the libs folder when creating the jar, so that shrunk the g2dp.jar down to 1/3 the former size (313 KB, compared to the previous 1.116 MB).

Also, there's no JavaDoc/API for it, but the jar is right there in the webstart directory. http://g2dp.n3wt0n.com/webstart/g2dp.jar


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 20, 2009 9:21 pm 
Offline
Game Developer
User avatar

Joined: Sun May 25, 2008 9:45 am
Posts: 578
Neat! The new webstart is a bit more interesting. Doesn't have any blocks to interact with though. :)

I realize the game isn't finished ;), but I think the jump should vary based on how long the jump key is press (ala Mario). Maybe the jump sound could vary along with the jump height.

How do you plan on making maps? This is kind of neat, he uses paint:
http://mm.soldat.pl/?p=407

I like Google Code for hosting. People can browse your code online and even post code review type comments inline with the code if you'd like. Eg:
http://code.google.com/p/ninjanetworkin ... erver.java

_________________
SingSong Karaoke - http://singthegame.com


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 20, 2009 10:27 pm 
Offline
Regular
User avatar

Joined: Thu May 07, 2009 5:09 pm
Posts: 143
Location: Okanagan, BC, Canadia
Update: Backdrop layer manager added (as Backdrop.java). The current demonstration is a bit... distracting. It shows it off pretty well, though.


I don't mind google code so much, but I've never really wanted to host anything there. I'll keep it in mind for the future, though. I think eventually I will move away from Unfuddle, just not right now.

The maps are made in Tiled, though I've always been fascinated by the likes of Soldat (and that other one, the Team Fortress thing).

As for the jump, I know! I get sidetracked so easily and today I really wanted to get the "backdrop layer manager" working, as I call it. I'm still fiddling with the velocities of bodies to fine-tune it properly. Soon enough and I'll have duration-based jump power.

On the topic of jumping, you may notice that a bug has been carried over from the platformer example. Press jump once, the hero jumps. Press it again before he lands and for some reason the second jump seems to get added to a queue and he'll jump again as soon as he touches the ground. I've got to fix that because it annoys even me.

Jump gets fixed next!


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 20, 2009 10:36 pm 
Offline
Regular

Joined: Sun Oct 05, 2008 9:24 pm
Posts: 173
The backdrop is looking good. Is it in three parts that move that different speeds? Has a nice feel to it.

Also, some of the blocks you can walk though.

What license is the code under?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 21, 2009 12:02 am 
Offline
Regular
User avatar

Joined: Thu May 07, 2009 5:09 pm
Posts: 143
Location: Okanagan, BC, Canadia
rhino wrote:
The backdrop is looking good. Is it in three parts that move that different speeds?


Yes, three parts. The backdrop layer manager is meant to sort the background images in order of increasing width, and render them in that order. It takes care of the movement speed of the background images, relative to the player position.

I don't quite like that the backgrounds move when the player moves. I want to fix it up so that the background moves only when the screen itself moves.

rhino wrote:
Also, some of the blocks you can walk though.


That's the handiness of Tiled. I've split the map into three layers. Background, platforms, and foreground. They are rendered in that order, and G2DP knows that anything not in the platforms layer does not get a physics body associated with it, thus the hero can't collide with them.

rhino wrote:
What license is the code under?


I'm from Canadia, so it's distributed under CC by-nc-sa 2.5 Canada.

I suppose I reserve the right to change the license. So henceforth, anyone who is a registered member of the Slick forums can use the code commercially. There.

That's still a long ways off, though.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 21, 2009 11:36 am 
Offline
Slick Zombie

Joined: Wed Apr 02, 2008 1:32 pm
Posts: 1313
Location: Italy
Really thanks :D
i'll study your code :D

_________________
Blog | Last game Gravity Duck tribute | In progress Gravity Duck tribute


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 21, 2009 11:46 pm 
Offline
Regular
User avatar

Joined: Thu May 07, 2009 5:09 pm
Posts: 143
Location: Okanagan, BC, Canadia
Another update commited.

There is no longer a "jump queue". Jumping only does something while the hero is on the ground.

Also, tapping the jump key no longer results in a full jump. Now players can jump as low or as high (to the hero's limits) as they want.

The webstart has been updated.

A note to myself: I'd like to fix the occasional mid-air jump. The mid-air jump is achieved by walking off an edge and soon after, pressing jump. The hero jumps, but there's nothing under him to jump off of. Kind of cool, but it's a bug.

Likewise, I may have to play with the update input normaliser. 50 milliseconds should be good enough, but for some reason, sometimes the hero does not jump as high as he can even when the jump button is held. I can see this leading to frustrated players, missing tricky jumps. It's a rare occurance, though. I'm only guessing that the update delta holds the answer.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Aug 22, 2009 12:03 am 
Offline
Regular

Joined: Sun Oct 05, 2008 9:24 pm
Posts: 173
you can do a triple jump if you press up 3 times. it's hard to do, but can be done.

I like the double jump in video games. I think it's a cool feature. They way you have it now though, it seems a bit random.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 53 posts ]  Go to page 1, 2, 3, 4  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group