Arcade games using new OLED library

All ESP32 boards running MicroPython.
Target audience: MicroPython users with an ESP32 board.
Post Reply
User avatar
rdagger
Posts: 143
Joined: Tue Feb 28, 2017 6:16 pm
Contact:

Arcade games using new OLED library

Post by rdagger » Fri Dec 29, 2017 8:53 pm

I created a MicroPython library for the SSD1351 OLED module. I used it to code a simple brick game similar to Arkanoid.
There's also a YouTube video: https://youtu.be/a7DrFqqu-78
vlcsnap-2017-12-27-15h03m34s531.jpg
vlcsnap-2017-12-27-15h03m34s531.jpg (221.11 KiB) Viewed 5694 times

User avatar
pythoncoder
Posts: 5956
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: Arcade games using new OLED library

Post by pythoncoder » Sat Dec 30, 2017 8:17 am

Very impressive, and an excellent video. Making a video that good must take some doing :D

Regarding fonts, did you consider this approach? I started out with GLCD font creator but was unhappy with it for several reasons. It's closed source and Windows based. Also I was concerned about RAM usage. This open source approach written in Python should be OS-agnostic. It converts standard font files to Python source which can optionally be frozen as bytecode. In this instance RAM usage is minimal. Thus ends the sales-pitch ;)
Peter Hinch
Index to my micropython libraries.

User avatar
rdagger
Posts: 143
Joined: Tue Feb 28, 2017 6:16 pm
Contact:

Re: Arcade games using new OLED library

Post by rdagger » Sat Dec 30, 2017 9:46 pm

pythoncoder wrote:
Sat Dec 30, 2017 8:17 am
Very impressive, and an excellent video. Making a video that good must take some doing :D

Regarding fonts, did you consider this approach? I started out with GLCD font creator but was unhappy with it for several reasons. It's closed source and Windows based. Also I was concerned about RAM usage. This open source approach written in Python should be OS-agnostic. It converts standard font files to Python source which can optionally be frozen as bytecode. In this instance RAM usage is minimal. Thus ends the sales-pitch ;)
Thanks, I agree with all your points and your library looks great!

I wrote the xglcd_font.py library a couple of years ago for my Raspberry Pi ST7565 python library. I reused it to save time, but I did structure the SSD1351 class so it would be easy to swap out a different font library.

OutoftheBOTS_
Posts: 847
Joined: Mon Nov 20, 2017 10:18 am

Re: Arcade games using new OLED library

Post by OutoftheBOTS_ » Mon Jan 01, 2018 10:28 am

Cool project. I follow you on you tube and your channel is what got me interested in the esp chips.

The ssd1351 and the st7735 are very similar displays why did you pick the ssd1351? is it better than the st7735

User avatar
rdagger
Posts: 143
Joined: Tue Feb 28, 2017 6:16 pm
Contact:

Re: Arcade games using new OLED library

Post by rdagger » Mon Jan 01, 2018 8:13 pm

OutoftheBOTS_ wrote:
Mon Jan 01, 2018 10:28 am
Cool project. I follow you on you tube and your channel is what got me interested in the esp chips.

The ssd1351 and the st7735 are very similar displays why did you pick the ssd1351? is it better than the st7735
Thanks, I selected the ssd1351 because it's OLED compared to the TFT st7735.
Some advantages of OLEDs:
  • True blacks and better contrast (Each pixel produces its own light as opposed to being back or edge lit.)
  • Very sharp and vibrant colors (OLED displays are used in iPhone X, Galaxy S8 and Apple watch.)
  • Thin and light weight
  • Excellent viewing angle
  • Operates to -40C
  • Lower power consumption (Although current draw is proportional to the lit pixel count so YMMV.)
  • Prices have been dropping (The above display was $13.80 plus shipping on AliExpress.)
Still the ST7735 is a very good display. The technology is more mature and there is lots of available code and support.
Last edited by rdagger on Sun Feb 04, 2018 6:21 pm, edited 1 time in total.

User avatar
deshipu
Posts: 1388
Joined: Thu May 28, 2015 5:54 pm

Re: Arcade games using new OLED library

Post by deshipu » Mon Jan 01, 2018 11:37 pm

In addition, the ssd1351 chip also has more commands, such as hardware scrolling (on the st7735 you'd have to redraw the whole display to scroll), which may matter if you want to make arcade games such as Mario or Xenon.

Mr.Hotwire
Posts: 1
Joined: Sun Mar 27, 2022 9:42 pm

Re: Arcade games using new OLED library

Post by Mr.Hotwire » Sun Mar 27, 2022 9:45 pm

I have been battling this for a few hours..

Does the display only use .raw format files? I have no way of producing them, and any other file format I use comes out all pixelated and unrecognizable.

Thanks in advance.

User avatar
rdagger
Posts: 143
Joined: Tue Feb 28, 2017 6:16 pm
Contact:

Re: Arcade games using new OLED library

Post by rdagger » Mon Mar 28, 2022 5:23 pm

Mr.Hotwire wrote:
Sun Mar 27, 2022 9:45 pm
Does the display only use .raw format files? I have no way of producing them, and any other file format I use comes out all pixelated and unrecognizable.
There is a python program in the repo's utils folder called img2rgb565.py. It can convert common image types such as jpeg and png to the required raw format.

Post Reply