Author Topic: GLOOM, a new raycaster library  (Read 1376 times)

Marcus

  • Administrator
  • Hero Member
  • *****
  • Posts: 549
    • View Profile
GLOOM, a new raycaster library
« on: May 21, 2017 »
I'm working on a new raycaster library. Currently it's not even a library, just a big test program. I'm not quite sure what all the features will be yet, but if you look at the old Amiga game GLOOM (https://www.youtube.com/watch?v=Zq0la57PIVA) that's about what I'm aiming for.

The latest version is attached to this post.



.\\\opz

X54321

  • Newbie
  • *
  • Posts: 38
  • I make games and cartoons. And stuff.
    • View Profile
    • Bitendo Software
Re: GLOOM, a new raycaster library
« Reply #1 on: May 22, 2017 »
Looks pretty neato!
I did not know that you could make NaaLaa libraries in C...
-The Tophat Demon

Marcus

  • Administrator
  • Hero Member
  • *****
  • Posts: 549
    • View Profile
Re: GLOOM, a new raycaster library
« Reply #2 on: May 22, 2017 »
Looks pretty neato!
I did not know that you could make NaaLaa libraries in C...

Transparent and moving/rotating walls coming soon, hopefully :)

It's possible to write "extensions" in C, but it's a bit awkward since communicating with the naalaa runtime is messy. You pass all information to/from a C function through a naalaa object. "PARAM_GET_FLOAT("x");" in C fetches a float value set in naalaa like:

  params?.x# = 3.14
  params.dummy = 42
  params.a_string = "hello"
  DLL_CALL myDLL, "functionName", params

And you can get pointers to images, the window and such in the C program.
.\\\opz

Marcus

  • Administrator
  • Hero Member
  • *****
  • Posts: 549
    • View Profile
Re: GLOOM, a new raycaster library
« Reply #3 on: May 25, 2017 »
Here's a new zip with gloom in a separate lib and dll and three example programs. There's also some html documentation that I haven't read through yet. Many more examples will come, and the library will have more functionality added as I discoved the needs. There will be some kind map editor, but it will be pretty simple. In one of the examples included here, I use a polygon created with the Poly Editor to build static and moving wall structures.

I know the forum is kind of dead and that it's my own fault. But if anyone tries the stuff out, feel free to provide some feedback :)

There's basicly no "error checking" in the entire naalaa or C part of the library yet. So if you're not careful the whole thing might just decide to crash :D  But it'll come.


Edit:  I can already see the need for "invisible" walls, if you want to add barrels, tables and stuff in the form of sprites.
« Last Edit: May 25, 2017 by Marcus »
.\\\opz

Rick3137

  • Sr. Member
  • ****
  • Posts: 347
  • May the Force be with You
    • View Profile
    • Rick's Programs
Re: GLOOM, a new raycaster library
« Reply #4 on: May 25, 2017 »
  I tried the examples on my HP Pavillion laptop. ( 64 bit )
  No problems yet. Works fine.

X54321

  • Newbie
  • *
  • Posts: 38
  • I make games and cartoons. And stuff.
    • View Profile
    • Bitendo Software
Re: GLOOM, a new raycaster library
« Reply #5 on: May 25, 2017 »
My 64 bit Dell laptop is getting good results as well. I even modified it to try and make the rotating walls crush me into the level boundaries, but I never clipped through them. That's pretty impressive, I suppose.
-The Tophat Demon

Marcus

  • Administrator
  • Hero Member
  • *****
  • Posts: 549
    • View Profile
Re: GLOOM, a new raycaster library
« Reply #6 on: May 26, 2017 »
Good to hear :)  I'll see if I can write a proper map editor tonight.
.\\\opz

Marcus

  • Administrator
  • Hero Member
  • *****
  • Posts: 549
    • View Profile
Re: GLOOM, a new raycaster library
« Reply #7 on: May 27, 2017 »
I finally have a simple editor up and running. It took the whole day to write, since I couldn't figure out how make resizing the map image work with IUP. You don't deal with images/textures, just walls and grid cels with values.

.\\\opz

Rick3137

  • Sr. Member
  • ****
  • Posts: 347
  • May the Force be with You
    • View Profile
    • Rick's Programs
Re: GLOOM, a new raycaster library
« Reply #8 on: May 27, 2017 »
   Looks awesome. Can't wait to try it out.






Mr Nutz

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: GLOOM, a new raycaster library
« Reply #9 on: May 28, 2017 »
Awesome ! Works fines with my old pc (win 7)

When Naalaa will work on Android and IOS, it will be the best and easiest programming language in the world  ;)

Very very good work !
« Last Edit: May 28, 2017 by Mr Nutz »

Marcus

  • Administrator
  • Hero Member
  • *****
  • Posts: 549
    • View Profile
Re: GLOOM, a new raycaster library
« Reply #10 on: May 29, 2017 »
Happy it works! I haven't tried it on a low spec PC, but I have a notebook that I'll test it on.

Much work to do still on the editor. But it's included in this zip with a new example. Yeah, I'm being pretty inspired by the graphics of the actual Amiga game GLOOM :)

« Last Edit: May 29, 2017 by Marcus »
.\\\opz

X54321

  • Newbie
  • *
  • Posts: 38
  • I make games and cartoons. And stuff.
    • View Profile
    • Bitendo Software
Re: GLOOM, a new raycaster library
« Reply #11 on: May 29, 2017 »
The editor works well. However, I noticed that when you make the map smaller, and you get that little warning message, clicking "abort" does not stop the map from resizing. : p
-The Tophat Demon

Marcus

  • Administrator
  • Hero Member
  • *****
  • Posts: 549
    • View Profile
Re: GLOOM, a new raycaster library
« Reply #12 on: June 02, 2017 »
Ah, yes, some work left to do on the editor. Right now you can't see what 'value' a wall has nor change it without first deleting the wall, very annoying.

It's been a busy week at work, but here's a new version with two more examples for using sprites as obstacles and "pickups" and simulating sliding doors. There's no direct support for "items" or doors, and I'm not planning to add it. But not much code is required for these things. You can make doors that function and move in many ways, but the ones in this example work like the ones in the old raycaster library, which is probably the simplest to implement (but I'll show more ways later on).



.\\\opz

Rick3137

  • Sr. Member
  • ****
  • Posts: 347
  • May the Force be with You
    • View Profile
    • Rick's Programs
Re: GLOOM, a new raycaster library
« Reply #13 on: June 02, 2017 »
 Looking good. No problem getting the door open.

 One thing I noticed about the map editor. If I save a 32x32 map and reload it, the numbers still say-- 16x16
« Last Edit: June 02, 2017 by Rick3137 »

cherbert

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: GLOOM, a new raycaster library
« Reply #14 on: June 04, 2017 »
Here's a new zip with gloom in a separate lib and dll and three example programs. There's also some html documentation that I haven't read through yet. Many more examples will come, and the library will have more functionality added as I discoved the needs. There will be some kind map editor, but it will be pretty simple. In one of the examples included here, I use a polygon created with the Poly Editor to build static and moving wall structures.

I know the forum is kind of dead and that it's my own fault. But if anyone tries the stuff out, feel free to provide some feedback :)

There's basicly no "error checking" in the entire naalaa or C part of the library yet. So if you're not careful the whole thing might just decide to crash :D  But it'll come.


Edit:  I can already see the need for "invisible" walls, if you want to add barrels, tables and stuff in the form of sprites.

Thank you. This is really exciting. I love you can have double height walls.

Would it be possible to have a skybox and make levels look like they are outside? Would be nice to build towns similar to the look of Daggerfall.

https://www.youtube.com/watch?v=BjB6OFiDasU