Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Should I continue DIS?  (Read 1955 times)

Jookia

  • Bay Watcher
    • View Profile
Should I continue DIS?
« on: December 15, 2009, 02:13:24 pm »

Ugh, I don't know if I'm fit to program DIS. I'm such a piece of crap that I can't even locate a bottleneck in some crap renderer. I want to do a tile engine, but I don't know how. I can't do everything on my own and I'm kidding myself if I think I'm going to be able to make a game. There are libraries out there to display images on the screen, yet I don't want to use them. I have very bad health problems and I hate my crappy life.
Logged

Footkerchief

  • Bay Watcher
  • The Juffo-Wup is strong in this place.
    • View Profile
Re: Should I continue DIS?
« Reply #1 on: December 15, 2009, 03:08:46 pm »

For anyone who, like me, had no idea what the OP was talking about, he means his game project, Disasters in Space.
Logged

zchris13

  • Bay Watcher
  • YOU SPIN ME RIGHT ROUND~
    • View Profile
Re: Should I continue DIS?
« Reply #2 on: December 15, 2009, 07:15:50 pm »

You should get professional help on that coding project.  Nobody became an expert overnight.
Logged
this sigtext was furiously out-of-date and has been jettisoned

Jookia

  • Bay Watcher
    • View Profile
Re: Should I continue DIS?
« Reply #3 on: December 15, 2009, 08:14:52 pm »

You should get professional help on that coding project.  Nobody became an expert overnight.

I don't accept other people's code.
Logged

zchris13

  • Bay Watcher
  • YOU SPIN ME RIGHT ROUND~
    • View Profile
Re: Should I continue DIS?
« Reply #4 on: December 15, 2009, 08:18:56 pm »

That's not what I said, bro.  I said, get help.  Not someone to do it for you.
Logged
this sigtext was furiously out-of-date and has been jettisoned

qwertyuiopas

  • Bay Watcher
  • Photoshop is for elves who cannot use MSPaint.
    • View Profile
    • uristqwerty.ca, my current (barren) site.
Re: Should I continue DIS?
« Reply #5 on: December 15, 2009, 09:20:37 pm »

Time it at the highest level.

Don't bother with the timing of the lowest level functions.


That is the first step in identifying ACCURATELY the bottleneck.

Why?

Because the resoulution of the timing function you use is too low!


Start by checking each block of code's time. Likely one or two in the main loop will be taking most of it. From there, you know what must actually be redone.


Do not redraw the whole screen if it is drawn to a persistant drawing area. If the characters from last iteration are still there, don't waste time redrawing them if the colours are unchanged.

Break up the screen into chunks and/or layers. If you have the "terrain" that almost never changed, keep it in one piece, and draw a second layer made of volitile chunks over it. It means LESS data transfer! (Since the terrain's texture is already in the graphics card memory, but any updated bits of the overlayed stuff must be sent each frame that they have changed.)

Or just find your own way.

But remember, when tracking down a problem, don't test the individual components until you have PROOF that they are the problem. Time the main loop, not each function call.
Logged
Eh?
Eh!

Jookia

  • Bay Watcher
    • View Profile
Re: Should I continue DIS?
« Reply #6 on: December 16, 2009, 01:48:09 pm »

How do I check code time?
Logged

Berserker

  • Bay Watcher
    • View Profile
Re: Should I continue DIS?
« Reply #7 on: December 16, 2009, 02:30:16 pm »

This might work:

Code: [Select]
float start_time = clock() / (float)CLOCKS_PER_SEC;

<block of code>

float end_time = clock() / (float)CLOCKS_PER_SEC - start_time;

end_time is now the time spent in seconds.
Logged

Jookia

  • Bay Watcher
    • View Profile
Re: Should I continue DIS?
« Reply #8 on: December 16, 2009, 05:52:18 pm »

Turns out the bottleneck is that the entire screen is one texture.
Logged

qwertyuiopas

  • Bay Watcher
  • Photoshop is for elves who cannot use MSPaint.
    • View Profile
    • uristqwerty.ca, my current (barren) site.
Re: Should I continue DIS?
« Reply #9 on: December 16, 2009, 06:01:34 pm »

As I said, it's the data dump, if it is a texture problem.

Optimize the unchanging bits out, so that you don't have to update them more than once every few seconds most fo the time, and cut the varying bits into blocks that are overlayed.
Logged
Eh?
Eh!

Jookia

  • Bay Watcher
    • View Profile
Re: Should I continue DIS?
« Reply #10 on: December 16, 2009, 06:37:19 pm »

What you said:

As I said, it's the data dump, if it is a texture problem.

Optimize the unchanging bits out, so that you don't have to update them more than once every few seconds most fo the time, and cut the varying bits into blocks that are overlayed.

What I understood:

Logged

eerr

  • Bay Watcher
    • View Profile
Re: Should I continue DIS?
« Reply #11 on: December 17, 2009, 01:37:47 am »

I think he means partial print like for dwarf fortress.

only repaint the parts that change.
Logged

zchris13

  • Bay Watcher
  • YOU SPIN ME RIGHT ROUND~
    • View Profile
Re: Should I continue DIS?
« Reply #12 on: December 17, 2009, 03:33:54 pm »

Data dump is you telling the screen to change

He doesn't mean bits by bits, he means each section/tile.

I don't get the last one either.
Logged
this sigtext was furiously out-of-date and has been jettisoned

eerr

  • Bay Watcher
    • View Profile
Re: Should I continue DIS?
« Reply #13 on: December 28, 2009, 05:35:56 am »

Data dump is you telling the screen to change

He doesn't mean bits by bits, he means each section/tile.

I don't get the last one either.
I think the second part is recording the parts that do change frequently, so they can be copied over rapidly.
Logged

Muz

  • Bay Watcher
    • View Profile
Re: Should I continue DIS?
« Reply #14 on: December 31, 2009, 03:20:31 am »

From my experience, if you have to ask whether you should continue something.. chances are it's not worth continuing. Maybe work on something smaller first till you get the hang of things. Or find something awesome enough that you won't even think of quitting. You really don't want to force yourself to slug through a game.
Logged
Disclaimer: Any sarcasm in my posts will not be mentioned as that would ruin the purpose. It is assumed that the reader is intelligent enough to tell the difference between what is sarcasm and what is not.