Author Topic: Santa's House (provisional title) - code-a-game compo #7  (Read 577 times)

Offline BasicBoy

  • Full Member
  • ***
  • Posts: 102
Santa's House (provisional title) - code-a-game compo #7
« on: November 08, 2018, 02:17:52 AM »
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.
--





 






Offline Xerra

  • Sr. Member
  • ****
  • Posts: 304
    • Retro Evolved
Re: Santa's House (provisional title) - code-a-game compo #7
« Reply #1 on: November 08, 2018, 05:55:13 PM »
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 :-)

Offline BasicBoy

  • Full Member
  • ***
  • Posts: 102
Re: Santa's House (provisional title) - code-a-game compo #7
« Reply #2 on: November 08, 2018, 06:53:09 PM »
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.

Quote
I'm curious to see how this pans out.

Me too!


Quote
Was 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

Code: [Select]
IF A=123 AND B=234 AND C=345 THEN (do something)
I like to do this:

Code: [Select]
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.
--

Offline Xerra

  • Sr. Member
  • ****
  • Posts: 304
    • Retro Evolved
Re: Santa's House (provisional title) - code-a-game compo #7
« Reply #3 on: November 08, 2018, 08:54:28 PM »

I like to do this:

Code: [Select]
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.

Code: [Select]
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.

Offline BasicBoy

  • Full Member
  • ***
  • Posts: 102
Re: Santa's House (provisional title) - code-a-game compo #7
« Reply #4 on: November 10, 2018, 07:01:49 PM »
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=XXxnwVW_UHU

Offline Xerra

  • Sr. Member
  • ****
  • Posts: 304
    • Retro Evolved
Re: Santa's House (provisional title) - code-a-game compo #7
« Reply #5 on: November 13, 2018, 12:04:43 AM »
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..... ;-)

Offline BasicBoy

  • Full Member
  • ***
  • Posts: 102
Re: Santa's House (provisional title) - code-a-game compo #7
« Reply #6 on: November 13, 2018, 10:01:11 AM »
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=QTKKs5tddMY
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
--

Offline BasicBoy

  • Full Member
  • ***
  • Posts: 102
Re: Santa's House (provisional title) - code-a-game compo #7
« Reply #7 on: November 14, 2018, 11:08:17 AM »
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


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


Offline BasicBoy

  • Full Member
  • ***
  • Posts: 102
Re: Santa's House (provisional title) - code-a-game compo #7
« Reply #8 on: November 24, 2018, 01:11:36 AM »
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

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.
--

Offline RemiD

  • Hero Member
  • *****
  • Posts: 754
Re: Santa's House (provisional title) - code-a-game compo #7
« Reply #9 on: November 24, 2018, 04:44:37 PM »
Cool :)
The technician within me likes UVMap / debug textures  ;D

Online Steve Elliott

  • Hero Member
  • *****
  • Posts: 1343
  • You secure that shit Hudson!!
Re: Santa's House (provisional title) - code-a-game compo #7
« Reply #10 on: November 24, 2018, 04:48:43 PM »
Impressive.
Windows 10, 64-bit, 8Gb RAM, CPU Intel i5, 3.2 GHz, Nvidia GeForce GTX 1050 (2Gb)

Offline RemiD

  • Hero Member
  • *****
  • Posts: 754
Re: Santa's House (provisional title) - code-a-game compo #7
« Reply #11 on: November 24, 2018, 05:09:48 PM »

Offline BasicBoy

  • Full Member
  • ***
  • Posts: 102
Re: Santa's House (provisional title) - code-a-game compo #7
« Reply #12 on: December 04, 2018, 06:07:15 PM »
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

Sorry about the shaky hand-held video recording!


BasicBoy.
--

Online Steve Elliott

  • Hero Member
  • *****
  • Posts: 1343
  • You secure that shit Hudson!!
Re: Santa's House (provisional title) - code-a-game compo #7
« Reply #13 on: December 04, 2018, 06:09:19 PM »
Quite some progress since the last video.   :)
Windows 10, 64-bit, 8Gb RAM, CPU Intel i5, 3.2 GHz, Nvidia GeForce GTX 1050 (2Gb)