Search found 172 matches

by slembcke
Fri Jul 13, 2018 9:59 am
Forum: NESdev
Topic: Efficient way to reuse variables
Replies: 48
Views: 16947

Re: Efficient way to reuse variables

Oof. That video is kind of hard to watch. Seems like it follows the trap of "Isn't it neat that you can use zero-cost abstractions to write more code than necessary?" I've had too many cases where I found myself writing a lot of code in order to use RAII because it was the "correct&qu...
by slembcke
Thu Jul 12, 2018 11:24 am
Forum: NESdev
Topic: Randomizing block permutations for a color matching game.
Replies: 7
Views: 2499

Re: Randomizing block permutations for a color matching game

The bag algorithm seems to be more or less exactly what I've done now. I wrote a script that used Fisher-Yates and concatenated a few permutations. The most noticeable thing is that certain drops are notable (like there is a double red chest drop), and are always followed by the same drop since ther...
by slembcke
Thu Jul 12, 2018 10:17 am
Forum: NESdev
Topic: Little coroutine lib for cc65. (In progress)
Replies: 3
Views: 3154

Little coroutine lib for cc65. (In progress)

I recently started working a a little coroutine library for cc65 very similar to the simple API for Lua coroutines. It currently comes in at ~200 bytes of code, and I think the yield/resume cost is reasonable from eyeballing the asm, but I haven't actually done any cycle counting. https://gist.githu...
by slembcke
Thu Jul 12, 2018 8:33 am
Forum: NESdev
Topic: Randomizing block permutations for a color matching game.
Replies: 7
Views: 2499

Re: Randomizing block permutations for a color matching game

Oh! I really like that LRU + ring buffer idea, it nicely solves the issue of the selection array not being a power of two. I think that might be exactly what I was looking for, and even solves a couple of the issues with just concatenating a bunch of permutations together.
by slembcke
Wed Jul 11, 2018 11:58 pm
Forum: NESdev
Topic: Randomizing block permutations for a color matching game.
Replies: 7
Views: 2499

Randomizing block permutations for a color matching game.

So for some reference, I'm working on a falling block, color matching game. There are 4 colors of chests, and keys that unlock them. http://files.slembcke.net/upshot/upshot_4fWmENCm.png What I want to do is make it so that every N drops there will be an exact count of each color of chests and keys. ...
by slembcke
Wed Jul 11, 2018 11:11 pm
Forum: NESdev
Topic: cc65: Unnecessary code when accessing pointers
Replies: 22
Views: 7234

Re: cc65: Unnecessary code when accessing pointers

I'm a bit late to the party, but register variables can be a good solution to the original problem. For instance, this function avoids copying the pointer into a scratch location. You can mark function arguments as register too, and it generates slightly different code. void bar(void){ register u8 *...
by slembcke
Sat Mar 10, 2018 9:43 am
Forum: General Stuff
Topic: and i thought win10 had manners (short rant)
Replies: 27
Views: 7199

Re: and i thought win10 had manners (short rant)

Can't say I've ever been much in love with Windows, but 8 and X really make me want as little to do with Windows ever again. We recently had to put together a new PC to work on a contract for a PS4/XBone game, and Windows 10 it was. I kinda hate that computer. It had a couple hardware/driver issues,...
by slembcke
Thu Mar 01, 2018 11:05 am
Forum: Newbie Help Center
Topic: 16 bit array iteration
Replies: 20
Views: 5964

Re: 16 bit array iteration

Oh Interesting. I didn't know about .lobytes/hibytes. That certainly makes striped arrays more usable.
by slembcke
Wed Feb 28, 2018 2:56 pm
Forum: Newbie Help Center
Topic: 16 bit array iteration
Replies: 20
Views: 5964

Re: 16 bit array iteration

As a random aside. This:

Code: Select all

    lda animation, x
    sta sprite_ptr + 0
    inx
    lda animation, x
    sta sprite_ptr + 1
Can become this:

Code: Select all

    lda animation + 0, x
    sta sprite_ptr + 0
    lda animation + 1, x
    sta sprite_ptr + 1
by slembcke
Wed Feb 14, 2018 10:13 am
Forum: General Stuff
Topic: Our first game on Steam. :D
Replies: 3
Views: 2201

Our first game on Steam. :D

http://store.steampowered.com/app/730050/Verdant_Skies/ http://files.slembcke.net/upshot/upshot_MjDYuoKW.png Not NES related, but my company has launched our first game on Steam called Verdant Skies. :D It's a life simulation game similar to Harvest Moon. Mostly the brainchild of my business partner...
by slembcke
Wed Feb 07, 2018 10:01 am
Forum: NES Graphics
Topic: Lossy compression for NES screens
Replies: 20
Views: 27148

Re: Lossy compression for NES screens

Hay! This is pretty neat. I wrote something kinda similar a few years ago for the Gameduino. It used 8x8 4bpp tiles with individual 16bpp palettes. It made using photo input pretty easy, though it looked kinda terrible. http://files.slembcke.net/temp/sunset400.png http://files.slembcke.net/temp/suns...
by slembcke
Sat Feb 03, 2018 8:23 pm
Forum: Homebrew Projects
Topic: Intergalactic Transmissing. (GGJ2018)
Replies: 7
Views: 7892

Re: Intergalactic Transmissing. (GGJ2018)

I think this game is donesies. I added a level start screen, reordered the difficulty of the levels, and placed the latest sounds that we didn't have time to add in the last few minutes of the GGJ scramble. Latest build http://files.slembcke.net/temp/InterglacticTransmissing.nes.zip . (Also updated ...
by slembcke
Tue Jan 30, 2018 6:05 pm
Forum: General Stuff
Topic: What do schools have against teaching C?
Replies: 47
Views: 16146

Re: What do schools have against teaching C?

Eh, I dunno. I'm of the opinion that you shouldn't learn just one programming language anyway. I know quite a few devs that are uncomfortable outside of their only language. (ex: Unity/C# or HTML/Javascript) Many of them consider C++ to be black magic even though they've never used it. I did a Globa...
by slembcke
Sun Jan 28, 2018 6:55 pm
Forum: Homebrew Projects
Topic: Intergalactic Transmissing. (GGJ2018)
Replies: 7
Views: 7892

Re: Intergalactic Transmissing. (GGJ2018)

Yeah, kinda similar, but in ZPG you can move one square at a time right?

Semi-final ROM is here:
https://globalgamejam.org/2018/games/in ... ansmissing

Should generate/add more levels, and assign them a better difficulty order, and we sort of broke sound at the 11th hour. :-\
by slembcke
Sun Jan 28, 2018 9:39 am
Forum: Homebrew Projects
Topic: Intergalactic Transmissing. (GGJ2018)
Replies: 7
Views: 7892

Re: Intergalactic Transmissing. (GGJ2018)

Latest build here: http://files.slembcke.net/temp/InterTrans.nes Hold B while ramming the signal to give it a boost in your current direction. Fill the board with it. (Win condition not currently detected.) http://files.slembcke.net/upshot/upshot_CU6fO5fz.png So it's sort of a mashup of a puzzle gam...