
-Mat
Moderator: Moderators
Thanks for the kind words. Aseprite is open source, so it is quite easy to see how the "encode" their clipboard data. I can send you my C# code if you want. It is essentially a bunch of image data, compressed using a DEFLATE type algorithm. Super simple. My "convention" when working in aseprite is that color 0 is transparent, 1,2,3 is the first palette, 4,5,6 is the 2nd, and so on.samophlange wrote:How did you add support for copy/paste from Aseprite?
Thanks. They are, in fact, heavily inspired by a bunch of stuff I found on google images, pinterest, etc. But most of the stuff you find online uses way too many colors to fit on the NES. So even when you want to "steal" stuff, it takes a lot of work to make it look nice.darryl.revok wrote:The graphics in this work-in-progress are definitely better than average for commercially released NES games. If they're something that you just ripped from another source then I apologize for the misplaced compliment.
Ha thanks man.FrankenGraphics wrote:yeah i forgot to comment about the graphics, but those are nice - i especially liked the walking animation for the patrolling bug, it has lots of nice character to it.
Lol, one of my 3 followers. Hahah. Baby steps i guess. Thanks for the support man.SoleGooseProductions wrote:Saw this over and Twitter and wanted to pop in to say WOW! Very nice graphics, and the rest looks solid as well!
Sure. I was looking for simplest language to implement and i remembered BASIC, which is the 1st language i learned as a kid (im old).yaros wrote:I love it, I love the graphics too. Can you provide more details on the code generation of your script language?
I am able to write simple parser, lexer or interpreter. When it comes to bytecode/machine code generation my brain shuts down. Could you advise some resources you used and learned from?bleubleu wrote: In assembly, bytecode is implemented as a simple jump table. each opcode will fetch the arguments it needs and do whatever it needs to do. I allocate a small "heap" of 32-byte for the script. This includes global variable, local variables, temporary variables. Temporary variables are needed for things like "4 + (2 + 3)". Behind the scene temporary variables will be allocated to hold temporary results of the addition. This is all done at compile time.
Me too. I kind of made up the bytecode as I went along. Maybe the best way to go about it is with an example? This is an event that gets called when the player successfully hacks the keypad.yaros wrote:I am able to write simple parser, lexer or interpreter. When it comes to bytecode/machine code generation my brain shuts down. Could you advise some resources you used and learned from?
Code: Select all
function on_game_event(event, param)
if event = GAME_EVENT_KEYPAD_SUCCESS then
set_timer(60)
end if
end function
Code: Select all
; on_game_event
.byte $0e, $01 ; 0: get_arg0 event
.byte $05, $01, $82 ; 2: compare_equal_byte event 0
.byte $0a, $0a ; 5: jump_if_false 10
.byte $13, $05, $8a ; 7: invoke_r0 set_timer(60)
.byte $1a ; 10: end