-->
Page 1 of 1

Looking for game that uses the OLED screen and push buttons

PostPosted: Thu Jan 12, 2017 7:23 pm
by Mmiscool
Hello,

Some one approached me wanting to do a little class at the local maker space near me.

He wanted to use the OLED screen and some push buttons to make a game that can be played on the esp using esp basic.

I started to thow some code together but some one else out there might have already done it or is better at game logic than me.

If any one is interested and has a small game to share I would be very interested.

-Mike

Code: Select alltextbox bla$

interrupt d5, [left]
interrupt d6, [right]
timer 500, [move]
wait


[left]
if io(laststat,d5) = 0 then wait
bla$ = "left"
x = x - 1
goto [display]

[right]
if io(laststat,d6) = 0 then wait
bla$ = "right"
x = x + 1
goto [display]



[move]

GapPos = GapPos + 1
if GapPos >= 11 then GapPos = 1

[display]
oled.cls()
if x >= 11 then x = 11
if x <= 0 then x = 1
oled.rect.fill(x*10,25,10,10)

oled.rect.fill(GapPos * 10,15,10,10)
wait


Re: Looking for game that uses the OLED screen and push butt

PostPosted: Fri Jan 13, 2017 11:36 am
by Boxey
Might not be of any use as it's Lua script based, but looking at the Lua script it doesn't seem it would be too difficult to port over to Basic (removing all the clock display and time update code would make it quite a small program to use as a good starting point).

Video: https://www.youtube.com/watch?v=Su3f5w3nEbg

Source code: https://github.com/kubi57/ESP8266/tree/ ... pong-clock

Would have to add a couple of buttons to control the movement too


There seems to be a few "pong" games out there which run on the ESP ..but unfortunately all in C or Lua

Re: Looking for game that uses the OLED screen and push butt

PostPosted: Wed Nov 15, 2017 5:31 am
by jamesjackson
We can easily say that clash of clans is one of the most popular games on mobile platforms such as iOS and Android. Even though most people are playing it thoroughly, in some moment it can stop being interesting.