BreadCaster
Loyalty Card Holder
Posts: 321
Registered: 2-3-2016
Member Is Offline
|
|
An oldie but a goodie: recording the screen!
Hello all, hello hello hello.
So I've seen this done a million times in DIV games before, and I'm sure you all have as well Where ingame, there's a TV screen or a display of some kind which shows exactly what the player's looking at, using
the screen_get function.
I've got it working just fine in CyberCrisis at present, except that every now and again, it causes a random crash - the game will quit and I'll get
the "blabla has encountered a problem and needs to close" Windows box pop up.
Before the loop/just after the Begin, I have this code:
displayscreen_graph=map_new(73, 55, 16);
playersscreen_graph=screen_get();
map_xput(0, displayscreen_graph, playersscreen_graph, 36, 27, 0, 15, 0);
graph=displayscreen_graph;
and then in the main process loop, this code:
playersscreen_graph=screen_get(); // Crash
map_xput(0, displayscreen_graph, playersscreen_graph, 36, 27, 0, 15, 0);
graph=displayscreen_graph;
Frame;
For some reason, the line I've commented with "Crash" makes the game, well, crash. Commenting it out/removing it and running the game works just fine
(except the screen doesn't update beyond the first frame of course).
As it's been done so frequently in DIV projects, I wanted to ask if anyone here had any experience with it, any why this might be crashing the game?
The game's very near completion and it's a blast to play, I'm sure you'll enjoy it when it's done
~ BreadyTits
~*~ Princess of Pies and Pastries ~*~
|
|
dom cook
Div Pro
Posts: 387
Registered: 4-3-2016
Member Is Offline
|
|
It looks to me like DIV doesn't recognise this screen_get() function.
It's got a screen_copy() function which might help..
|
|
BreadCaster
Loyalty Card Holder
Posts: 321
Registered: 2-3-2016
Member Is Offline
|
|
hmm, it must be one of the thing's that's different in Bennu to Div then, as I'm coding in Bennu. There isn't a screen_copy function in Bennu, it
seems, but it does have screen_get(), which just returns a screencap at the screens present size. Hm. Maybe I'll need to go to the Bennu forums for
assistance then :p
~*~ Princess of Pies and Pastries ~*~
|
|
MikeDX
|
|
In div this is as simple as calling screen_copy. not sure where screen_get comes from
Code: |
screen_copy(<region>, <file>, <graphic>, <x>, <y>, <width>, <height>)
|
Always worked well in DIV. I doubt anybody can give you any pointers.
Sounds more like a bug in whatever it is you are using, which is a shame.
[Edited on 9-6-2016 by MikeDX]
|
|
BreadCaster
Loyalty Card Holder
Posts: 321
Registered: 2-3-2016
Member Is Offline
|
|
Right, I've gone over to the Bennu forum to ask them about it Other people do
seem to be using it, just not in the same capacity as I am, so someone'll likely know something.
I doubt porting CyberCrisis to DivDX where the screen_copy function works would be plausible sadly, as it's all 16 bit and relies heavily on additive
blending. :/
~*~ Princess of Pies and Pastries ~*~
|
|
MikeDX
|
|
DIV wont be 8bit forever. At some point I will actually get around to upgrading the whole system. We're getting closer now with all the bugs being
nailed and the platform becoming stable.
The only bottleneck now for me is time - need to do a lot of work to get everything to work as it should, which means the editor has to go 32bit. The
rest is all good to go. Only graphically is DIV retarded now.
|
|
BreadCaster
Loyalty Card Holder
Posts: 321
Registered: 2-3-2016
Member Is Offline
|
|
Phew, got it fixed. Turns out that screen_get loads into the system memory, so you need to UNload it after every use, haha. Done and done
~*~ Princess of Pies and Pastries ~*~
|
|
MikeDX
|
|
Ah that makes sense
So, we might be supporting the bennu 32bit fpg format soon, would make returning to the DIV stable a bit easier
|
|
BreadCaster
Loyalty Card Holder
Posts: 321
Registered: 2-3-2016
Member Is Offline
|
|
Quote: Originally posted by MikeDX |
So, we might be supporting the bennu 32bit fpg format soon, would make returning to the DIV stable a bit easier |
Brilliance! All I'd need then is a Mode 8 map editor with a few features like copy paste & selection boxes for multiple vertices, and possibly for
it to not crash every other time I right click... or to randomly make undeletable vertices and sectors which crash the program and corrupt the .wld
file... haha. But a 32bit FPG format would be great
~*~ Princess of Pies and Pastries ~*~
|
|
MikeDX
|
|
Are you getting wld editor crashes? I Have had mixed results.. trying to iron all the bugs out but it just takes a lot of time and testing.
Reproducible bugs would be good.
Having the ability to copy / delete sectors is something I'd look at for future stuff though, it can be quite tedious to do anything complex.
Also I'd like to be able to generate a 3D world purely in code with an add sector/line/point set of commands (we already have the height/texture stuff
done).. Then people could make their own editors.
|
|
BreadCaster
Loyalty Card Holder
Posts: 321
Registered: 2-3-2016
Member Is Offline
|
|
Right clicking often causes the editor to crash, on windows 8 at least. Occasionally when making lots of smaller sectors for things like little pools
of blood or rock formations, I end up with one bad sector that ends up being unselectable, so I can't delete it - and when you attempt to view it in
program, it crashes DIV entirely.
Selection boxes and copy paste would be so powerful - you've made a room too small? fine, just click and drag to make a selection box, select all the
vertices of the top of the sector, then pull them all upward at the same time, allowing for easy and effortless manual expansion of the sector, or
sectors. Hm, it's still looking a little barren... I know! Let's copy that "crate" sector from another part of the map... hit paste three times, then
position the three new crates where I want them. There! (An ability to rotate a sector with all it's vertices moving at the same time would be good
for this, too. You could turn them on their axis.)
All just ideas to make the editor more friendly and encourage further use, of course
~*~ Princess of Pies and Pastries ~*~
|
|