gatech-csl / jes

The Jython Environment for Students allows students to write Jython programs that can manipulate pictures, sounds, and videos.
http://mediacomputation.org/
59 stars 38 forks source link

Fixed purple text bug, raw_input bug, and added keyboard mouse functionality #85

Open sportsracer48 opened 9 years ago

sportsracer48 commented 9 years ago

Ideally I would have submitted this pull request before adding any features, and it would just be bug fixes, but oh well. Here we are.

First, the bug fixes. If you stop running a program while waiting for raw_input, then the next time you run raw input it immediately throws an error. I fixed this by cancelling the prompt before halting the execution thread. This cannot be the right way to do it, but I'm not sure there is a better way.

I fixed the purple text bug by letting the main thread join the thread that initializes the name space. This removes what was before a race condition.

I also added a bunch of keyboard and mouse input features. As a student learning python with JES, I often wanted to be able to click on displayed pictures, or control them by pressing keys, not typing into the console. With these functions, those both become possible. They have direct queries (isKeyPressed, isLeftMousePressed) and a simplified event queue (hasKeyEvent, getKeyEvent).

It is the unfortunate truth that most people who want to learn to program want to make games. This allows them to do so, but it has other applications, like drawing or image manipulation user interfaces.

Last year I distributed a modified version of JES around my school, which allowed students to use keyboard/mouse input. Everyone who gained the ability immediately jumped on it, and began making games.

If games are what they want to make, why not let them.

I also added a buildAndRun.bat, for convenience.

mjguzdial commented 9 years ago

Thanks for all the fixes! I'm going to save the keyboard and mouse events for JES 5.1. This release will be bug fixes only.


From: sportsracer48 [notifications@github.com] Sent: Thursday, April 09, 2015 1:07 PM To: gatech-csl/jes Subject: [jes] Fixed purple text bug, raw_input bug, and added keyboard mouse functionality (#85)

Ideally I would have submitted this pull request before adding any features, and it would just be bug fixes, but oh well. Here we are.

First, the bug fixes. If you stop running a program while waiting for raw_input, then the next time you run raw input it immediately throws an error. I fixed this by cancelling the prompt before halting the execution thread. This cannot be the right way to do it, but I'm not sure there is a better way.

I fixed the purple text bug by letting the main thread join the thread that initializes the name space. This removes what was before a race condition.

I also added a bunch of keyboard and mouse input features. As a student learning python with JES, I often wanted to be able to click on displayed pictures, or control them by pressing keys, not typing into the console. With these functions, those both become possible. They have direct queries (isKeyPressed, isLeftMousePressed) and a simplified event queue (hasKeyEvent, getKeyEvent).

It is the unfortunate truth that most people who want to learn to program want to make games. This allows them to do so, but it has other applications, like drawing or image manipulation user interfaces.

Last year I distributed a modified version of JES around my school, which allowed students to use keyboard/mouse input. Everyone who gained the ability immediately jumped on it, and began making games.

If games are what they want to make, why not let them.

I also added a buildAndRun.bat, for convenience.


You can view, comment on, or merge this pull request online at:

https://github.com/gatech-csl/jes/pull/85

Commit Summary

File Changes

Patch Links:

— Reply to this email directly or view it on GitHubhttps://github.com/gatech-csl/jes/pull/85.

alinacampan commented 7 years ago

We are using JES at NKU for our CS 0.5 course, and been wondering if and when mouse/keyboard events will be available. Do you know when you will make JES 5.1 available (seems like your plans are to have events in version 5.1)?

Alina Campan

alinacampan commented 7 years ago

Sorry for a second comment on this - but we really, really want the new features you are planning for JES 5.1. Any way we could get a beta version now?

mjguzdial commented 7 years ago

There is no new version of JES. The last developer-contributor had some plans for keyboard-mouse functionality, but there's nothing developed. I'm hoping to get a release in the Fall together with a new version of Jython and bug fixes that have been contributed, but there are no current plans for new features.


From: alinacampan notifications@github.com Sent: Monday, July 17, 2017 12:12:57 PM To: gatech-csl/jes Cc: Guzdial, Mark; Comment Subject: Re: [gatech-csl/jes] Fixed purple text bug, raw_input bug, and added keyboard mouse functionality (#85)

Sorry for a second comment on this - but we really, really want the new features you are planning for JES 5.1. Any way we could get a beta version now?

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/gatech-csl/jes/pull/85#issuecomment-315794909, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AELfppb4vYBxJV2887d8l1yceUNpsP6Vks5sO4gJgaJpZM4D9Zvq.

alinacampan commented 6 years ago

Thank you for your answer.

Alina Campan