Thursday, December 22, 2011

Nearly making progress:

Here's another output:

*****************
Isaac Rivera did not purchase lemonade:
Reason: I'm not thirsty
*****************
Kyle Campbell purchased lemonade.
Satisfaction: 75.72478777137633
Reaction: :D
*****************
Aidan Taylor did not purchase lemonade:
Reason: Too pricey!
*****************

Test 00XX:

Name: Jenna Butler
Sex: Female
Social Class: upper
$$$ in Wallet: 1.5
Satisfaction: 50.0
Flavor: sweet
[Monday, Tuesday, Wednesday, Friday, Saturday]
Jenna Butler purchased lemonade.
Drinking...
Satisfaction: 75.72478777137633
Reaction: :D
------------------------------------------------
Recipe Criticism: Perfect
Recipe Grade: 3
Recipe x: -0.429
Recipe Success: 0.9999979980015041
Recipe Flavor: sweet
------------------------------------------------

Wednesday, December 21, 2011

Java File Save and File Load: Objects

A Beginning Programmer's Guide to Java: Java File Save and File Load: Objects

Revert

I changed the layout again. I think this one will last much longer. Like it? Also, I have a treat for you if you go to ez-squeeze.blogspot.com/. I decided I had some unfinished business so I'm working on a "revolutionary" bugfix. Enjoy one of the few tests I bothered to try. For some reason I took a liking to a lot of coding and a little making sure the code works. But it does!

Test Data 0003:

The writing and testing of these new classes is going great. Here's a sample output that deals with the possible methods. Consider it proof of concept.
(Today is monday, price = $0.70)
-------------------------------------------
Name: Gabriella Hill
Sex: Female
Social Class: lower
$$$ in Wallet: 0.6
Satisfaction: 0.5
[Monday, Tuesday]
Gabriella Hill did not purchase lemonade:
Reason: Too pricey!
-------------------------------------------
Name: Megan West
Sex: Female
Social Class: lower
$$$ in Wallet: 0.6
Satisfaction: 0.5
[Tuesday, Thursday, Friday, Saturday]
Megan West did not visit today.
-------------------------------------------
Name: Rachel Harris
Sex: Female
Social Class: middle
$$$ in Wallet: 1.0
Satisfaction: 0.5
[Monday, Thursday, Saturday]
Rachel Harris purchased lemonade.
-------------------------------------------

Tuesday, December 20, 2011

Person()

I was letting my little brother play this game and wondered how he had over $10,000 in only a couple days. Turns out my massive probability formula had a huge bug in the pricing portion of it. I am working on a fix right now (as well as multitasking with finals, ffocal.com, Christmas needs, and personal entertainment needs), but this shouldn't flip the whole project upside-down too much. I decided, why not make this game a little more about maintaining regular customers. So that the same ~200 people will always be walking past your lemonade stand. Perhaps some only walk by on certain days. I asked myself, "Self... what is the best way to do this?" And of course I told myself that a Person class is just what I need. Using a Person object, I can use an array of Persons and each Person can have a name, satisfaction level, amount of money in his/her wallet, a gender, preference for recipe,  schedule, and patience level. Not only does this sound like an amazing idea, but it might actually work! Also, when I eventually get the updates working, it will allow upgrades to work within the people themselves by making people more likely to buy internally (for example, "rewards card" "higher patience", "salary bonus"). Also, it will make it easier when I finally convert it to 2d graphics, or if I'm feeling especially self-confident, 3d graphics. We'll see when you actually get it. Happy Holidays!

Sunday, December 11, 2011

New to Java Filter

        It's been awhile since I've last blogged and so I thought I would post what's new. As you probably saw already, I updated Java Filter to Google's dynamic views. I believe this one is the sidebar option, which seems to fit best because I tend to not post many pictures. It looks a little empty right now, but I'll try and see if I can fix that.

        EZ Squeeze Empire was a great idea at the time, and I intend to finish the last update and try to make it with a 2d library and more enjoyable to play. However, I'm currently unable to work on it at this time and will continue later on.
My resources are currently going to a much larger project, and I will shamelessly promote it now: ffocal.com

        I cannot take credit for the idea nor the work, but I can say that I am trying my best to play a part in some of the underlying functions that are necessary for it to work. I'm new to the Ruby programming language, and this has taught me a lot about it. Luckily it has a lot of similarities to Java and learning Java has helped me learn Ruby.

Sunday, October 23, 2011

1.03 sneakpeak

update:
due to a lack of motivation this won't be released until I work up the patience necessary to get all the included upgrades working correctly and save/load-able, sorry :[

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

I expect the release to be within the next two days (sorry for the delay, in my defense I technically was a week ahead of myself)
Here is the expected new interface which helps make it much less crowded, allows for a place for upgrades, and will warm you up for future changes:

Friday, October 21, 2011

1.03

This update will allow for upgrades and any end user may make their own upgrades in addition to the 10 premade by editing the XML file and adding the necessary fields, I'm trying to make this as little brutal as possible so making upgrades is easy but that process in itself is a long one, the update is not quite finished and I will release as soon as its done.
On a side note, I've been having trouble with netbeans and it throwing lots of errors while running ( and that's trying to run it after it used to work and no changes have been made) so I made the switch to eclipse IDE and that's working out well. It's a little unfamiliar but the project runs fine

Tuesday, October 11, 2011

Release 1.02

Download 1.02 Here
Release Notes:
  • single of the hundred(s) of fancy getters used for versioning in the About Box
  • changed the amount of customers to not increase dramatically per day
  • save and load functions using JFileChooser
  • added class "RestrictedFileChooser.java" (for use with JFileChooser)
  • added class "upgradeParser.java" (for use with upcoming updates)
  • fixed menubar, got rid of the layeredPane, and changed designed components to absolute placements (this step was possibly more trouble than it was worth)
  • I included in this download a shortcut: NOTE: YOU MUST CHANGE THE TARGET FOR IT TO BE USEFUL, I was hoping that it could be used so that you can stick the .jar and documentation in a folder hidden off somewhere and the shortcut be placed on the desktop or start menu, and if you know how to do that then great, but it must be targetted at the .jar file

Monday, October 10, 2011

Save and Loading Files


Saving and loading is now coded using JFileChooser and I'm happy to say it is far more advanced than any option dialog box I've ever made. It looks different since I'm using the Java look and feel but somewhat classy and elegant. It is intended to start in a saves directory which it creates upon saving and loading but if that doesn't happen, you should be able to navigate to whatever directory you want. I also added a new class to the package in this version, nothing too major, but it's useful in implementing the save and load. I hope to add more before the release of 1.02 on Friday, possibly images. It might run noticeably slower but I'd like to replace the about box terrible drawing of a lemon with a higher resolution and more realistic photo soon. That's all for now.


Sunday, October 9, 2011

(Early) Bug Release

Download here: http://ez-squeeze-empire.googlecode.com/files/game-1.01.zip
Release notes:    
     * ice melts
     * cheaper prices for some items
     * sales made today fixed
     * huge bug where every customer bought everytime fixed
     * forces you to not serve old lemonade

Saturday, October 8, 2011

A Look into the Future

Expected features for next update: ice will melt at the end of every day (it's way too easy the without that), save/load data (includes recipe/money/supplies/etc.), provide a mediocre default recipe
Expected features for later: installer, .exe launcher, things to spend money on (upgrades, advertising, venues),  high score list, icons for supplies, display more stats and use graphs/charts, random events (like hurricanes, sugar going bad, lemons spoiling), some easter eggs like konami code :P
Expected features for much, much later: graphics, more pleasant and fun interface, FAQ, hints, online competitions, challenge mode

Friday, October 7, 2011

Initial Release!

Version 1.0 is complete!
Simply download here:
http://ez-squeeze-empire.googlecode.com/files/EZ_Squeeze_Empire-1.0.jar
and open the file (hopefully you have java on your computer) to play. Comment your thoughts so far please.
--update--
Oops, I accidentally forgot to include the lib necessary to run the .jar
use this link instead:
http://ez-squeeze-empire.googlecode.com/files/EZ_Squeeze_Empire-1.0.zip
then unzip and extract all, then you can open and play the jar file

Thursday, October 6, 2011

Day 3

 After high difficulties with the menuBar, I finally got it back, but the cost was a stupid panel within a panel...sorry. Code updates include the completion of the awesome purchase part of the program. Initial release is still expected for tomorrow :P
Also, it is my goal to have a minor updates weekly, probably every Saturday. Maybe if I'm feeling generous, then I'll release good recipes to use...

Wednesday, October 5, 2011

DropBox

For free online storage, try dropbox. I'm going to implement it for EZ Squeeze Empire alongside GBridge for maximum portability. Here is a refferal link: http://db.tt/6iwPa8Y (which will give both of us additional storage)

Tuesday, October 4, 2011

Day 1

2156 .:. The number of lines in this project after one day of writing any code.

Today was spent mainly declaring, naming, and setting values to variables - which there are a lot of in this project. However I myself only physically made about 70 lines max. 600 were automatically generated for the UI. And the remaining were accidentally created when NetBeans asked me to fix something and I accepted without reading. Oops. Well now I have fabulous getters and setters for every single variable, including textfields, buttons, and MenuItems... oh yeah that's the other thing, I somehow lost my Menu... It was there, but now it isn't :[
We'll see if we can find it prior to release, which is expected for FRIDAY, the 7th.
So among todays accomplishments, the purchase screen is being set up. Now the choices from the JComboBox affects the amount and price, so next is the buy button.
--- 


Sunday, October 2, 2011

New Project

EZ Squeeze Empire is my new and latest project. It is a lemonade stand type game written in Java using the Swing library. Jeff Gough and myself, with the help of Netbeans, will try to have this available as soon as possible. Please feel free to follow, comment, and provide suggestions. Thanks :]

Coming Soon!

EZ Squeeze Empire is an upcoming collaborative project written in Java Swing. It is my first just-for-fun project. It looks like it will turn out pretty good. Jeff Gough and myself will have the first version out soon, we just have to get started... But anyways the UI is practically finished for the initial release, but no code has been written - Thank you NetBeans GUI creator :] NetBeans.org Also Thank you to GBridge, a very useful tool for VPN because it offers file-sharing, chat, and desktop sharing through use of a Google Account. GBridge.com Please follow this project, any comments and suggestions are welcome and will be used as motivation.

UI to be used in initial release.

Sunday, August 28, 2011

Physicsim Closed

"I might provide support if an issue is written and I am alerted of it, but I am done with development for this project and do not intend to write/upload any more code/files/documentation"

I'll leave this blog open for all intents and purposes, but for other project details see
http://javafilter.blogspot.com

Weighted Grade Calculator

Now available on the applications tab is a weighted grade calculator. It was extremely easy to make with the help of Netbeans GUI builder. I did actually have it available to download for quite some time now but the applet HTML tag was broken. Im glad to announce that it is now fixed. Feel free to use, download, share, and embed on other sites.

--Update 1/15/14
I'm not sure what happened to this application in the migration.

Wednesday, August 24, 2011

Work

Getting a little confused in my code but working on r23.
UPDATE:

very very frustrated with this program, attempting brute force, must sleep, try more tomorrow
EDIT:

making some slight progress, got the ball to move, now to reincorporate checks at ground level and for bounce
Update:

bounces, sometimes, able to choose where the ball goes but it sometimes wont reset at all, and seems as if it doesnt move at the right speed or bounce as it should (maybe a broken timer?) considering the end of this project....
still needs all the output speeds/numbers annnnnnnd too many bugs :/


Newly Found Inspiration

School seems to have been the one thing I needed to convince me to begin programming more. With a TI-83+ calculator, I am currently teaching myself BASIC (at least the TI form) and making some pretty interesting programs. In a single day I have made quite a few programs already. One of which, you choose two numbers, it multiplies them, and increments (or decrements based on your choice) to infinity. Other battery killers are one that increments to infinity while clearing the screen after every number as soon as you post it (as a prank to put on anothers calculator and leaving it on all night), a screen saver (irony?) that draws patterns on a graph, and a random number game: pick a number between 1 and 10 and if you're right you win. To go with all these programs, I did however create one useful one. You put in the A, B, and C values and it spits out the 2 possible values from the quadratic formula - or if it is unreal, it tells you and returns the determinate. I hope to make many more and finally get the latest version of PhysicSim done soon.

Friday, August 19, 2011

Java for IOS

Java has always been my choice drink and programming language of choice. So when I heard that apple refuses to allow integration of Java on their handheld devices, I was thoroughly upset. However, with a jailbroken device, I knew there must be some way, some get around. With a new motivation, Google at my fingertips, and a cup of freshly brewed joe, I searched and came across OpenJava -with their purpose being to reach low power devices. Then, I found what I was looking for. iphoneroot.com had the answer. However, the article and tutorial seemed a little outdated, but I managed. I opened up cydia and searched keyword:"java" and found nothing. Supposedly saurik had it in his source, so I scrolled through the source. Nothing. An inspiration suddenly flowed through my drink into me and caused an epiphany. I went to (cydia) Manage>Settings>Developer. Searched again for java and what do you know! There it was! So after installing JamVM, Java SQLite, Jikes, JocStrap, and everything that came with, I was overjoyed in the prospect of enhancing this touchscreen toy. I opened up the app that came with for java examples, and it failed to open...So I tried again...and again...and again...nothing. Realizing that developer setting means the apps are commandline tools, I opened Terminal - which has never worked for me previously. More research, more java, led me to http://cydia.xsellize.com, a repository with an updated MobileTerminal (should also be on the code.google.com project site if you want to ssh into it), I replaced my old one and it worked! I wrote a simple HelloJava application, compiled it via Terminal (jikes -cp /usr/lib/rt.jar)and ran it (java HelloJava) and admitted success. :] Now for me to make some worthwhile programs for my iPod and hopefully see if a GUI is within JamVM's capabilities. The Java applications on cydia were supposed to bind Objective C and Java in a sense, but I'll see about that next time.

Thursday, July 28, 2011

Delay

After being sick for 2+ weeks and forgetting everything about my new code (I wish I would've commented more), I decided to work on a couple side projects until my motivation to continue PhysicSim returns. My apologies..

Tuesday, July 5, 2011

Sneakpeak

 Done for the most part with the options frame, although i should add a reset button. It should be easy to do but i'll do that for the following release. But anyways take a gander :P
I think it's a good improvement from the previous versions. Oh and by the way this would be my first time using layouts.

Sunday, July 3, 2011

ETA

I made a lot of simple methods to make the process a lot cleaner and intend to set it up for easy additions, the UI is practically complete and If I put much work each day into it then you could expect it in a week. Don't get your hopes up heh



Tuesday, June 28, 2011

Problem Solved

I can once again return to writing r23 thanks to the friendly people of http://www.javaranch.com/. They helped me realize the obvious solution that i had accidentally declared my textbox and button objects as local variables and were therefore unseeable to the ActionListener. Back to work :D

Sunday, June 26, 2011

Progress

Development for the next revision is going slow because problems keep arising. The new UI looks much better, however the objects in the frame/window are not behaving well with the Applet but I will find a way eventually. I am keeping it in awt, which means image buttons are still wreaking havoc, but I redesigned the background, ball, and every other image. The ball has a much smoother look to it and I also found new sounds to use, you may recognize them. Currently the code is about 253 lines (the previous was more than 500) but it is pretty much just a skeleton. It has practically no logic added yet. If you have any tips for getting a textbox value from a frame to a separate component (the main applet window) then please share.



Friday, June 24, 2011

UI Changes

Working on some code cleanup right now, and hoping to add a pop-out frame/window for the controls. I will consider changing the object y location to be based on mouse click rather than the draggable platform, but x direction moving is not expected for r23. Expect a release in the future but not quite soon. I found this website to be a useful start for frames: http://www.krhs.net/computerscience/java/frames.htm

Sunday, June 19, 2011

Coder's Block

I'm considering a rewrite of my last revision to clean up the code some, so enjoy this marble run game that I found while exploring Mozilla's dev site.
Marble Run - http://marblerun.at/tracks/new

Tuesday, May 31, 2011

Finals


With finals this week and summer break just around the corner, I have 3 options I have been considering.
1. Continue on PhysicSim as I've been doing, until I have cleared every milestone I wish to.
2. Start a new project that branches off of this one, only make it a game rather than a boring simulation, then extend anything I learned how to do back into PhysicSim.
3. Drop the project temporarily and focus on more important things, such as the temperature of the pool and how tan I can get in a week :P
I'm personally leaning towards the option behind door #2 because there would be no easy way to make PhysicSim enjoyable to use without taking away the physics simulation features ( read as: no start/stop/reset/timer/current height/current velocity/custom numbers to crunch).


Friday, May 27, 2011

R22







Huge update:
Added support to specify controls for each one, removed public declarations because I found them unnecessary, added support for additional multiple objects to be much easier [would just have to add buttons for them], made the bounce count show current ball in focus's count over the total amounts of bounces, made the area of applet wider so it's an even square. Also includes all the features mentioned in the previous post.

Friday, May 20, 2011

Up to no good:

Currently working on support for multiple objects, this might take some time.

Completed but not released yet: a better timer, a double width area, a MediaTracker, and the ability to click where the x location of the object is

[update]
added 5 simultaneous objects, arrays to make it easier for future support for more objects, buttons so can choose velocity and Restitution for each, The preferences to display for the current object, the mouse to show which object is selected as a mouseEvent and I attempted to make each object as separate as possible from the rest however must drop all from same y location, will try to work out some quirks before releasing and will hopefully have r22 out before Monday

Sunday, May 15, 2011

View Online

Finally got the applet to correctly appear online. Check it out either by clicking launch or the tab above. :]
Please, if you find any problems, check out the project site and submit an issue.

Friday, May 13, 2011

R20 and 21

21: added restitution to default values cause i had forgotten, added bounce count, and option to turn sound on/off
20:No UI changes, but added sounds. Taking this one step at a time- the next revision expects to have an option to turn sound on/off and display what bounce the ball is current on.

R19

Lots of updates going on right now. Added the ability to bounce or stop on collision and also included a textbox to input a custom restitution. The elements at the bottom were moved around to add the current ball height down there too.

Thursday, May 12, 2011

R18

Finally got bounce up and running. It is a little buggy especially when the scale is high, a more efficient way to bounce will be added later. The current restitution is 0.8 but expect to be able to customize It in the near future. This update also includes a useful string to tell you the current height.

Friday, April 29, 2011

R17

Update includes an improved fps counter, the ability to change the fps by changing the seconds per frame, also put the main logic into a thread that utilizes sleep rather than a timer. Changed the appearance too

Sunday, April 17, 2011

R16

Makes use of textboxes to select gravity, the scale, and velocity. Also includes some minor under the hood changes.

Saturday, April 16, 2011

R15

Open-source Java applet version 15. See link on right for project page.

R14

Overview

Physics demonstration in Java

Currently features:
  • Now an applet
  • double buffered graphics
  • timer
  • current velocity measurement
  • a fps counter
  • customizable (draggable) height
  • start/stop button
  • input custom initial velocity (+/-)

Coming soon hopefully: x and y direction, bounce on collision or other effects, choice multiple objects, collision with multiple objects (conservation of momentum), choose the gravity, choose scale, themes, sounds, use threads to speed of processes, choose refresh rate, add obstacles, make methods of every physics calculation so can easily be made more game-like