Skip to content
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

Open
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

sportsracer48
Copy link

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
Copy link
Contributor

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.

  • Mark

From: sportsracer48 [[email protected]]
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:

#85

Commit Summary

File Changes

Patch Links:


Reply to this email directly or view it on GitHubhttps://github.com//pull/85.

@alinacampan
Copy link

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
Copy link

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
Copy link
Contributor

mjguzdial commented Jul 17, 2017 via email

@alinacampan
Copy link

Thank you for your answer.

Alina Campan

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants