[GRdev] Hobbyist game development

Anything to do with games at all.
User avatar
Balladeer
Member
Joined in 2018
Location: Lord's

PostRe: [GRdev] Hobbyist game development
by Balladeer » Tue May 26, 2020 6:15 pm

Karl_ wrote:If you ever do another project I'd definitely be interested in hearing how game programming in R goes! :P

:dread:

So yep, I’m creating a text adventure game in R for my girlfriend’s 30th, using R because that’s kinda all I have. The one key thing that’s actually programming-related I’ve found in R is that you can’t change any variables naturally while in a function apart from the return variable, without using a couple of commands that StackOverflow strongly advised against. Nuts to them, I say.

The other key thing is that I’ve had to design a different function for every useful object and ‘use x on y’ in the eleven-room map. That’s a whole lot of very tailored functions that each take a good while, although most of that is writing. The rest of the writing is the myriad of .csvs my scrappy game imports containing interactions and combinations and room descriptions and so on - which, naturally, grow exponentially with each room I add. That also means that if I change an item name I have to root through twenty-odd .csvs and fifty-odd functions to check if it needs changing anywhere else.

Also there’s a rampaging giant badger that appears in a random room after every four actions, which surprisingly has been one of the easier bits to programme.

I haven’t even decided on an interface tool yet. Do I make everything operate through readline (command line essentially) statements, or do I try and relearn Rshiny, the bit of the R course I took that I hated the most - in a week at the end of the actual game construction? Leaning towards readlines NGL.

I can’t say I recommend it all truth be told, but I’ve learned some useful R tips and it’s at the point where it’s starting to come together now. Until I bug test it again and it all falls apart because I’ve misspelled a single word in a single .csv and :fp:

User avatar
That
Dr. Nyaaa~!
Dr. Nyaaa~!
Joined in 2008

PostRe: [GRdev] Hobbyist game development
by That » Tue May 26, 2020 6:25 pm

Balladeer wrote:The other key thing is that I’ve had to design a different function for every useful object and ‘use x on y’ in the eleven-room map. That’s a whole lot of very tailored functions that each take a good while, although most of that is writing. The rest of the writing is the myriad of .csvs my scrappy game imports containing interactions and combinations and room descriptions and so on - which, naturally, grow exponentially with each room I add. That also means that if I change an item name I have to root through twenty-odd .csvs and fifty-odd functions to check if it needs changing anywhere else.

[...] I can’t say I recommend it all truth be told, but I’ve learned some useful R tips and it’s at the point where it’s starting to come together now. Until I bug test it again and it all falls apart because I’ve misspelled a single word in a single .csv and :fp:


:lol: Amazing! I do a lot of data science so I definitely have projects like this (I'm a Python/Pandas person though!), I feel your pain.

Sounds like you're pushing R to its limits and that's pretty cool - you've got to be one of just a handful of people who've made a game that way, which is really interesting! :D

Image
User avatar
Balladeer
Member
Joined in 2018
Location: Lord's

PostRe: [GRdev] Hobbyist game development
by Balladeer » Tue May 26, 2020 7:23 pm

I’m due to learn Python later in the year - maybe it’ll be better? But yep, I’m in finance so that’s mostly what I use my programming for - not gaming!

It certainly feels like doing things R was never meant to do. That’s rewarding in a way, and deeply frustrating in another...

User avatar
OrangeRKN
Community Sec.
Joined in 2015
Location: Reading, UK
Contact:

PostRe: [GRdev] Hobbyist game development
by OrangeRKN » Tue May 26, 2020 8:53 pm

Sounds cool balla! Text adventures are really fun to write because its easy to see the scope of the whole thing, and its quick (even with language quirks I guess :lol:) to add new ideas

Image
Image
orkn.uk - Top 5 Games of 2023 - SW-6533-2461-3235
User avatar
Balladeer
Member
Joined in 2018
Location: Lord's

PostRe: [GRdev] Hobbyist game development
by Balladeer » Tue May 26, 2020 8:55 pm

In R, quick-ish. :lol:

But yep, being able to see the scope of the whole thing was a reason I decided on the genre. As was not having the time or ability to supply art... (Also The Lady grew up on Monkey Island and the like.)

User avatar
OrangeRKN
Community Sec.
Joined in 2015
Location: Reading, UK
Contact:

PostRe: [GRdev] Hobbyist game development
by OrangeRKN » Tue Aug 11, 2020 12:17 am

Bump!

This is very work in progress, but I want to share it anyway! It's my first proper attempt at a graphical game, written from scratch in pure javascript. So far all you can do is move around to explore the map, you can't interact with anything or enter any of the buildings. The map design itself is finished - it's using a version of the tileset I was posting here a while ago. Fans of Link's Awakening should find the whole thing very familiar!

https://orkn.uk/unawakening

Use wasd to move around and see if you can break anything I guess!

And please excuse the fact you are playing as a bright red square :lol:

Image
Image
orkn.uk - Top 5 Games of 2023 - SW-6533-2461-3235
User avatar
That
Dr. Nyaaa~!
Dr. Nyaaa~!
Joined in 2008

PostRe: [GRdev] Hobbyist game development
by That » Tue Aug 11, 2020 2:39 pm

OrangeRKN wrote:Bump!

This is very work in progress, but I want to share it anyway! It's my first proper attempt at a graphical game, written from scratch in pure javascript. So far all you can do is move around to explore the map, you can't interact with anything or enter any of the buildings. The map design itself is finished - it's using a version of the tileset I was posting here a while ago. Fans of Link's Awakening should find the whole thing very familiar!

https://orkn.uk/unawakening

Use wasd to move around and see if you can break anything I guess!

And please excuse the fact you are playing as a bright red square :lol:


This is super cool OR!

I think the red square is actually a bold design decision ;)

Image
User avatar
Jenuall
Member
Joined in 2008
AKA: Jenuall
Location: 40 light-years outside of the Exeter nebula
Contact:

PostRe: [GRdev] Hobbyist game development
by Jenuall » Tue Aug 11, 2020 2:45 pm

Yeah that's really neat OR!

Obviously this is very early days but one note I would give now relates to movement - it's very strict a this point in terms of collision - if you are trying to move Captain Red Square past a blocking tile then even if he is just 1 pixel in line with that blocking tile he won't go anywhere. Something to "bump" the player around obstacles would help with the feel of things.

User avatar
OrangeRKN
Community Sec.
Joined in 2015
Location: Reading, UK
Contact:

PostRe: [GRdev] Hobbyist game development
by OrangeRKN » Tue Aug 11, 2020 3:00 pm

Thanks both!

Karl_ wrote:I think the red square is actually a bold design decision ;)


No good commie :capnscotty:

Jenuall wrote:Obviously this is very early days but one note I would give now relates to movement - it's very strict a this point in terms of collision - if you are trying to move Captain Red Square past a blocking tile then even if he is just 1 pixel in line with that blocking tile he won't go anywhere. Something to "bump" the player around obstacles would help with the feel of things.


Agreed! That's definitely one of the things in the movement that feels "off". I don't know what the gamedev term is but yeah, I want to try having it so you get "pushed" a pixel to the left or right to help move around corners (similar to 2D platformers where jumping up into a corner will push you to the open side).

A lot of this is probably me re-deriving well established game design from first principles, but I don't think I can do it any other way. My problem with jumping straight to e.g. Unity is that so much is hidden and abstracted, I just don't understand what is actually happening. Like I'm sure my main loop and handling of frames in this is pretty terrible but at least I understand it :lol:

So far the movement is very basic and movement speed is tied directly to framerate (it's 1 "pixel" per frame and should be 60fps although I have avoided learning about browser draw limitations and actual hardware concerns!).

Collision is at the moment a simple check that the position to move into is a "passable" tile (I did it this way round because there are many more impassable tiles than passable tiles). The only "tweak" I've made is with the screen transitions, where I've implemented a "buffer" of 6 frames (100ms) that needs to fill of movement in that direction to trigger a screen transition. That makes the edges slightly sticky so you don't keep accidentally jumping over the boundary, which is especially noticeable where you are trying to move along a single tile path on the edge of a screen. It seems to work nicely but isn't perfect - the buffers are currently independent of each other which means you can get some very awkward and speedy transitions in the corners of the screen. I also think I need to delay the reading of input for a few frames after screen transition, as at the moment you tend to immediately move into the screen as soon as you transition. I think it'd feel better to transition and be right on the edge of the screen so you can react before moving on the new screen.

Image
Image
orkn.uk - Top 5 Games of 2023 - SW-6533-2461-3235
User avatar
That
Dr. Nyaaa~!
Dr. Nyaaa~!
Joined in 2008

PostRe: [GRdev] Hobbyist game development
by That » Tue Aug 11, 2020 3:12 pm

OrangeRKN wrote:Unity is that so much is hidden and abstracted, I just don't understand what is actually happening. Like I'm sure my main loop and handling of frames in this is pretty terrible but at least I understand it :lol:


This is actually a part of why I don't do that much game dev stuff.

I enjoy game engine coding and making toys in that domain - so I have lots of C/OpenGL projects that do things like display a sprite or make a scrolling tile grid or create a scan-line effect over a rendering.

On the other hand I'm ambivalent about game design as an artistic endeavour. It's a months-long process, and if I'm feeling artsy rather than engineeringy I would rather write or draw something over a few days or weeks and then move on.

I think I could probably trick myself into making a game if I was dipping in and out of the problem-solving stuff all the time. But I know the best way to actually make a game is to download Unity. And the programming side of Unity is pretty easy, on purpose, to let you focus on the design of the game. Which is great if you love game design and hate headache-inducing low-level debugging. But I like headache-inducing low-level debugging!!!

Anyway, I'm not sure where I'm going with that. I definitely don't think it's "bad" that Unity has already solved all the problems I'm interested in. It's just I want to solve those problems myself if I'm doing something for pure fun.

Image
User avatar
OrangeRKN
Community Sec.
Joined in 2015
Location: Reading, UK
Contact:

PostRe: [GRdev] Hobbyist game development
by OrangeRKN » Tue Aug 11, 2020 3:20 pm

Yeah I get you. It's definitely the physicist mindset in me, not being able to accept the higher level overview when I know there is something else going on underneath! What's somewhat reassuring to think is that while things like Unity give you an engine that is good enough (great even!), the truly best feeling games often end up implementing the basics anyway to their own specific design. Looking over that Celeste movement code and reading an interview over it was very comforting in that respect!

Image
Image
orkn.uk - Top 5 Games of 2023 - SW-6533-2461-3235
User avatar
OrangeRKN
Community Sec.
Joined in 2015
Location: Reading, UK
Contact:

PostRe: [GRdev] Hobbyist game development
by OrangeRKN » Tue Aug 18, 2020 10:46 pm

Updated to the latest version! https://orkn.uk/unawakening

- Improved movement ("bump" around edges and better screen transitions, plus I refactored the code to minimise duplication).
- Interaction/dialogue implemented, currently you can read signs (and interact with the rooster statue and the village well). Press J to interact in the direction you are facing (you can't tell because you're a red square, but you will be facing in the direction you last tried to move).
- Entering doors written in, sort-of demonstrated by the shrine door taking you to the house on the beach (and vice versa).

Would love any feedback, especially with regards to how movement/the collision detection feels now :)

EDIT:

Captain Red Square is dead! Replaced by the enigmatic Private Placeholder, complete with the most basic of walking animations. I think it improves the experience somewhat, even if I'd like to draw someone a little better looking to take his place! There are also a couple more interaction points hidden around.

EDIT 2:

Made some improvements to the player animation.

- Private Placeholder now "pushes" against walls when walking into them. This is only an animation/visual change, but I think it makes the collision detection feel better!
- A grass sprite gets overlaid on the player character when walking through long grass.

I also slightly tweaked the placeholder sprites so it's looking a little better

Image
Image
orkn.uk - Top 5 Games of 2023 - SW-6533-2461-3235
User avatar
OrangeRKN
Community Sec.
Joined in 2015
Location: Reading, UK
Contact:

PostRe: [GRdev] Hobbyist game development
by OrangeRKN » Wed Aug 26, 2020 9:18 pm

You can now go inside every building (apart from the shrine in the North-East) :toot:

Most of the time to get the insides added was in making the tileset and layouts. I think they've gone pretty well!

The next big feature is adding NPCs you can talk to - which I need to write bearing in mind I don't want them to be completely static. It also means more spriting, which I am happy about!

Image
Image
orkn.uk - Top 5 Games of 2023 - SW-6533-2461-3235
User avatar
Jenuall
Member
Joined in 2008
AKA: Jenuall
Location: 40 light-years outside of the Exeter nebula
Contact:

PostRe: [GRdev] Hobbyist game development
by Jenuall » Wed Aug 26, 2020 9:23 pm

Haven't been browsing on a PC in a while so haven't been able to check on your developments OR but it sounds like you're making some great progress!

User avatar
That
Dr. Nyaaa~!
Dr. Nyaaa~!
Joined in 2008

PostRe: [GRdev] Hobbyist game development
by That » Wed Aug 26, 2020 9:27 pm

@OrangeRKN: At this rate you could have a working dungeon pretty soon! Amazing! :mrgreen:

Image
User avatar
That's not a growth
Member
Joined in 2008

PostRe: [GRdev] Hobbyist game development
by That's not a growth » Thu Aug 27, 2020 7:40 am

Karl_ wrote: At this rate you could have a working dungeon pretty soon! Amazing! :mrgreen:


Things Falsey's contractor has said.

User avatar
Lime
Member
Joined in 2008
AKA: Lime

PostRe: [GRdev] Hobbyist game development
by Lime » Thu Aug 27, 2020 1:53 pm

This is awesome OrangeRKN, I wish I could do stuff like this. I can code/test but wouldn't know where to start with animated graphics.


Not sure if the below is helpful or annoying for you!
I may have found a little control glitch.
If I'm walking right with 'D', and press 'A' as I want to change direction quickly, if 'D' is still depressed, then I release 'D' (with A still held down), Private Placeholder walks 2 tiles to the right (ie opposite direction to the key pressed down), and stops. When I then release 'A', he'll continue to walk right until he hits an immovable object.

Sounds complicated but I kept doing it to check, it happens every time (took a while to work out the exact logic for reproducing it) and does the same in the Y axis too.

so
Press and hold D -> PP walks right
Press A (with D still pressed) -> PP stops
Release D (with A still pressed) -> PP walks two(ish) tiles to the right
Release A -> PP walks right with no keys pressed.

Feel free to ignore if I'm out of line, wasn't sure if this is the kind of feedback you wanted?

Image< Click here to listen to my band, finally on Spotify (and all other streaming services!)
3ds - 0946-2364-6907
Wii U - Monkeylime
Switch Online - SW-0245-1766-8994
User avatar
That
Dr. Nyaaa~!
Dr. Nyaaa~!
Joined in 2008

PostRe: [GRdev] Hobbyist game development
by That » Thu Aug 27, 2020 2:02 pm

Is it intentional that there's no library on the path down to the beach?

Image
User avatar
OrangeRKN
Community Sec.
Joined in 2015
Location: Reading, UK
Contact:

PostRe: [GRdev] Hobbyist game development
by OrangeRKN » Thu Aug 27, 2020 2:38 pm

Lime wrote:This is awesome OrangeRKN, I wish I could do stuff like this. I can code/test but wouldn't know where to start with animated graphics.


Not sure if the below is helpful or annoying for you!
I may have found a little control glitch.
If I'm walking right with 'D', and press 'A' as I want to change direction quickly, if 'D' is still depressed, then I release 'D' (with A still held down), Private Placeholder walks 2 tiles to the right (ie opposite direction to the key pressed down), and stops. When I then release 'A', he'll continue to walk right until he hits an immovable object.

Sounds complicated but I kept doing it to check, it happens every time (took a while to work out the exact logic for reproducing it) and does the same in the Y axis too.

so
Press and hold D -> PP walks right
Press A (with D still pressed) -> PP stops
Release D (with A still pressed) -> PP walks two(ish) tiles to the right
Release A -> PP walks right with no keys pressed.

Feel free to ignore if I'm out of line, wasn't sure if this is the kind of feedback you wanted?


Thanks, this is absolutely helpful! I've followed those steps and haven't been able to replicate it, but I suspect it might be a browser difference. What browser are you using (and OS for good measure)?

Funnily enough Link's Awakening has a whole category of bugs around simultaneous input in opposite directions, which you wouldn't come across on the original hardware because the Game Boy d-pad doesn't allow for simultaneous left/right or up/down. Seems fitting it would come up here too!

But yes I'm very grateful for giving it a play and any feedback, bugs especially. (There is a "known bug" in the live version where PP will do a push animation when entering doors which I've already fixed locally, in case you noticed that!)

Karl_ wrote:Is it intentional that there's no library on the path down to the beach?


The building at the fishing pond is the library (it was unenterable in LA). Nice spot though ;)

A couple other buildings have moved around, and the shop interiors are actually based on the interiors of the Witch's hut and Mr Write's house (sans bed).

Image
Image
orkn.uk - Top 5 Games of 2023 - SW-6533-2461-3235
User avatar
That
Dr. Nyaaa~!
Dr. Nyaaa~!
Joined in 2008

PostRe: [GRdev] Hobbyist game development
by That » Thu Aug 27, 2020 2:42 pm

Ahhh, I understand! Makes sense, given you've shrank down the canvas a little bit, that certain things would move around slightly.

Image

Return to “Games”

Who is online

Users browsing this forum: Godzilla, Lagamorph, Monkey Man, more heat than light and 270 guests