Bah, Humbug! Code a game comp 7 - November 4th 2018 to December 23rd 2018

Started by Xerra, November 05, 2018, 23:38:44

Previous topic - Next topic

Xerra

Bah, Humbug! will be my entry for the Xmas competition.

You wake up one morning, after having a wild party the night before, to realise you still haven't found your Xmas present and your parents are due back from holiday today. To make matters worse your friends have hidden all your mothers Xmas cards and you need to find them before their return or there's going to be hell to pay. And just what are you going to do about this ghost of Ebenezer Scrooge that's wandering around the house shouting "Free my spirit" constantly?

Can you complete the game and both side quests to score the maximum points? You'll also need to complete your school homework which is an essay on the benefits of procrastination. You have been putting that off for weeks.

All of the game will take place over 20 locations in one house.

The game is not going to be tricky as I'm aware a lot of people find this type of game frustrating these days.

It will have graphics and music as well as buttons for moving around the map quickly.

---

For this competition I've decided to go with the traditional text adventure but rework it a bit so it can appeal to people who aren't fans of that type of game. By this I mean that interacting with the game will be by the old method of Verb/Noun so you will use commands like "Get Stick" or "Go North" but I plan to work around a lot of the typing, particularly around navigation of the map, to make it more dynamic.

For example if you wanted to move north then valid commands would be:
"Go North"
"Move North"
"N"

And you will also have the option of clicking on buttons under the graphics view for the same directions to save time.

"Get Stick", "Take Stick" will both do the same thing.
"Drop Stick", "Leave Stick" also do the same thing.

The idea being that the game puzzles are what makes you think rather than having to fight with a difficult parser.

A text adventure game would be pretty boring so I'm going to see if I can get room pictures done along with some Xmas music just to fit the theme.

I've not designed an adventure game since the early 80's when I used to make crude attempts in basic on my old Vic 20, which is why I'm doing this as I want to really test myself with a proper design this time. I've been guilty of jumping straight into game coding with no real plan before and it's usually come back to haunt me right near the end of a project. The six minutes to deadline of submitting my last game have taught me a valuable lesson here.

So the only code I've done so far is to modify my template project to have a text input/parser function ready for when I start coding the actual game. But what I have done as well is look for a tool to help me design the map and keep track of all the items, events that will be part of the game. There are some elements that this map isn't going to help with but it does give me a solid footing to actually get the core in place without suddenly realising I have rooms in the wrong place, items that I can't reach because I need the item to actually get to the room where I can find it and other logistical issues. Paradoxes like that would be a nightmare to deal with late on so I need a complete design before I actually do anything.

So what you're seeing here is a quick sketch of the room layout that I was considering working from - until I actually saw sense - and a map created with Trizbort which makes everything so much clearer. I spotted four major flaws in what I thought was a working game flow straight away once I laid it out like this. By the way, you're looking at a map without any items or other details put into it because spoilers etc.

If anyone is looking to create an adventure game like I am then I'd recommend using Trizbort to lay it out first. There's lots of different versions out there if you google it. I used a windows one (thank heavens for Parallels) to do mine which you can find here http://trizbort.genstein.net/.

Six weeks isn't a long time to get this done so wish me luck :-)
M2 Pro Mac mini - 16GB 512 SSD
ACER Nitro 5 15.6" Gaming Laptop - Intel® Core™ i7, RTX 3050, 1 TB SSD
Vic 20 - 3.5k 1mhz 6502

Latest game - https://xerra.itch.io/Gridrunner
Blog: http://xerra.co.uk
Itch.IO: https://xerra.itch.io/


Qube

Interesting idea and all the best in getting it all together :)

I'm still pondering an idea and wondering how to best go about it ( no bought media this time around ).

QuoteSix weeks isn't a long time to get this done so wish me luck :-)
No it's not a long time but luckily this comp is seven weeks, so no excuses :P
Mac Studio M1 Max ( 10 core CPU - 24 core GPU ), 32GB LPDDR5, 512GB SSD,
Beelink SER7 Mini Gaming PC, Ryzen 7 7840HS 8-Core 16-Thread 5.1GHz Processor, 32G DDR5 RAM 1T PCIe 4.0 SSD
MSI MEG 342C 34" QD-OLED Monitor

Until the next time.

Xerra

Didn't count the weeks on a calendar. Good news, that is. Bit more time to hammer at the keyboard.

Been working hard again today to tweak all the items in the game and get their locations on the map correct. I have to make sure that the game is solvable with every item in the game where it is so I spent lunchtime at work with a friend writing down a complete move list from the start point to game complete. At present, ignoring all three of the side quest objectives, the most optimized solution to completing the game takes exactly 82 moves. I'd estimate around a third of that is moving locations and it does skip going to a couple of the rooms completely as they only have relevance for completing the optional parts.

TLDR - I have the complete game design worked out ready to put in place once I get all the visual stuff that I need now, such as text formatting for long description lines and laying out a mock up screen so I know what area of the screen I'm using to fit with the graphics.

I wrote up a complete list of all the rooms detailing what elements need to be drawn in the picture for that room as well because I need some essential parts such as portrait pictures being shown visually as well as in the text for .... reasons. As well as all 20 rooms needing their own picture, I also need the wandering ghost of Scrooge that's going to be an animation, and some border stuff to work buttons and text areas around. I'm just hoping that my artist isn't going to throw a really expensive quote back my way once he costs it up.

As for code I'm using the same project template which I've used for my last three games now. I'm always working on it between games as well as incorporating new elements from the games I create so it's a lot more useful for getting things up and running now than it was at the start of my first competition game back in February. I'm going to need some kind of scroll back on any descriptive text so I'll have to add some kind of surface code to that area to keep around 100 lines roughly. This way it will be easy for the player to keep track of the things they have done so far. I'm also going to display a visual score, along with progress on the safe combination code, number of Xmas cards found and where the ghost currently is in the house.

Speaking of the ghost of Ebenezer, he's going to play a big part of the game as one of the side quests. He wanders around the house randomly and stays in each room for a certain amount of time. There is a way to free him to get a score multiplier and there will also be certain side-effects in his pattern depending on your actions which I won't spoiler for now. Suffice to say you don't want to be in the same room as him for too long as your total score will start dropping.

There's no deaths in this game - it's Xmas after all.
M2 Pro Mac mini - 16GB 512 SSD
ACER Nitro 5 15.6" Gaming Laptop - Intel® Core™ i7, RTX 3050, 1 TB SSD
Vic 20 - 3.5k 1mhz 6502

Latest game - https://xerra.itch.io/Gridrunner
Blog: http://xerra.co.uk
Itch.IO: https://xerra.itch.io/

Steve Elliott

Sounds like it's all coming together nicely.  Hand drawn adventure maps; takes me back  :D
Win11 64Gb 12th Gen Intel i9 12900K 3.2Ghz Nvidia RTX 3070Ti 8Gb
Win11 16Gb 12th Gen Intel i5 12450H 2Ghz Nvidia RTX 2050 8Gb
Win11  Pro 8Gb Celeron Intel UHD Graphics 600
Win10/Linux Mint 16Gb 4th Gen Intel i5 4570 3.2GHz, Nvidia GeForce GTX 1050 2Gb
macOS 32Gb Apple M2Max
pi5 8Gb
Spectrum Next 2Mb

Xerra

Now that map layout and the items in the game are decided I set to work putting the information into .csv files so it will be easy to make changes later on if I do run into a problem for any reason. As it stands the game has 20 locations and 24 moveable items and an adventure game is not an adventure game unless any object can be in any room at any time. I still remember old adventure games I played that, being a coder, you could tell hadn't organised their data handling well and had silly restrictions on stuff like number of items in a room, wouldn't let you drop anything once you picked it up or, the biggest travesty, actually lose track of items completely in your inventory.

I want Bah, Humbug! to have the facility to have all 24 moveable items in one room if the player wants to do it. Not because they need to but because it's stupid to have to say "Sorry, i can't do that!" if the player decides to drop something in a room that he thinks he doesn't need. It may be a pointless exersize for this game because I'm not setting any kind of inventory size limit, but who knows if I might reuse the data system in another adventure game that might one day.

So how I currently have it set up is the rooms list as shown in the csv file attached. Here I will parse the file and store each room in a data list, ignoring the first line with the headers. Then I create a grid with the list data so I can reference a room number and the item number for whatever bit of information I actually need. This is done because it's easier to pull out data from a grid than a list but a grid can only be 2*2 dimensions.

The csv file contains the name, room number, and then six fields which point to the room number that you will end up in for each of the moveable directions. Finally there is a very brief 1 line room description at the end which will be used for location display followed by any descriptive text being added in the individual room processing scripts. So, for example, The lounge is room 13 so the player decides he wants to go East. The game reads number 16 for the East direction room number and changes the room to the Conservatory and then processes the script for that room instead. This way I can basically code all the eventualities that are required for each room in their own script without worrying about anything else. Should the game find a zero in any direction and the player tries to move that way then I'll make the player bang their head on the wall, or something. It's a kind of state handler, basically.

As for the items list, I won't show that here because spoilers. But the layout only has four fields: Name, Item Number, Room location and Hidden. Name is pretty obvious, item number is a reference for the item and Room location states which room it's currently in. If that is loaded with a zero then the game knows it's in your inventory and will list in when you type "Inventory", "Inv" or maybe click a button. Hidden is self explanatory and is either Yes or No. If it is hidden then the game won't list it as being on screen until the player has discovered it by moving an object or another condition.

How it actually works is based on the room number. Every time player enters a new room then the list of items will be parsed and any that match the current room number will be listed as present. I will then have code in place for using the drop and get commands where it will update the item with the current room number if it gets dropped and reset it to zero if it's picked up.

As I've not written an adventure for 30+ years it took quite a while to come up with this system and it's not in code yet so may need to change once I start working on that part but I decided that I really needed to think it all through properly before I tried putting it all in place.

I also negotiated with the graphic artist I've used for my three previous games to work on this project as well. It's worked out to be a lot more expensive than the other three games put together so I'm really going to push myself to create a game that justifies the total cost. If I am as proud of it as I was of Rockman when it's complete then it will be more than worth it. Especially if I do use the shell for another adventure game one day because it was pretty good fun plotting this one out.

Finally as for writing the game itself I've actually not got too much done. I've mapped out some graphical stuff for a game screen so I can put start throwing text around to check the map and items all work correctly but not actually put the scripts in place yet so there's nothing to actually show yet. My project file has been dusted off and stripped off any fluff ready to go however, so I'm hoping it's going to be a lot quicker coming together now the data is all in place.
M2 Pro Mac mini - 16GB 512 SSD
ACER Nitro 5 15.6" Gaming Laptop - Intel® Core™ i7, RTX 3050, 1 TB SSD
Vic 20 - 3.5k 1mhz 6502

Latest game - https://xerra.itch.io/Gridrunner
Blog: http://xerra.co.uk
Itch.IO: https://xerra.itch.io/

Matty

Hangon a moment-did you really commission an artist for the games in the previous comp entries? That would cost as much or more than any possible prize wouldnt it?

Xerra

Quote from: Matty on November 09, 2018, 18:33:19
Hangon a moment-did you really commission an artist for the games in the previous comp entries? That would cost as much or more than any possible prize wouldnt it?

Yes, I did. I had the same guy I'm hiring now who did artwork in all three of my last games - including the unfinished one. I posted confirmation receipts to show the costs as per the rules. I got someone to do the art for me for several reasons:

1) I can't draw for shit. I'm really hopeless and not very good with art packages beyond the basic stuff like resizing images, swapping colours and stuff.
2) I didn't really pay that much until now.
3) I never have to worry about using free stuff and not reading the licence properly.
4) I own the stuff that I've paid for. I could use it again if I wanted to.
5) I never expect to win a prize so I've already justified the cost to myself against the pride in having another game I've written out there.

For Envahi I was using basic artwork that I'd either hacked together myself or dug up free stuff that kind of worked but it didn't look very good. By the last couple of weeks it looked like I would get the game completed in time and it was going to stand up terribly against the other games. So I thought to myself that I'd always planned to do this game anyway, and the competition had motivated me to finish the game (one off the bucket list), so why not get someone to at least do a better job with the moving sprites and make the game a bit better. I spent around £30 in total but I was lucky enough to get 3rd place for £100 so it ended up being a good investment.

I took the same route with RAM and spent a bit more cash this time because I needed a decent background and also several computer parts that i could use as needed on top of it. Think that one was around £45 in total but around a week to the deadline I just found the game wasn't working out. Too much time spent working on the background stuff and the game was too shallow so I canned it in. If I ever go back and work on it again it's still going to be a loss as I'd probably never release it now.

Rockman was a different story as I got a bit more adventurous and actually did some of the simple graphics myself. Stuff like wall background objects and earth. Nothing very impressive but I had got more comfortable with software like Logomaker and the tools within Gamemaker 2 by now so I only spent around £15 on the character sprites and a couple of other bits. Because I felt the game was coming together well in the last few days I then spent around £25 to get the main characters drawn in a much larger scale so I could use them for ItchIO images and on my website etc. Rockman didn't win the competition but I was so proud of the game anyway that it wasn't really about the money at all.

For Bah, Humbug! I'm currently going to be laying out around £150 after Freelancer fees but there's reasoning to this, even if it does seem insane for a competition game. I played Adventure games with my mother when I was a teenager. It's one of the few things that we ever really related to as a hobby. My plan is for one of her presents to be a USB stick this year with my adventure on it for her to play through. She has parkinsons so can't really use a mouse properly any more but she's still ok to type. She thought her adventure game days were over so I'm hoping this will go down rather well. For the last 3-4 years I'd been planning on remaking Voodoo castle as a graphic/text adventure as that one had always been our favourite but I think this will go down even better.

So, in short, I don't give a monkey about laying out a bit of cash this time round. The competition is my spur to get it done. Making a game good enough to actually win a prize would just be a bonus this time round :-)

Additionally, Freelancer is full of people who can do artwork and other creative stuff. I use the same guy because he's probably nowhere near the best but he does a competent enough job, he's reliable, I suspect the money is worth a lot more to him than me and also he's working very, very cheap. Art can cost an absolute fortune, especially in a game that needs a lot of it. I'm after 20 room backgrounds in a house, as well as a logo, an animated ghost character and some other bits. Bet it would be really hard to find another graphic artist who's going to do that as cheap as £150
M2 Pro Mac mini - 16GB 512 SSD
ACER Nitro 5 15.6" Gaming Laptop - Intel® Core™ i7, RTX 3050, 1 TB SSD
Vic 20 - 3.5k 1mhz 6502

Latest game - https://xerra.itch.io/Gridrunner
Blog: http://xerra.co.uk
Itch.IO: https://xerra.itch.io/

Xerra

My artist has come up with an initial design for the starting room of the adventure which is your bedroom. The coke machine and the coat are in there specifically for the first puzzle. He's going to add in some window lights as I've requested him to make it look like Xmas in each room but I'm pretty happy with how it looks apart from that.


M2 Pro Mac mini - 16GB 512 SSD
ACER Nitro 5 15.6" Gaming Laptop - Intel® Core™ i7, RTX 3050, 1 TB SSD
Vic 20 - 3.5k 1mhz 6502

Latest game - https://xerra.itch.io/Gridrunner
Blog: http://xerra.co.uk
Itch.IO: https://xerra.itch.io/

Derron


therevills

Quote from: Derron on November 10, 2018, 01:16:41
Make sure to not infringe any copyright...

Yeah you'll need to change the Coke vending machine to something generic... also why would someone have a vending machine in the their bedroom? Is it a nod to MI2?


Qube

QuoteMake sure to not infringe any copyright...
Yeah, get your artist to change it to something like "Polar Cola"

Quotealso why would someone have a vending machine in the their bedroom?
Do not query as to why someone would, but why they actually have :P

Also, because...

QuoteThe coke machine and the coat are in there specifically for the first puzzle
It's part of the game, deal with it ;D
Mac Studio M1 Max ( 10 core CPU - 24 core GPU ), 32GB LPDDR5, 512GB SSD,
Beelink SER7 Mini Gaming PC, Ryzen 7 7840HS 8-Core 16-Thread 5.1GHz Processor, 32G DDR5 RAM 1T PCIe 4.0 SSD
MSI MEG 342C 34" QD-OLED Monitor

Until the next time.

Derron

The look of the second picture is - in my opinion - the one to stay with. The first picture looked too "clean" and as if someone pasted parts of the image together or created "paintings" out of real-world-pictures.
The "painted" look of the second image might be a bit "concept art"-like but I think it suits very well to a competition-game-entry.

So you hired a paid artist again - or did you find a talented person willed to create stuff together with you - aka a "team" ?


bye
Ron

Xerra

Quote from: Derron on November 10, 2018, 01:16:41
Make sure to not infringe any copyright...

Didn't think anything about the coke machine until you said that. I've asked him to change it to just say Cola and make it look different now as well as change that picture above the bed. It's supposed to be a teenagers bedroom. I don't recall mine ever being that tidy :-)

As for why the machine is there then it's just because it's a kind of tribute to the babel fish puzzle in Hitchhikers guide to the galaxy. That was just a generic vending machine, however. You forget stuff over the years. I also made it a lot shorter to solve as that one is probably only interesting the first time you run through it.
M2 Pro Mac mini - 16GB 512 SSD
ACER Nitro 5 15.6" Gaming Laptop - Intel® Core™ i7, RTX 3050, 1 TB SSD
Vic 20 - 3.5k 1mhz 6502

Latest game - https://xerra.itch.io/Gridrunner
Blog: http://xerra.co.uk
Itch.IO: https://xerra.itch.io/

Xerra

Quote from: Derron on November 10, 2018, 08:42:01
The look of the second picture is - in my opinion - the one to stay with. The first picture looked too "clean" and as if someone pasted parts of the image together or created "paintings" out of real-world-pictures.
The "painted" look of the second image might be a bit "concept art"-like but I think it suits very well to a competition-game-entry.

So you hired a paid artist again - or did you find a talented person willed to create stuff together with you - aka a "team" ?

The look of the second picture might well be much better for you, Ron, but it's not what my guy has done. That artist is probably a lot better but it would probably cost me a hell of a lot more to get art like that in this game. I might not care about spending the money but I do have to have the money in the first place :-)

There's no real team thing in any of the games I've written. I've got a friend who sometimes helps me out with some technical stuff, as he was an industry developer for years and understands GML a bit better than me. He doesn't do any actual coding, however, just a bit of testing. My better half looks at stuff I do and she will sometimes play it, if it's not a fast, hard arcade type game, because she has almost zero experience of playing games so it's not really her thing. I've also got a colleague at work who's one of my systems team, who has helped me work out some ideas for RAM and also this game.

If I could find a talented artist who wanted to work as a team instead of hiring someone and paying them then I'd be really happy. Unfortunately people do want to be paid and I've yet to write a game that I'd consider good enough to actually sell. While there may be people out there who want to do stuff like this, just because it's what they do, rather than for money, I don't actually know any of them.
M2 Pro Mac mini - 16GB 512 SSD
ACER Nitro 5 15.6" Gaming Laptop - Intel® Core™ i7, RTX 3050, 1 TB SSD
Vic 20 - 3.5k 1mhz 6502

Latest game - https://xerra.itch.io/Gridrunner
Blog: http://xerra.co.uk
Itch.IO: https://xerra.itch.io/