Angus Cheng
  • Posts

Posts

December 4, 2023

Busty Barrister - Week 4

A few weeks ago I talked about implementing a generic list of objects that conform to an interface in C. The code is not the nicest, but it’s working well enough and I think it’ll hold up until this game is done. This is what the EventData structure looks like at the moment. typedef struct EventData { int eventIndex; int eventCount; enum EventType eventTypes[1000]; int eventIndices[1000]; // Event lists int showTextCount; ShowText showTexts[1000]; int playMusicCount; PlayMusic playMusics[100]; int setCharacterCount; SetCharacter setCharacters[100]; int setAnimationCount; SetAnimation setAnimations[100]; int setBackgroundCount; SetBackground setBackgrounds[100]; int startSoundCount; StartSound startSounds[100]; int greyFlashCount; GreyFlash greyFlashes[100]; int queueAnimationCount; QueueAnimation queueAnimations[100]; int screenShakeCount; ScreenShake screenShakes[100]; int fadeEventCount; FadeEvent fadeEvents[100]; int configMusicCount; ConfigMusic configMusics[100]; int delayCount; Delay delays[100]; int fadeMusicCount; FadeMusicEvent fadeMusics[100]; int setBlackRectCount; SetBlackRect setBlackRects[100]; int setChyronCount; SetChyron setChyrons[1000]; } EventData; It’s gettting a bit gross, every time I add a new EventType I add two properties for it.
November 28, 2023

Kuala Lumpur Trip

Last Monday I went hiking and hung out with my friend Toby. He said he was going to Kuala Lumpur for a few days and asked me to join. I had a little think about it and decided yes I would go. The next day I booked a flight to be in KL Wednesday morning to Saturday night. Wednesday The flight was pretty good, I worked on Busty Barrister until I ran out of batteries then I read Number Go Up on my Kindle.
November 21, 2023

List<IEvent> using C

Yesterday I was in the mood to go for a hike. The weather is a lot cooler now so it’s actually nice wandering around in the country parks of Hong Kong. I was originally going to go up to Sunset Peak, but then I felt a bit lazy, so I did a much easier flat hike that goes around sunset peak. Midway through the walk, I think this is Cheung Sha Beach.
November 18, 2023

Coding a Browser Game in C

For the last few months I have been working on Bank Statement Converter and a Raylib game called “Customer Support Sim”. I coded “Customer Support Sim” using Raylib and Kotlin. Raylib is a really awesome game programming library and Kotlin is my favourite language. However sadly I’ve hit a bit of a wall with the game, I’m not really sure how to make it fun. I thought about releasing it ‘as is’, but I think it’s better just to abandon it.
September 9, 2023

Customer Support Sim Dev Log #5

Saturday Added the ability for NPCs to send image messages Linked up level 2 and level 3 Linked up level 3 and level 4 Figured out how to build Jaylib https://github.com/electronstudio/jaylib Upgraded Jaylib from 4.2.0 to 4.5.0 Sunday It was a nice day so I went for a hike with Candice from Pak Kung Au to Mui Wo. Later that day I did a bunch of coding. Wasted a ton of time trying to get JPEGs to load.
September 2, 2023

Customer Support Sim Dev Log #4

Monday Added sound effects for when messages come in, player actions are correct and when player actions are incorrect. Added functionality to randomly create users. The names all come from obscure F1 drivers. I found a list of all F1 drivers, sorted them by the number of races they attended from least to most. Conversation closes when the user gives out an incorrect password. Lowered the music volume. This should be something the user can set in the settings page.
August 25, 2023

Customer Support Sim Dev Log #3

// TODO: You can just use Delay // TODO: You can just use PlaySong // TODO: Does this need to be a MutableList? // TODO: Try wiping out these lateinit var declarations. Nicer if they can be vals // TODO: Consider adding a OnEnter and OnExit methods Delays on successEvents/failEvents don’t seem to be working Level 2 call should change photos when different people are talking. Create a SetSkypePhoto Event Create LevelDataBuilder class?
August 16, 2023

Customer Support Sim Dev Log #2

// TODO: You can just use Delay // TODO: You can just use PlaySong // TODO: Does this need to be a MutableList? // TODO: Try wiping out these lateinit var declarations. Nicer if they can be vals // TODO: Consider adding a OnEnter and OnExit methods Delays on successEvents/failEvents don’t seem to be working Level 2 call should change photos when different people are talking. Create a SetSkypePhoto Event Create LevelDataBuilder class?
August 15, 2023

Customer Support Sim Dev Log #1

Create an image for information.txt Put icons into GameState Create an event that makes the information icon appear Create “Valued Behaviours” Create the information window Clicking on the information icon opens the information window Data in information window comes from GameState Create LevelComplete Event Rename GameState -> GameData Create a IGameState interface Create a GamePlayState class Create a VictoryState class When finishing level one, go to VictoryState Play victory sound in VictoryState class Create a LogoState class Create a GameStateManager class Setup data for level two Think about how to change levels VictoryState pressing enter takes you to the next level Level 2: Starts with CEO meeting, he talks about “Valued Behaviours”.
February 28, 2023

Mum and I look for a Heroin Cure

One day in January 2010 I was hanging out with my Mum in her study while she was drinking a coffee. She was reading the news, and found something interesting. “Take a look at this story, apparently the police in Cambodia rounded up a bunch of heroin addicts and conducted a drug trial on them”. The story she found only went for a paragraph or two. “This is pretty interesting, I’d like to know more about it”.
  • ««
  • «
  • 1
  • 2
  • 3
  • »
  • »»
© Angus Cheng 2024