-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed purple text bug, raw_input bug, and added keyboard mouse functionality #85
base: master
Are you sure you want to change the base?
Conversation
…input to crash in future executions. Added and documented functions for user KBM input
fixed bug where stopping while waiting for raw_input would cause raw_inp...
revert bug fix, ironically
Merge official JES into mine, to see if it still works
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 [[email protected]] 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: Commit Summary
File Changes
Patch Links: — |
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 |
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? |
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.
- Mark
…________________________________
From: alinacampan <[email protected]>
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 GitHub<#85 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AELfppb4vYBxJV2887d8l1yceUNpsP6Vks5sO4gJgaJpZM4D9Zvq>.
|
Thank you for your answer. Alina Campan |
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.