kevglass
|
 |
«
Posted
2011-03-24 13:46:32 » |
|
I can't believe it's come to this but, along with the other two games I'm working on, I've written a game for my girl friend, intended to be like the farming games you find on facebook. It turned out to be a good exercise in finding issues with my little cross platform game API over the last week. Veggie Patch - it's one of the farming games, y'know? Applet: http://www.legendsofyore.com/veggie/game.htmlAndroid: http://www.legendsofyore.com/veggie/android.htmliPhone: http://www.legendsofyore.com/veggie/iphone.html Now, it being one of those games you have to wait for hours for things to grow. On the web version that means you have to check back to the page using the same browser (state is stored in cookies). On the android and iphone versions that means just opening the application again later.  Hopefully someone will enjoy the never ending task of tending your garden to make money. It's mostly complete in terms of features but probably needs a lot more data and polish. You can currently: - Dig the ground to plant seeds
- Buy seeds to plant
- Plant them
- Harvest Crops
- Sell Crops
- Mix recipes from crops - which you can then sell for more
 Any feedback on what works and doesn't work both technically and from a game play point of view would be much appreciated. For those patient players who actually get something to grow let me know how it works out. For those impatient players I'll add a way to speed up time next  Thanks for any feedback, Kev
|
|
|
|
bobjob
|
 |
«
Reply #1 - Posted
2011-03-24 14:51:27 » |
|
Hey Kev, I just got into android dev as well and wanted to something similar with my aquarium app. i got: 1
| Did not find cookie: _patch |
on Mozilla 4. I think you need to add the word MAYSCRIPT at the end of your applet tag: edit: it should be MAYSCRIPT=true 1
| <applet archive="jars/VeggiePatch-applet-7.jar" width="480" height="320" code="org.newdawn.touchapi.applet.TouchApplet" MAYSCRIPT=true> |
also when i close the browser page i get: 1 2
| sun.plugin2.main.client.PluginMain: unrecognized message ID 27 org.newdawn.patch.PatchScreen@6f50a8 |
I was wondering though, why did you go with cookies to save game states rather than logging in?
|
|
|
|
kevglass
|
 |
«
Reply #2 - Posted
2011-03-24 15:01:38 » |
|
Thanks for the MAYSCRIPT tip!
Went with cookies because I didn't really want to manage a server to store game state for this game. It's really intended for handset play.
Kev
|
|
|
|
Games published by our own members! Check 'em out!
|
|
fruitmaze
|
 |
«
Reply #3 - Posted
2011-03-24 16:14:01 » |
|
I like the game! Nice idea, and the graphics is very pretty. But what I miss is some kind of selection-sprite when you click on an icon etc, and more animations when you plant something for example. Then I think it will be an awesome game.
|
|
|
|
kevglass
|
 |
«
Reply #4 - Posted
2011-03-24 16:20:10 » |
|
Unfortunately MAYSCRIPT didn't seem to fix the issue with cookies on some browsers. Maybe I will have to use a server side save in the end anyway  Kev
|
|
|
|
bobjob
|
 |
«
Reply #5 - Posted
2011-03-24 16:28:07 » |
|
got: 1 2 3 4 5 6 7
| Exception in thread "Thread-11" java.lang.NullPointerException at org.newdawn.touchapi.applet.Java2DFont.getWidth(Unknown Source) at org.newdawn.patch.PatchScreen.draw(Unknown Source) at org.newdawn.patch.PatchGame.draw(Unknown Source) at org.newdawn.touchapi.applet.TouchApplet.gameLoop(Unknown Source) at org.newdawn.touchapi.applet.TouchApplet.access$200(Unknown Source) at org.newdawn.touchapi.applet.TouchApplet$1.run(Unknown Source) |
when refreshing the page.
|
|
|
|
kevglass
|
 |
«
Reply #6 - Posted
2011-03-24 16:46:15 » |
|
Did the game stop working at that stage?
Kev
|
|
|
|
bobjob
|
 |
«
Reply #7 - Posted
2011-03-24 16:56:21 » |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
| org.newdawn.patch.PatchScreen@3cc262 sun.plugin2.main.client.PluginMain: unrecognized message ID 27 org.newdawn.patch.PatchScreen@1ed1b0b sun.plugin2.main.client.PluginMain: unrecognized message ID 27 org.newdawn.patch.PatchScreen@97d026 org.newdawn.patch.PatchScreen@2798e7 org.newdawn.patch.PatchScreen@147917a sun.plugin2.main.client.PluginMain: unrecognized message ID 27 org.newdawn.patch.PatchScreen@19da967 sun.plugin2.main.client.PluginMain: unrecognized message ID 27 org.newdawn.patch.PatchScreen@5c98f3 Exception in thread "Thread-46" java.lang.NullPointerException at org.newdawn.touchapi.applet.Java2DFont.getWidth(Unknown Source) at org.newdawn.patch.PatchScreen.draw(Unknown Source) at org.newdawn.patch.PatchGame.draw(Unknown Source) at org.newdawn.touchapi.applet.TouchApplet.gameLoop(Unknown Source) at org.newdawn.touchapi.applet.TouchApplet.access$200(Unknown Source) at org.newdawn.touchapi.applet.TouchApplet$1.run(Unknown Source) sun.plugin2.main.client.PluginMain: unrecognized message ID 27 org.newdawn.patch.PatchScreen@cbd8dc |
I had to refresh the browser a few times to get the same error. but it only does it on close, so doesnt effect the game at all.
|
|
|
|
bobjob
|
 |
«
Reply #8 - Posted
2011-03-24 21:06:38 » |
|
Unfortunately MAYSCRIPT didn't seem to fix the issue with cookies on some browsers.
Kev I noticed when you added =true, you deleted MAYSCRIPT
|
|
|
|
kevglass
|
 |
«
Reply #9 - Posted
2011-03-25 09:06:06 » |
|
DOH!!!!!!
Fixed and updated.
Kev
|
|
|
|
Games published by our own members! Check 'em out!
|
|
Azulon
Senior Newbie  Medals: 1
|
 |
«
Reply #10 - Posted
2011-03-25 15:20:19 » |
|
What engine or library did you use for this? Just curious looks really good.
|
|
|
|
SwampChicken
|
 |
«
Reply #11 - Posted
2011-03-25 15:31:11 » |
|
kevglass, Thanks for posting up lots of screenshots.
|
|
|
|
Riven
|
 |
«
Reply #12 - Posted
2011-03-25 17:29:47 » |
|
Please make it 3600x faster
|
Hi, appreciate more people! Σ ♥ = ¾ Learn how to award medals... and work your way up the social rankings!
|
|
|
bobjob
|
 |
«
Reply #13 - Posted
2011-03-25 20:48:59 » |
|
Ok I changed the html code to see if I could get cookies working and I did this: <head> <title>Veggie Patch</title> <style type="text/css" title="currentStyle">@import "style.css";</style> </head> <body> <br/> <center> <applet archive="jars/VeggiePatch-applet-11.jar" width="480" height="320" code="org.newdawn.touchapi.applet.TouchApplet" MAYSCRIPT=true> <param name="game.class" value="org.newdawn.patch.PatchGame"/> No Java </applet> </body> </html>
I think it may have been the <html> tag, or the quotation marks that wasnt allowing MAYSCRIPT to work in IExplorer that said now that it works from here. I get this exception: Did not find cookie: _playerStock Did not find cookie: _sellStock Exception in thread "Thread-12" java.lang.NullPointerException at org.newdawn.patch.SeedStock.fromSaveString(Unknown Source) at org.newdawn.patch.PatchScreen.loadGame(Unknown Source) at org.newdawn.patch.PatchScreen.setup(Unknown Source) at org.newdawn.patch.PatchGame.setup(Unknown Source) at org.newdawn.touchapi.applet.TouchApplet.initGame(Unknown Source) at org.newdawn.touchapi.applet.TouchApplet.access$000(Unknown Source) at org.newdawn.touchapi.applet.TouchApplet$1.run(Unknown Source)
|
|
|
|
Nate
|
 |
«
Reply #14 - Posted
2011-03-25 21:20:35 » |
|
Ohgodohgodohgodohgod... 
|
|
|
|
|
kevglass
|
 |
«
Reply #16 - Posted
2011-03-26 10:49:35 » |
|
What engine or library did you use for this? Just curious looks really good.
I'm using a very simple game api I wrote specifically to let me port between applet, android and iphone. It's very basic and isn't terribly fast. However, it lets me blit images and fonts, play back sounds and get mouse/finger input. Few platform specific tweeks going in now tho. Basically all I need for this stuff  Thanks for posting up lots of screenshots.
Seriously, is that ok? I don't want the posts to get really long but I find it nice when people show the stuff before I have to go click the link  Please make it 3600x faster
OK - as mentioned above, theres going to be a fast mode that will probably turn 1 hour into 5 seconds. Sound alright? Kev
|
|
|
|
TheMatrix154
|
 |
«
Reply #17 - Posted
2011-03-26 16:20:27 » |
|
Oh nooooo! My little farm vanished the second time... Ally my cabbage is lost again *sniff* 
|
|
|
|
ra4king
|
 |
«
Reply #18 - Posted
2011-03-26 21:03:25 » |
|
What engine or library did you use for this? Just curious looks really good.
I'm using a very simple game api I wrote specifically to let me port between applet, android and iphone. It's very basic and isn't terribly fast. However, it lets me blit images and fonts, play back sounds and get mouse/finger input. Few platform specific tweeks going in now tho. Basically all I need for this stuff  That is awesome! But then there is also libgdx  EDIT:wait...iPhone too? How? Don't you need to use Objective-C? EDIT2:hehe you wrote Android twice in your original post. Thanks for posting up lots of screenshots.
Seriously, is that ok? I don't want the posts to get really long but I find it nice when people show the stuff before I have to go click the link  That is very appreciated  Please make it 3600x faster
OK - as mentioned above, theres going to be a fast mode that will probably turn 1 hour into 5 seconds. Sound alright? [/quote] Isn't 1hr/3600 = 1 second? hehe  Overall, I quite enjoyed your game, except for the slow harvest.  Good job! 
|
|
|
|
kevglass
|
 |
«
Reply #19 - Posted
2011-03-27 21:05:39 » |
|
Updated: - Notification of crop tending - More veggies to grow - Fast mode (Menu > Fast Mode) - Various fixes. Note that fast mode resets your game. Next is online saving rather than cookies, cause that seems to be a pain  Kev
|
|
|
|
ra4king
|
 |
«
Reply #20 - Posted
2011-03-27 21:13:10 » |
|
I'm wondering, how do you save cookies while in an applet? I don't see any similar functionality in AppletContext.
|
|
|
|
steveyO
|
 |
«
Reply #21 - Posted
2011-03-27 22:01:43 » |
|
Worked fine on Android Tablet you'll be pleased to know (in case you haven't tried!)
|
|
|
|
bobjob
|
 |
«
Reply #22 - Posted
2011-03-27 23:23:07 » |
|
I'm wondering, how do you save cookies while in an applet? I don't see any similar functionality in AppletContext.
Here I put a post in the Shared Code section on how to do this.
|
|
|
|
kevglass
|
 |
«
Reply #23 - Posted
2011-03-28 09:04:55 » |
|
Cheers Bobjob!  Another quick update, fixes a few issues no doubt adds some others. Tidied up some GUI stuff. Kev
|
|
|
|
bobjob
|
 |
«
Reply #24 - Posted
2011-03-28 18:44:17 » |
|
Cheers Bobjob!  your welcome. I know im probably getting annoying now but, one other not so important issue, on the webpage is the <center> tag isnt closed with </center>, also I dont think applet <parameter... is ment to be closed off with the "/" character.
|
|
|
|
kevglass
|
 |
«
Reply #25 - Posted
2011-03-28 19:00:55 » |
|
Never annoying.
The parameter tag does need to be closed - it's XML after all. Point taken on the center tag, fixing now.
Kev
|
|
|
|
bobjob
|
 |
«
Reply #26 - Posted
2011-03-28 19:44:32 » |
|
The parameter tag does need to be closed - it's XML after all. good to know, I was under the impression that the applet paramater was a html anomaly.
|
|
|
|
kevglass
|
 |
«
Reply #27 - Posted
2011-03-30 16:47:04 » |
|
Minor update
- Fix notification timing on android - Fix saving on applets.
Kev
|
|
|
|
|