Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Raluek
Nov 3, 2006

WUT.

echinopsis posted:

https://crimecommitter.com finally has something like functionality

extremely broken and buggy functionality but still

do you want bug reports? cause lol apparently its kinda cheesable. made 500 notoriety in like a couple minutes :c00l:

Adbot
ADBOT LOVES YOU

echinopsis
Apr 13, 2004

by Fluffdaddy
oh for sure lol I have no idea what I am doing here

hopefully whatever it is doesn’t require massive rewrites lol but I don’t know why crimes finish when they still have time
left
i’m
sure i I’ll work it out

Raluek
Nov 3, 2006

WUT.

echinopsis posted:

oh for sure lol I have no idea what I am doing here

hopefully whatever it is doesn’t require massive rewrites lol but I don’t know why crimes finish when they still have time
left
i’m
sure i I’ll work it out

the quickest way to cheese it that i found was to start skateboarding and then click the "littering" button. also, if multiple crimes are simultaneously ongoing, when littering finishes it will finish all of them. i think there's something up with the littering timer.

also, sometimes it will wrap around and say that im going to litter in the past, then clicking on it again will insta-complete it (and whatever else is running)

e: hmm, the same works for loitering too, but since it pays less i didnt notice before. but littering can't be shortcut by clicking other stuff. so i can start loitering and skateboarding, but as soon as i try to litter it completes the other two.

if im already littering, i cant insta-finish any crimes, but as soon as littering completes it will also take everything else with it

echinopsis
Apr 13, 2004

by Fluffdaddy
I've actually tried to avoid timers for all obvious reasons, when you start a crime you then set it's endtime and the "countdown" is just a time until it's finished, this way it doesn't matter if the browser locks or whatever
and it shouldn't be able to be ready to be completed until that time has passed
but you can do a thing to change this
and you shouldn't be able to lol

echinopsis fucked around with this message at 09:25 on Jun 14, 2022

echinopsis
Apr 13, 2004

by Fluffdaddy
thanks Raluek for testing it out, but I shouldn't have put that on you. but I found the stupid problem which of course was myself trying to be smart earlier on in the picture.

we're now at a level where it kind of works. its not buggy and broken at least

Raluek
Nov 3, 2006

WUT.

echinopsis posted:

thanks Raluek for testing it out, but I shouldn't have put that on you. but I found the stupid problem which of course was myself trying to be smart earlier on in the picture.

we're now at a level where it kind of works. its not buggy and broken at least

lol like it's a huge imposition to go click some buttons and have fun doing it

it looks pretty un-broken now! and the text formatting doesnt overflow the box anymore, except for "WELCOME TO CRIME COMMITTER" which is only at startup so nbd

i like that clicking the button to collect reward also re-selects that crime, so i can go right back to crimin' with fewer clicks than before

maybe put a lil more emphasis on the "click to commit" button; it doesnt look like a button anymore. it was only obvious to me cause i played the previous iteration

another slight nitpick is that it stays on 0 seconds for a whole second before it's done, so maybe it's off by one (or truncating)

echinopsis
Apr 13, 2004

by Fluffdaddy
lol still, I appreciate it

thanks for the feedback, I think because it's counting milliseconds it takes that extra second, like it finished after the time not on the time, anyway a small fix im sure. thats what the custom log is for :smugmrgw:

I'm hoping that a certain level of jank is somewhat part of it's aesthetic lol. and yeah the old button mechanic was broken while this new one is much more solid, I have yet to incorporate all the factors.

but basically once I found the bug that was making it fuckup, and it was finally working as I hoped, which is surprisingly solid it seems, I was just keen to commit and push and say hooray for a bit


now back to the grind

PIZZA.BAT
Nov 12, 2016


:cheers:


lol awesome

echinopsis
Apr 13, 2004

by Fluffdaddy
just pushed a commit that has notoreity requirements working and now is the part I normally fail at every task like this, making the "content", because my stupid fuckin brain likes making the thing work, but hates to make the content, in this case the crimes and their values, BUT I don't wanna be a fuckup, plus unlike most of what I've done, this is immediately out there so, the pressure is on. i've got a week of covid leave now so.. best be thinking of crime values

e: postponed doing that by writing a janky python script to take a csv file of crime content and make it output something I can copy and paste into my js file

echinopsis fucked around with this message at 13:32 on Jun 14, 2022

namlosh
Feb 11, 2014

I name this haircut "The Sad Rhino".

Zamujasa posted:

i started writing notes/observations while disassembling nes games in a post my favorites thread, does that count

Agree with everyone else, this is awesome. I never would have known about it on Twitter.

Wild EEPROM
Jul 29, 2011


oh, my, god. Becky, look at her bitrate.
make sure you put a splash page “do you want to commit crimes” and if they click no it goes right to goatse

Deep Dish Fuckfest
Sep 6, 2006

Advanced
Computer Touching


Toilet Rascal
splash page should be the classic 90s "you can't access this website if you're a cop" wall of text that was popular with rom and warez sites

Zamujasa
Oct 27, 2010



Bread Liar
you can do a crime, but you have to undo it within 24 hours

echinopsis
Apr 13, 2004

by Fluffdaddy
I appreciate your confidence in my abilities lol

Raluek
Nov 3, 2006

WUT.
nice, i like the upgrades. finally, some money!

the math for the "you've committed this crime xx times and earned yy notoriety" is busted, though. some crimes tell me i have earned negative notoriety doing them, and others tell me ive earned hundreds of points despite my total score being much less than that



theres a bit of "css is my passion" going on too, but its p minor lol

spankmeister
Jun 15, 2008






it doesn't update the number of times the crime has been committed in the ui when selecting a different crime. it's like there's only one number of times any crime has been committed and it just multiplies that with the notoriety of the crime selected currently

spankmeister
Jun 15, 2008






and you managed to misspell notoriety again lol

Zamujasa
Oct 27, 2010



Bread Liar

Raluek posted:

theres a bit of "css is my passion" going on too, but its p minor lol

the viewer isn't the only one that gets to commit crimes

Wild EEPROM
Jul 29, 2011


oh, my, god. Becky, look at her bitrate.
more crimes to add:

jaywalking (super short cooldown)
tresspassing

echinopsis
Apr 13, 2004

by Fluffdaddy

Raluek posted:

nice, i like the upgrades. finally, some money!

the math for the "you've committed this crime xx times and earned yy notoriety" is busted, though. some crimes tell me i have earned negative notoriety doing them, and others tell me ive earned hundreds of points despite my total score being much less than that



theres a bit of "css is my passion" going on too, but its p minor lol

wearing jorts gives you negative notoriety just like in real life. its a fashion crime



I added that committed x crimes right at the end and so busted is expected lol

I want the player to not know how many points something gets until they've done it, and also not far away going to add a cost to some crimes. so some crimes will costs to do and probably earn you lots of noto, like buying illegal weapons, and some require lots of noto and take time to do and earn money.

when I implement cookies, it'll make long crimes more doable, because the code will mean you can start a crime, close window, and come back in a day and it might be finished. "commit crimes every day" might be the tagline infact

whether or not I implement things like "buy guns to do another crime" (having an inventory) is a whole nother level, and maybe reserved for crime committer 2

spankmeister posted:

it doesn't update the number of times the crime has been committed in the ui when selecting a different crime. it's like there's only one number of times any crime has been committed and it just multiplies that with the notoriety of the crime selected currently

drat what a chump

spankmeister posted:

and you managed to misspell notoriety again lol

lol

Wild EEPROM posted:

more crimes to add:

jaywalking (super short cooldown)
tresspassing

thanks. hopefully the list ends up big. for whatever reason I really struggle to sit down and bust those out whereas I can look at bad code for hours

PIZZA.BAT
Nov 12, 2016


:cheers:


spankmeister posted:

and you managed to misspell notoriety again lol

i say leave it in. really adds to the vibe

Zamujasa
Oct 27, 2010



Bread Liar
https://twitter.com/xkeepah/status/1536902273682378752

i've had an aero city arcade cabinet sitting in my apartment for a few years now, relatively untouched since i bought it... because the guy i bought it from was a dummy who hacked up the insides a lot and my roommate (who actually did arcade repair for work) said "mmm nope we are not turning that on until i rewire it". finally pulled it out and opened er up

this thing is such a fuckin disaster inside. i'm not even sure what the best way to start cleaning the insides are. my current plan is to get the larger debris out (there's a few coins and loose screws in the back), then maybe idk grab the vacuum and use the hose extension to try and suck up the worst, then maybe give it the paper towel 409 wipe down



i'm feeling pumped after finally getting the ms pac cocktail cab i have up and running again; it it's fine, the power cord just needed repaired since the previous owner of that one did a poo poo job

https://twitter.com/xkeepah/status/1535139098955984896

echinopsis
Apr 13, 2004

by Fluffdaddy
https://twitter.com/_crimecommitter/status/1537339000884953088?s=20&t=ZUgBbHaQLHz6uzWthzrg7A

echinopsis
Apr 13, 2004

by Fluffdaddy
heck yes I have reached a very good place with crimecommitter. no excuses now to not put time into making more crimes to discover.

the big things being incorporating money, things now can cost, and biggest of all was incorporating cookies, so that you can set an hour long crime going, or even a week long crime going, and come back and see how it's going...

I know it looks kinda poo poo with the css being a mess, but drat I am proud of myself for getting this far, enjoyed the whole process too.

echinopsis
Apr 13, 2004

by Fluffdaddy

I always loved those sit down tablet cabinet games

a lost art

CommieGIR
Aug 22, 2006

The blue glow is a feature, not a bug


Pillbug
Just moved all my carnivorous plants into a tent to help keep their humidity higher and controlled

outhole surfer
Mar 18, 2003

echinopsis posted:

I always loved those sit down tablet cabinet games

a lost art

cocktail pinball machines are the best

echinopsis
Apr 13, 2004

by Fluffdaddy
nice username post combo lol

echinopsis
Apr 13, 2004

by Fluffdaddy
guess which one of your favorite games about crimes now has extreme loitering where you can begin to loiter for an entire week :smugmrgw:

Base Emitter
Apr 1, 2012

?

echinopsis posted:

guess which one of your favorite games about crimes now has extreme loitering where you can begin to loiter for an entire week :smugmrgw:

thank god, regular loitering is too much work

ynohtna
Feb 16, 2007

backwoods compatible
Illegal Hen
in its birthplace of the parisian ghettos, it's referred to as vagabondage extraordinaire

echinopsis
Apr 13, 2004

by Fluffdaddy

ynohtna posted:

in its birthplace of the parisian ghettos, it's referred to as vagabondage extraordinaire

I might steal this if you don’t mind, need to practice with JSON files and I need raw data

i’ll quote ya

echinopsis fucked around with this message at 22:01 on Jun 17, 2022

ynohtna
Feb 16, 2007

backwoods compatible
Illegal Hen
it's a crime game, mate, take it and run!

eschaton
Mar 7, 2007

Don't you just hate when you wind up in a store with people who are in a socioeconomic class that is pretty obviously about two levels lower than your own?
I’ve been hacking on and off on an HP1000 A-series emulator in Swift and have developed a nice pattern for how to implement it using value-carrying enums to represent the instructions

Swift code:
/// An A400 machine word is a signed 16-bit integer.
typealias Word = Int16

/// Protocol conformed to by all instructions.
protocol InstructionProtocol {
   /// Decode a word into an instruction or nil if it can’t decode.
    static func decode(word: Word) -> Self?
    
    /// Execute an instruction and return the number of words to advance P, or nil for a jump.
    func execute(on: CPU) -> Int?
}

/// Wrapper enum for all instructions.
enum Instruction: InstructionProtocol {
    /// Jump Instruction
    case JI(JumpInstruction)
    
    /// Arithmetic Instruction
    case AI(ArithmeticInstruction)
    
    /// Unknown Instruction
    case Unknown(Word)
    
    // etc.

    enum JumpInstruction: InstructionProtocol {
        // specific implementation of jump instructions
    }

    enum ArithmeticInstruction: InstructionProtocol {
        // specific implementation of arithmetic instructions
    }
    
    /// Decode all instruction subtypes.
    static func decode(word: Word) -> Self? {
        if let i = JumpInstruction.decode(word: word) { return .JI(i) }
        if let i = ArithmeticInstruction.decode(word: word) { return .AI(i) }
        return .Uknown(word)
    }

    /// Execute all instruction subtypes.
    func execute(on CPU: CPU) -> Int? {
        switch self {
        case .JI(let ji): return ji.execute(on: CPU)
        case .AI(let ai): return ai.execute(on: CPU)
        case .Unknown(let w): fatalError(“Unknown instruction: \(w)”)
    }
}
using this pattern, with optimization essentially set to -1 (via testability) in a unit test, I get just over 1 MIPS on my top-tier M1 Max

nonetheless I can optimize it by giving the CPU a table of function pointers to jump to for all 16-bit instructions, just like Gary Davidian’s 68000 emulator did for the Power Mac

code:
/// An HP1000 A-series CPU.
class CPU {
    /// A ready-to-run “instruction execution.”
    typealias InstructionExecution = () -> Int?
    
    /// A table of all possible InstructionExecutions, to speed dispatch.
    var instructionExecutions: [InstructionExecution] = []

    /// Set up the table of InstructionExecutions
    func configureInstructionExecutions() {
       instructionExecutions.reserveCapacity(65536)
        // Use UInt32 for i because UInt16 complains 65536 won’t fit
        // IMO it’s a bug I have to do that since it’ll never be assigned
        for i: UIInt32 in 0..<65536 {
            let ui: UInt16 = UInt16(i)
            let w: Word = Word(bitPattern: ui)
            guard let inst = Instruction.decode(word: w) {
                fatalError(“Failed to decode instruction for \(w)”)
            }
            let ie: InstructionExecution = { return inst.execute(on: self) }
           instructionExecutions.append(ie)
        }
    }
}
then running an instruction is basically fetching a Word, converting it to a UInt16 with same bit pattern to use as an index into the table, and then calling the InstructionExecution at that index

when compiling with all the optimization cranked up this should run extremely fast even on slow hardware

GWBBQ
Jan 2, 2005


echinopsis posted:

thanks. hopefully the list ends up big. for whatever reason I really struggle to sit down and bust those out whereas I can look at bad code for hours
Follow this Twitter account
https://twitter.com/CrimeADay/status/1427829213957136385?t=40dgFEa08QTgc5K53hT-6w&s=19
https://twitter.com/CrimeADay/status/1484516171856683010?t=z8hQ0kmD5Yi_Se7wtPYYBg&s=19

echinopsis
Apr 13, 2004

by Fluffdaddy

holy fuckin poo poo

PokeJoe
Aug 24, 2004

hail cgatan


transporting meat log labeled as loaf

PokeJoe
Aug 24, 2004

hail cgatan


federal meatloaf inspector

toiletbrush
May 17, 2010

eschaton posted:

I’ve been hacking on and off on an HP1000 A-series emulator in Swift and have developed a nice pattern for how to implement it using value-carrying enums to represent the instructions
yeah that's a really nice pattern, the enum shorthand means you get a really nice 'dsl' for writing asm for test etc as well. drat that's a lot of instructions though, writing a CHIP-8 emulator was about my limit.

have you tried breaking your decode Word into bytes/nibbles so you can do your decode as a switch?

quote:

using this pattern, with optimization essentially set to -1 (via testability) in a unit test, I get just over 1 MIPS on my top-tier M1 Max
noice

Adbot
ADBOT LOVES YOU

haveblue
Aug 15, 2005



Toilet Rascal
"contraband walrus" would be a pretty good username

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply