Santa's House (provisional title) - code-a-game compo #7

Started by BasicBoy, November 08, 2018, 02:17:52

Previous topic - Next topic

BasicBoy

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





 






Xerra

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 :-)
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/

BasicBoy

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

Xerra

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

BasicBoy

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

Xerra

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..... ;-)
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/

BasicBoy

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

BasicBoy

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


BasicBoy

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

RemiD

Cool :)
The technician within me likes UVMap / debug textures  ;D

Steve Elliott

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


BasicBoy

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

Steve Elliott

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