Online Pokitto Python Editor improvement suggestions

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 Likes

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.

2 Likes

You can press escape to stop the emulator.

2 Likes

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

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

2 Likes

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.?

1 Like

Yup. Thereā€™s an issue for that already.

2 Likes

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).

Have you looked in the Image tab?
image

2 Likes

I havenā€™tā€¦ Thatā€™ll teach me.

4 Likes

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.

COLLAPSE ALL (or fold all) in the editor

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).

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.

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.

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

1 Like

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.)

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.

1 Like

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.

2 Likes

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
2 Likes