You are browsing as a guest. Sign up (or log in) to start making projects!

4h 25m 14s logged

Devlog - Almost completed this time (almostt)

This time my goal was to convert this basic chip8 emulator in to something any user can use

coming from web development background, creating ui in C++ raylib was completely new.

No concept of ui elements here, cant just attach event listeners to button like we do in javascriot

What happens here is -

  • you create a rectangle, put some text in it, this becomes your button
  • then there is a constant loop running, which erases and redraws everything on the screen 60 times per second, just like a game loop.
  • now to detect mouse hover, or click, we need to constantly tract the mouse position 60 times a second, and check if it overlaps the coordinates of a button

But

  • i found an interesting piece of code raygui, written by the original creator of the raylib
  • it basically removes the manual need of tracking the cursor position and checking them with the coordinates of the ui elements, it handles click and hovers.

custom ROM import support

  • I wanted users to be able to run any .ch8 program they wanted to run.
  • I simply opened up a native dialog to select a .ch8 file and run it on the emulator.
  • I used AppleScript on Mac to trigger the file picker, but on Windows, I had to pull up a shell in the background

The Final Boss: CI and distribution

  • This is actually a big time eater, while implementing Continuous Integration i did countless iterations solving dumb errors, adjusting platform depended configs and so on…
  • but results are just as fin, now automatic releases are created for every tag.

distribution

  • macos blocks applications from unknown developer (i need to pay $99/yr to get verified, Best of luck with that Tim Cook), to fix this i am thinking to create standard .app structure not sure but it might tame the apple gatekeeper.

Apple wanted my money ($99), Windows won’t be happy without taking my soul

  • Like hell, every here and there windows throws some error be it missing dll or path problems or linker issue.
  • the biggest hurdle was that I don’t have access to a windows machine, I had to ping my non-tech friend with new .exe file each time. (aah friends are a blessing, aren’t they, my friend? huh?)

Checkout lateset release (supports mac and windows, can’t say about linux for sure)

running on mac

  1. open the executbale file inside the zip (i wont run, but it is required to open at least once)
  2. Open System Settings go to privacy and security scroll down there you will se option to open anyway
  3. each time you will have to run the application this way in mac (sorry i dont really have $99)

Can anyone with linux please let me know if it works (i am to lazy to install VMWare)

one more thing supported keys are (inspired from original chip-8 keys)

1 2 3 4
q w e r 
a s d f
z x c v

use thses keys to give input, nothing else will work (other keys only work in launcher interface like backspace to get back to menu form emulator)

0
22

Comments 0

No comments yet. Be the first!