Chaosforge Forum

  • March 28, 2024, 05:40
  • Welcome, Guest
Please login or register.



Login with username, password and session length
Pages: [1]

Author Topic: Scrolling demo  (Read 4026 times)

tehtmi

  • Programmer
  • Local Inquisitor
  • Lieutenant Colonel
  • *
  • *
  • Offline Offline
  • Posts: 458
    • View Profile
Scrolling demo
« on: May 09, 2011, 18:59 »

tehtmi:play_sound("whistle.innocently")

So, here is a demo of scrolling maps in sandbox.  There's a few minor issues, but overall it works quite well I think.  As always, feel free to use/abuse this code.

Edit: fixed tearing issue.

Edit: fixed item teleporting bug
« Last Edit: May 10, 2011, 18:10 by tehtmi »
Logged

GrimmC

  • Guest
Re: Scrolling demo
« Reply #1 on: May 09, 2011, 20:32 »

Well that was a much bigger level than I ever expected to play in DoomRL.

With an elaborately designed layout that could be some pretty serious gaming.

It ran pretty choppy on my machine though, is that to be expected?
Logged

tehtmi

  • Programmer
  • Local Inquisitor
  • Lieutenant Colonel
  • *
  • *
  • Offline Offline
  • Posts: 458
    • View Profile
Re: Scrolling demo
« Reply #2 on: May 09, 2011, 22:55 »

I did notice some minor slowdown on my machine.  This is probably unavoidable.  Scrolling is not supported by DoomRL, and I'm doing a ton of bookkeeping in lua every action to make up for it.  Probably the code could be made more efficient in some places, but I tried to pay attention to speed when I was writing it.

Also, the current design, processing time scales in the total number of items and monsters on the level.  This dependency could be more or less removed with a little more work (keeping track of beings/items on the current screen).  (There might be some unavoidable engine scaling too though.)
Logged

Simon-v

  • Composer
  • Elder Chaos Guard
  • Captain
  • *
  • *
  • Offline Offline
  • Posts: 272
  • Only Human
    • View Profile
    • The Life and Works of One Simon Volpert
Re: Scrolling demo
« Reply #3 on: May 10, 2011, 09:04 »

Well, that's pretty impressive alright. I noticed a couple oddities, though. For one, items near the edge of your vision would vanish as if picked up by an invisible monster. For two, enemies near the edge of your vision would sometimes attack twice in a single turn. Lastly, after playing for a while, the thing crashed on me. I would try to get a traceback, but i running it from WINE would reduce the framerate even further, and it's already rather low, nearing the limit of playability.
Logged

Malek Deneith

  • Grand Inquisitor Emeritus
  • Grand Inquisitor
  • Lieutenant General
  • *
  • *
  • Offline Offline
  • Posts: 1256
    • View Profile
Re: Scrolling demo
« Reply #4 on: May 10, 2011, 15:05 »

Re: Crashbug:

Code: [Select]
----------------------------------------------------------------------

----------------------------------------------------------------------
Timestamp   : 10/05/2011 22:32:35
Error level : FATAL EXCEPTION
Message     : Fatal exception encountered

An unhandled exception occurred at $004215C3 :
EAccessViolation : Access violation
  $004215C3  TDOOMUI__DRAWCOORD,  line 878 of src/dfoutput.pas
  $00420577  TDOOMUI__DRAWLEVEL,  line 614 of src/dfoutput.pas
  $0041F2FA  TDOOMUI__DRAW,  line 384 of src/dfoutput.pas
  $0041F3E8  TDOOMUI__WAITFORANIMATION,  line 427 of src/dfoutput.pas
  $00496F6B  TBEING__ACTION,  line 606 of src/dfbeing.pas
  $004970CC  TBEING__CALL,  line 632 of src/dfbeing.pas
  $0041D89E  TDOOM__RUN,  line 421 of src/doombase.pas
  $0040215A  main,  line 91 of src/doomrl.pas

----------------------------------------------------------------------

I can also confirm some of simon-v's oddities - I saw items (and doors) get moved or disappear. And I'm not entirely convinced it was only with border ones.

As for speed - I think part of it might be the fact that tehtmi went tad overboard on the size here ;P

Overall nice work, though if the file is any indication the process required to go through to make a map with this is probably a bit too much compared to gain. But what do I know, somebody will probably find a use for it anyway :P
Logged
Inquisition - saving your soul, one bolter shell at a time.
Spoiler: "Hackmaster Kills" (click to show/hide)

tehtmi

  • Programmer
  • Local Inquisitor
  • Lieutenant Colonel
  • *
  • *
  • Offline Offline
  • Posts: 458
    • View Profile
Re: Scrolling demo
« Reply #5 on: May 10, 2011, 18:16 »

I just fixed an item teleporting bug and fixed my screen tearing fix.

I'm not sure what's causing the crash, although I have gotten it once now.  I haven't noticed double enemy attacks or messed up doors yet.

And yes, it would be a huge pain to write a good level using this.  Partly because (as we can see) its buggy, but also because its incompatible with a lot of the existing api.  Most of the things can be worked around but writing a new api would be time consuming.
Logged
Pages: [1]