• gridbugs
  • About
  • Tags
  • External Links
  • Daily Posts
  • Roguelike Tutorial 2020
  • Itch
  • Github
  • first
  • prev
  • next
  • last
  • If you use a custom linker script, _start is not (necessarily) the entry point

    2023-01-07 in unix

    For most of my life I took for granted that programs begin executing at an address denoted by the symbol _start (a single underscore, followed by the word “start”). Turns out it’s not so simple.

    Take this x86 assembly program that prints “Hello, World!” on Linux:

    .global _start
    
    .text
    
    message:
        .ascii "Hello, World!\n"
    
    _start:
        # print the message
        mov $1, %rax        # syscall 1 is write
        mov $1, %rdi        # file descriptor 1 is stdout
        mov $message, %rsi  # pass address of messsage
        mov $13, %rdx       # pass length of message
        syscall             # perform write system call
    
        # exit
        mov $60, %rax       # syscall 60 is exit
        mov $0, %rdi        # pass exit status of 0
        syscall             # perform exit system call
    

    To compile and run this program (assume it’s in the file hello.s):

    $ gcc -c hello.s   # compile hello.s to object file hello.o
    $ ld hello.o       # link hello.o to executable a.out
    $ ./a.out
    Hello, World!
    
    Read more...
  • I found a photo of you in my google drive

    2022-08-09 in poetry

    I found a photo of you in my google drive.
    It’s not a very good photo.
    I don’t know very much about photography.
    I took the photo with my 6 year old phone, which I stubbornly refused to upgrade
    even though it was painfully slow to use and the battery only lasted a few hours.
    The camera was slightly broken and everything in the photo is slightly out of focus.

    Read more...
  • Rain Forest

    2022-04-06 in gamedev roguelikes 7drl project

    Rain Forest is a roguelike game about spending a few days in a forest, in the rain. Figure out what daily tasks you can perform to stay motivated to remain in the forest, and try not to get too wet from the constant rain and rising flood water. And above all, try to have a relaxing time.

    This game is my 7th entry in the 7 Day Roguelike game jam.

    Play or download Rain Forest on its itch.io page.

    screenshot

    The game is open source, and the code is available on github. It’s written in rust, and the rendering, IO handling, UI and cross-platform support is handled by my chargrid library.

    My main focus this year was on setting the mood of a rainy forest. I personally find rain very calming, and tried to convey this calmness in the aesthetic of Rain Forest. I’m quite satisfied with how the game turned out visually. I’m planning to release a new version at some point that includes rain sounds (not for consideration in the 7DRL of course) to complete the mood.

    The gameplay is not particularly exciting; there’s no combat, and most of the game is wandering around locating the various sites in the forest you can use to gain motivation, and coming up with a daily routine that evolves as the flood water rises and the rain gets heavier.

    I had some ideas to make it more interactive, like digging ditches to redirect the water, or stepping stones which can be moved into water to allow the player to cross safely. These all made it into the game but there’s little incentive for the player to actually use these features. I couldn’t work out a way to make it necessary to engage in these mechanics while also being fun. I’m not sure yet whether I’ll try to come up with gameplay changes to try to make the game more fun. A part of me wants to strip away the features which the game doesn’t need and just keep the minimal experience of walking around in the forest in the rain.

    Read more...
  • 7 Day Roguelike 2022: Complete

    2022-03-11 in gamedev roguelikes 7drl

    I added a win condition, implemented an equipment system, and did a bunch of play testing and balancing. The game is finished and submitted to the 7drl jam. Play it in a browser, or download binaries from it’s itch.io page. The source code is on github.

    2

    Read more...
  • first
  • prev
  • next
  • last
© 2024 gridbugs.org