SyntaxBomb - Indie Coders

General Category => Worklogs => Topic started by: BasicBoy on November 08, 2018, 02:17:52

Title: Santa's House (provisional title) - code-a-game compo #7
Post by: BasicBoy on November 08, 2018, 02:17:52
Making a 3D game which has the provisional title 'Santa's House' (he owns a grotto as well which probably won't feature in the game). The main objective for the player (as it currently stands, and it's subject to change) is to find his/her present (nicely wrapped) which Santa refuses to deliver because of the player's bad behaviour. The player will explore Santa's snow-covered garden, his house and basement, solving fairly simple puzzles. Bumping into Santa himself is unlikely to be a pleasant experience, ánd might even prove fatal (haven't decided on this yet though). The game will have fairly simplistic 3D graphics (textured and flat-shaded polygons, no shaders or anything fancy!).

I've spent the last two days working on the 3D map/world editor, still work-in-progress:




BasicBoy.
--





 





Title: Re: Santa's House (provisional title) - code-a-game compo #7
Post by: Xerra on November 08, 2018, 17:55:13
Watching the video I'm making the assumption that you're laying down walls on a top-down view and when you actually view them in game you'll be able to define stuff like colours too. I've never done anything 3d before that's required an editor, or anything in proper 3d come to think of it, so I'm curious to see how this pans out.

Was certainly surreal seeing all the if / endif's in the code. Not used those in a while now :-)
Title: Re: Santa's House (provisional title) - code-a-game compo #7
Post by: BasicBoy on November 08, 2018, 18:53:09
Quote from: Xerra on November 08, 2018, 17:55:13
Watching the video I'm making the assumption that you're laying down walls on a top-down view and when you actually view them in game you'll be able to define stuff like colours too. I've never done anything 3d before that's required an editor, or anything in proper 3d come to think of it

Yes, the map shown in that video is a bird's-eye view (or 'plan view') of the 3D world I'm aiming to create.

QuoteI'm curious to see how this pans out.

Me too!


QuoteWas certainly surreal seeing all the if / endif's in the code. Not used those in a while now :-)

I tend to overdo it for no good reasons, so instead of

IF A=123 AND B=234 AND C=345 THEN (do something)

I like to do this:

IF A=123 THEN
  IF B=234 THEN
    IF C=345 THEN
     (do something)
    ENDIF
  ENDIF
ENDIF


It's just a habit, but actually it usually results in slightly faster 'execution' by the interpreter, but most of the time that just isn't important.


BasicBoy.
--
Title: Re: Santa's House (provisional title) - code-a-game compo #7
Post by: Xerra on November 08, 2018, 20:54:28
Quote from: BasicBoy on November 08, 2018, 18:53:09

I like to do this:

IF A=123 THEN
  IF B=234 THEN
    IF C=345 THEN
     (do something)
    ENDIF
  ENDIF
ENDIF



It's no different really to how you'd do it in GML, which is the code I'm using.


if (A == 123) {
  if (B == 234) {
    if (C == 345) {
      // Do something
    }
  }
}



Took me a while to get used to semi-colons at the end of each line when I first started using it. In fact you don't strictly have to use them but I thought I'd adapt to it because it's used in other languages too. Nowday's it's second nature.
Title: Re: Santa's House (provisional title) - code-a-game compo #7
Post by: BasicBoy on November 10, 2018, 19:01:49
Incremental progress, still not much to see:

EDIT (12/11/2018): Latest: https://www.youtube.com/watch?v=hi9wSQG8tHg (https://www.youtube.com/watch?v=hi9wSQG8tHg)

https://www.youtube.com/watch?v=XXxnwVW_UHU (https://www.youtube.com/watch?v=XXxnwVW_UHU)
Title: Re: Santa's House (provisional title) - code-a-game compo #7
Post by: Xerra on November 13, 2018, 00:04:43
Got me thinking now. How can I get a 3d maze into GMS 2. I'm just thinking of sticking a huge dinosaur in there and having him hunt the player down, like 3d monster maze. Just how to put a 3d maze into a dev system really only designed for 2d..... ;-)
Title: Re: Santa's House (provisional title) - code-a-game compo #7
Post by: BasicBoy on November 13, 2018, 10:01:11
Quote from: Xerra on November 13, 2018, 00:04:43
Got me thinking now. How can I get a 3d maze into GMS 2. I'm just thinking of sticking a huge dinosaur in there and having him hunt the player down, like 3d monster maze. Just how to put a 3d maze into a dev system really only designed for 2d..... ;-)

Does GMS2 not have any 'standard' or 3rd-party 3D libraries you can use? Looking at some results from YouTube (see links below) 3D certainly appears possible with that dev system, but maybe these guys had to pretty much write their own renderers? I'm clueless about GMS2, and so know nothing about its limitations.

https://www.youtube.com/watch?v=kC_5XxcGflc (https://www.youtube.com/watch?v=kC_5XxcGflc)
https://www.youtube.com/watch?v=QTKKs5tddMY (https://www.youtube.com/watch?v=QTKKs5tddMY)
https://www.youtube.com/watch?v=mtm7lMmUF38 (https://www.youtube.com/watch?v=mtm7lMmUF38)

A 21st century update to '3D Monster Maze' (a ZX81 masterpiece!) could feature subtle surround sound effects for enhanced psychological effect  :)

Incidentally (and excuse the digression), I made a bad mistake with that 'Blue Monster Hunter' subgame from Maizie Bones which I discovered a few days ago: the vertices which define the corners of visible maze walls (as viewed from the vantage point of the player) are all specified in clockwise order (this is important), whilst those that appear anticlockwise (from the player's point of view) were supposed to get culled by the Direct3D rendering engine. Anyway, I incorrectly declared the wrong culling mode (an invalid one in fact), with the end result being that every bloody wall in the maze that was supposed to be invisible (occluded/culled) effectively got rendered (albeit hidden by the Z-buffering). This actually explains the poor performance I wrote about in the Maizie Bones thread. Anyway, at some point I'll release an update of MB with that particular problem fixed.


BasicBoy
--
Title: Re: Santa's House (provisional title) - code-a-game compo #7
Post by: BasicBoy on November 14, 2018, 11:08:17
A week and a half into the compo and I still haven't finished the editor, with plenty more work to do on it.

Still to do:  Ceilings, stairs/slopes, wall collision detection, 3D models/objects, textures, puzzles, and much else besides. Crikey.  :o

https://www.youtube.com/watch?v=oBQuJxXkeBc (https://www.youtube.com/watch?v=oBQuJxXkeBc)


EDIT (14/11/18): Now has ceilings: https://www.youtube.com/watch?v=bobkH7aXEos (https://www.youtube.com/watch?v=bobkH7aXEos)

Title: Re: Santa's House (provisional title) - code-a-game compo #7
Post by: BasicBoy on November 24, 2018, 01:11:36
Wall collisions are in place, as are slopes and stairways. Still only placeholder graphics (obviously), and the map used is just a test one for development purposes. I'll start drawing graphics & doing (or attempting!) simple 3D modelling from Monday (26th Nov). Still so much to do, with just a touch over 4 weeks to finish the whole thing!

https://www.youtube.com/watch?v=L9IyCTOPCos (https://www.youtube.com/watch?v=L9IyCTOPCos)

I will need to smooth-out the player's mouse-controlled motion a bit.


I've tested the program on a Raspberry Pi 3B+ under Raspbian (basically Linux), and it works very nicely indeed.


BasicBoy.
--
Title: Re: Santa's House (provisional title) - code-a-game compo #7
Post by: RemiD on November 24, 2018, 16:44:37
Cool :)
The technician within me likes UVMap / debug textures  ;D
Title: Re: Santa's House (provisional title) - code-a-game compo #7
Post by: Steve Elliott on November 24, 2018, 16:48:43
Impressive.
Title: Re: Santa's House (provisional title) - code-a-game compo #7
Post by: RemiD on November 24, 2018, 17:09:48
QuoteImpressive.
www.youtube.com/watch?v=1p1vVjIgUzk&t=21s
:D
Title: Re: Santa's House (provisional title) - code-a-game compo #7
Post by: BasicBoy on December 04, 2018, 18:07:15
Still soldiering on, but very much behind schedule.

Here's the latest WIP, being tested under Raspbian Stretch on a Raspberry Pi 3 model B:

https://www.youtube.com/watch?v=aK77M4Xgh3k (https://www.youtube.com/watch?v=aK77M4Xgh3k)

Sorry about the shaky hand-held video recording!


BasicBoy.
--
Title: Re: Santa's House (provisional title) - code-a-game compo #7
Post by: Steve Elliott on December 04, 2018, 18:09:19
Quite some progress since the last video.   :)