Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411284 Posts in 69325 Topics- by 58380 Members - Latest Member: bob1029

March 29, 2024, 06:51:14 PM

Need hosting? Check out Digital Ocean
(more details in this thread)
  Show Posts
Pages: 1 [2]
21  Player / General / Re: Game development - Online RPG on: December 13, 2017, 04:37:27 AM
I guess you need to ask someone with an experience in developing these kinds of games. Most people here focus on retro stuff.
22  Developer / Technical / Re: The grumpy old programmer room on: December 13, 2017, 04:01:27 AM
DosBox runs games such as Wolfenstein 3D and Doom pretty well. In DosBox configuration file, the CPU type is set to auto (which it is said is the fastest option.) Cycles, which is the number of instructions DosBox attempts to emulate each millisecond, is also set to auto. I tried using CTRL + F12 to increase this value while running DosBox but there isn't much difference when it comes to my QBasic program. Note that I am calling PSET in a double FOR loop to draw a square on the screen. Maybe this is a slow approach? I tried using FreeBasic and it runs the same code just fine. The only thing that has worked in QBasic is the approach that uses page-flipping.

This code runs fine:

Code:
DATA 00,00,00,00,00,00,00,00,00,00,12,12,00,00,00
DATA 00,00,00,00,00,00,00,00,00,00,15,15,00,00,00
DATA 00,00,00,00,00,00,00,00,00,15,15,15,15,00,00
DATA 00,00,00,00,00,00,00,00,00,15,15,00,15,00,00
DATA 00,00,00,00,00,00,00,00,15,15,15,15,15,14,00
DATA 00,00,00,00,15,15,15,15,15,15,15,15,15,14,14
DATA 15,00,15,15,15,15,00,15,15,15,15,15,00,00,00
DATA 00,15,15,15,15,00,15,15,15,15,15,00,00,00,00
DATA 15,00,15,15,00,15,15,15,15,15,15,00,00,00,00
DATA 00,15,15,15,15,00,00,15,15,15,15,00,00,00,00
DATA 15,00,15,15,15,15,15,15,15,15,00,00,00,00,00
DATA 00,00,00,00,00,00,15,15,15,00,00,00,00,00,00
DATA 00,00,00,00,00,00,00,14,00,00,00,00,00,00,00
DATA 00,00,00,00,00,00,00,14,00,00,00,00,00,00,00
DATA 00,00,00,00,00,00,14,14,14,00,00,00,00,00,00

SCREEN 7, 0, 1, 0
CLS

FOR y = 0 TO 14
  FOR x = 0 TO 14
    READ DotColor
    PSET (x, y), DotColor
  NEXT
NEXT

DIM imgDuck(15, 15)
GET (0, 0)-(15, 15), imgDuck
CLS

done = 0
speed = 2
x = 0
y = 0

KeyRight$ = CHR$(0) + CHR$(77)
KeyLeft$ = CHR$(0) + CHR$(75)
keyDown$ = CHR$(0) + CHR$(80)
keyUp$ = CHR$(0) + CHR$(72)

WHILE done = 0
  CLS
  PUT (x, y), imgDuck
  PCOPY 1, 0

  k$ = UCASE$(INKEY$)

  SELECT CASE k$
    CASE KeyRight$
      x = x + speed
    CASE KeyLeft$
      x = x - speed
    CASE keyUp$
      y = y - speed
    CASE keyDown$
      y = y + speed
    CASE "Q"
      done = 1
  END SELECT

WEND

But the code that only makes PSET calls does not?

The PSET-only approach looks like this:

Code:
duck:
DATA 00,00,00,00,00,00,00,00,00,00,12,12,00,00,00
DATA 00,00,00,00,00,00,00,00,00,00,15,15,00,00,00
DATA 00,00,00,00,00,00,00,00,00,15,15,15,15,00,00
DATA 00,00,00,00,00,00,00,00,00,15,15,00,15,00,00
DATA 00,00,00,00,00,00,00,00,15,15,15,15,15,14,00
DATA 00,00,00,00,15,15,15,15,15,15,15,15,15,14,14
DATA 15,00,15,15,15,15,00,15,15,15,15,15,00,00,00
DATA 00,15,15,15,15,00,15,15,15,15,15,00,00,00,00
DATA 15,00,15,15,00,15,15,15,15,15,15,00,00,00,00
DATA 00,15,15,15,15,00,00,15,15,15,15,00,00,00,00
DATA 15,00,15,15,15,15,15,15,15,15,00,00,00,00,00
DATA 00,00,00,00,00,00,15,15,15,00,00,00,00,00,00
DATA 00,00,00,00,00,00,00,14,00,00,00,00,00,00,00
DATA 00,00,00,00,00,00,00,14,00,00,00,00,00,00,00
DATA 00,00,00,00,00,00,14,14,14,00,00,00,00,00,00

SCREEN 7

done = 0
speed = 2
x = 0
y = 0

KeyRight$ = CHR$(0) + CHR$(77)
KeyLeft$ = CHR$(0) + CHR$(75)
keyDown$ = CHR$(0) + CHR$(80)
keyUp$ = CHR$(0) + CHR$(72)

WHILE done = 0
  CLS
  FOR i = 0 TO 14
    FOR j = 0 TO 14
      READ DotColor
      PSET (x + j, y + i), DotColor
    NEXT
  NEXT
  RESTORE duck

  k$ = UCASE$(INKEY$)

  SELECT CASE k$
    CASE KeyRight$
      x = x + speed
    CASE KeyLeft$
      x = x - speed
    CASE keyUp$
      y = y - speed
    CASE keyDown$
      y = y + speed
    CASE "Q"
      done = 1
  END SELECT

WEND

Correction: FreeBASIC runs it the same just a little bit better performance-wise. I guess the problem is PSET?
23  Developer / Technical / Re: The grumpy old programmer room on: December 10, 2017, 11:40:12 AM
I guess I am grumpy. I have a question. Does anyone here know -- I hope someone does -- whether it is possible to create a DOS game, say a single level of Bubble Bobble, using QBasic? I know it is. But my question is, can I make it run fast enough on a PC 486? I'm using DosBox and whatever kind of graphics I try to draw using QBasic runs so slow I can see it "unfolding" on the screen. The image does not appear instantly. Rather, it literally "unfolds" in front of me. I can see it being drawn. And it does not matter whether I am using an interpreter or a compiler. It is the same either way. Do I have to use something else? Borland C++ with assembly? Google didn't help me much.
24  Player / General / Re: ♥ on: December 03, 2017, 10:56:20 PM
25  Player / General / Re: How to become a game developer if you work for McDonald's? [Subtitles] on: December 03, 2017, 10:53:48 PM
How to work at McDonald's if you live in a place where there is no McDonald's?
26  Player / General / Re: [Survey] What is the difference between a 'wannabe' and a professional GameDev? on: December 03, 2017, 10:51:26 PM
Wannabe = someone who enjoys the idea of being something but does not like the process of becoming that something

That should answer your question. "Wannabe game developer" is simply someone who enjoys the thought of being a game developer but does not enjoy the actual process of being a game developer.
Pages: 1 [2]
Theme orange-lt created by panic