EXAPUNKS

EXAPUNKS

View Stats:
Defuser, a homebrew game for the Redshift + feedback about coding for it.
First: I'm loving this game. It's the first game from this dev I've tried and I can't wait to try the other programming games...

So I tried my hand at creating a small homebrew game for the Redshit today. You can check it out here: https://steamcommunity.com/sharedfiles/filedetails/?id=1487350169&fileuploadsuccess=1

I'm not sure I'm getting all the posibilities when programming this thing and probably my code could have been much better, but I did this over the course of a few hours today and did my best to work around the limitations of the machine,,,.

Here are some of my thoughts. If anyone has good solutions to these problems I'd really appreciate it:

Registers: One real register for each EXA/Sprite makes things pretty hard. You can use the T register to hold temporal data, but nothing more permanent like speed which needs to be persisted. In the end I decided to create a file for the EXA to hold its "variables" but...

Files: It'd be nice to have the option of not advancing the pointer when you write or access a value from a file. Using files to store "variables" from EXAS feels like juggling as you have to constantly jump back after accessing a value to change it. Still... it works pretty well.

Communication between EXAs: This one makes things so hard... When you store a value on the M register, only one EXA can read it and if two EXAs try to read at the same time. I haven't found a reliable way to be sure which one will actually get the value.. It'd be nice if you could send values to multiple listening EXAs. It'd also be nice if you could target messages, not just between local and global, but to a specific EXA.

In the subject of communication, I thought maybe using files could be a solution, but it seems it'd be too complex as the receiving EXA can't know if there's a file he can grab... Maybe global variables could be done by using a common file between EXAs and making sure to always drop the file after using it, but it'd be hard to sync access so no EXA tries to grab a file when another one is holding it. I wish there was a way to know this in advance so you don't have to make disposable copies of the EXA in hopes one will get the file...

REPL : It's really cool and lets you have much more functionality. Sometimes I wish it'd also duplicate a file... I'd make things much easier.

DATA: It's a shame that you can't use it when you replicate an EXA. It'd be nice to be able to quickly make a file for the new copy. In the end I ended up using too many COPY instructions...

Sprite numbers. This is a very big limitation... every graphic (unless I got this wrong) has to be a sprite, and the maximun number of sprites is quite low. Using sprites to create tile maps would be impossible unless the levels are quite sparse... also creating backgrounds is quite limited. I guess something simple like a scrolling star field would be simple to do... I'd love if the devs would add instructions to draw directly to the screen. Have an EXA hold a tile and be able to "stamp" it anywhere (using different modes to draw or erase). Also, play with the screen memory so you could do scrolling...

I'll keep investigating and any insight would be appreciated...


< >
Showing 1-9 of 9 comments
Hey maka,
i wanted to try your game. However, I am unable to 'install' it. I cannot find something called Defuser in the workshop. Any tipps for me?
You have to download the image from the link I shared (the one with a disk) and drag the file into the game screem. Make sure you're at the Redshifrt homebrew level's file selection.
Even if I'm following your instructions, I can't seem to import this. Can you write down an easy-to-follow step-by-step tutorial? What do you mean by "drag the file into the game screen"? How do I do this? Do I have to have made a game of my own using Redshift before I can import anything? Help?
OH, now I see how you do this. I'm supplying a step-by-step method that enabled me to import this. If you follow these steps, you should be getting this imported in no time.

  1. Download the image from the link in the OP.
  2. Boot up EXAPUNKS
  3. Change the settings so EXAPUNKS is playing in windowed mode.
  4. Open the "Redshift Homebrew" level.
  5. Click on the button that opens up a list of solutions.
  6. Find the folder that you saved the image to.
  7. Click and hold on the image, and drag it into the game screen.
  8. Click on the new solution that just poppeed up.
  9. You can now play this game.

I hope this helped!
You don't really need the window mode part, just alt-tab :D
Here's a game directly from Zach which demonstrates a scrolling star background [with several layers of parallax].

https://pbs.twimg.com/media/DkLgTF9VAAA_Sie.png:orig

I've enjoyed your game though, great work. It's given me many ideas for games of my own.
Finally got it working and scored 23 points in defuser. Probably very bad. :steamhappy:... However, I did not really check the code.
Maybe global variables could be done by using a common file between EXAs and making sure to always drop the file after using it, but it'd be hard to sync access so no EXA tries to grab a file when another one is holding it.

You can do it, but it use the M channel, basically, if someone send something on the M channel, the common file is available :

COPY M X
NOTE If we're here, it means something was sent to the M channel : the file is avaiable !
GRAB 400
NOTE Do whatever you want to do with the file
DROP
NOTE The file is now avaiable, so we announce it
COPY X M


This seems to work fine if you only need one access to the file by WAIT cycle
Originally posted by transcendentalConstant314:
  1. Boot up EXAPUNKS
  2. Change the settings so EXAPUNKS is playing in windowed mode.

What do I do if windowed mode is locked and full screen is forced?
< >
Showing 1-9 of 9 comments
Per page: 1530 50