Online Pokitto Python Editor improvement suggestions


#1

Hi,

Many of you have attended the Python contest and created nice games. The editor has really lower the barrier to start coding for Pokitto.

Now I would like to hear how we could make the editor even more amazing. How would you like the editor be improved to make creating games still easier?


#2

I think it would be helpful to have a “new project” button in the project tab. I know that you can just rename an existing project to make a new one, but before I figured that out, I was looking through every menu for how to make a new project.

Another thing I would like is a way to pause the emulator, because it feels like my low-powered laptop is working hard emulating the game when I’m not testing it.

Also, this isn’t a direct request about the editor itself, but it would be great if it would be possible to flip images horizontally in python.

The editor is really easy to prototype things with, really great job! This is a big development for Pokitto.


#3

You can press escape to stop the emulator.


#4

Thanks! I just went back to check the documentation, and I should have noticed it does say that.


#5

That should really be made more obvious, without a need for reading docs


#6

Maybe you could extend the default “Hello World!”-project with some hints or instructions?

Like a step-by-step hands-on mini tutorial on how to add and show an image, run the game, etc.?


#7

Yup. There’s an issue for that already.


#8

Dear santa,

How is Mrs Clause? I hope she is well. I have been a good boy this year and I want a grid view on the sprite editing and a way to resize a sprite or create a new sprite at a specific size.

Yours,
Neil (age 456 months).


#9

Have you looked in the Image tab?
image


#10

I haven’t… That’ll teach me.


#11

My main suggestions are already issues on the GitHub repo but I’ll reiterate them here for the beneefit of people who haven’t seen the issues.

Firstly, a way to make the editor colour image pixels without any additional restrictions on the identifiers that people can use.
(E.g. by using special comments.)

Secondly, like @wuuff suggested, a physical button for stopping the emulator.

And thirdly, a compile-only button, so basic syntax checks can but run without having to actually run the game.


#12

COLLAPSE ALL (or fold all) in the editor


#13

I’d be nice if we can get sound in the emulator, not sure how that’d work online. I think I remember needing the users ‘permision’ in some way to do sound, like tying the audio playback to a button or something (it’s been a long time since I looked at sound, pre-html5 days).


#14

No need to ask for permission. The problem with sound is that the current HTML5 API is CPU-intensive and deprecated. The replacement API is still being designed and not available yet.
It should be easier for the offline emulator, but I have to look into how audio works in SDL first.


#15

You have to load in wav data and then use a callback to populate a buffer.
I’m pretty sure I’ve got an example somewhere, but it might be in C# rather than C++ and I’d have to dig it out.
(A long time ago I wrote a C# wrapper for SDL, but I never published it because then people would expect me to maintain it. :P)

I’ve found the example I was thinking of and it is in C#.
I can PM it to you if you think it will be useful.
(And explain any C#-specific stuff that you might not be familiar with, but most of it speaks for itself, it’s only the Marshal class that I think might be a bit confusing.)

I’ll have a dig around to see if I’ve got a C++ example of doing SDL audio, but I’m not sure if I do or not.
(I’ve got an SDL+OpenGL demo if it helps. :P)


Looks like I don’t have any C++ examples, just the C# example.


#16

If the C# and the C++ APIs are similar, then I’m sure it will be useful. :slight_smile:


#17

I went out of my way to make them almost identical, so hopefully it will be useful.

I’ll PM it to you to save derailing the thread.
(If anyone else is interested they can just PM me to ask for a copy.)


#18

Pokitto Simulator is using SDL for graphics and audio.

Edit: Python games work in the simulator with sound :slight_smile: But the environment is not nearly as friendly as in the Online Python Editor.


#19

I was going to ask for a ‘Tilemap.get_tile_id(x, y)’ but noticed it’s has already been added. I’m not sure about the purpose of the ‘tileSize’ argument though…

Another thing concerning the API. A way to read/write data on Pokitto’s EEPROM would be nice.


#20

Here my personal wish list, order by preference

  1. I would find useful have access to some primitives drawing function:
  • DrawPixel
  • DrawLine
  • DrawRect
  • FillRect
  • DrawCircle
  • FillCircle

  1. In the editor I suggest to have tabbed files instead of the combobox selector.
  2. I think there should be a way to search (find) on all project files.
  3. I’d love to have Ctrl+Click to go to method definitions, and maybe a cross reference of the usage