GameMaker Custom 3d rendering and 'slave' cameras

B

Benjamin Herne

Guest
This is really a "Is it possible, and if so, is it reasonable?" type question. So, I've got an idea, basically to build a custom (very basic) 3d system in GMS2. Simple enough for now. What I also intend to do is set it up such that the main game window hosts a local server. From there, multiple 'slave' windows can also be launched/created. These join the server and act as auxiliary cameras, allowing the player to have a wider FOV. Is this possible, I was thinking it would be a nice test of my skills, and a 'nice to have' for a multi-monitor system. Or alternatively, one could be used to display a minimap or something, so as to allow the maximum amount of screen real estate for the main game.
So that actual question:

1. Is it possible?
2. Should I reasonably expect this to work and not be a buggy piece of 💩💩💩💩?

Thanks for your time.
 

CloseRange

Member
building 3d is indeed possible with game maker. Though If you mean making your own engine for it (dealing with matricies in order to render the objects on screen) then you should just stick with the game maker built in 3d as you probobly won't make it any more efficient and there is no point in reinventing the wheel.
As for having multiple windows in game maker this is not possible (at least not that I'm aware). Other programs are fine with this and will not lag because you have multiple windows open, though idk how to do it any any programs as I never cared enough to try.
With other languages having multiple windows does not change anything or make things more laggy because all windows are run off the same code and so communicating between them is as easy as storing each window in a variable and referencing the one you want to draw to.

In game maker if you reallllly want to do this your best bet is to have multiple "games" and have each one get opened at once (i'm not sure if you can open another program in code or what would have to happen if you close one window)
but then you just have the games communicate with eachother over a small local network, this shouldn't cause much lag what-so-ever because it only has to communicate with its own computer but it would just be annoying to program.
 
B

Benjamin Herne

Guest
Ok cool. So not practical, but technically possible. Might do it, even if only for the experience. Thanks for the help.
 
I'm not entirely sure what your idea is about. But there is absolutely no reason why you couldn't have multiple 3d views, or 2d, or both, all in one window.
 
L

Lonewolff

Guest
you should just stick with the game maker built in 3d as you probobly won't make it any more efficient and there is no point in reinventing the wheel.
Really? I'm all for re-inventing the wheel. But that's just me.

Last time I checked my matrix algorithms were between 400% to 600% faster than Microsoft's own implementation.

This one is 600% faster and a drop in replacement for MatrixPerspectiveFovLH().

align 16
MatrixPerspectiveFovLH PROC matrix: DWORD,fvY: DWORD,asp: DWORD,nP: DWORD,fP: DWORD
mov eax,matrix ; Store the address of 'matrix' in eax
xor ecx,ecx ; Store 0.0 in ecx
mov [eax+4],ecx ; _12
mov [eax+8],ecx ; _13
mov [eax+12],ecx ; _14
mov [eax+16],ecx ; _21
mov [eax+24],ecx ; _23
mov [eax+28],ecx ; _24
mov [eax+32],ecx ; _31
mov [eax+36],ecx ; _32
mov [eax+48],ecx ; _41
mov [eax+52],ecx ; _42
mov [eax+60],ecx ; _44
mov ecx,3F800000h ; Store real 1.0 in ecx
mov [eax+44],ecx ; _34

fld fP ; farPlane / (farPlane - nearPlane)
fld fP
fsub nP
fdiv
fstp real4 ptr [eax+40] ; Store result in _33

fld nP ; -(nearPlane*farPlane) / (farPlane - nearPlane)
fld fP
fmul
fchs
fld fP
fld nP
fsub
fdiv
fstp real4 ptr [eax+56] ; Store result in _43

fld1 ; 1.0f / tan(fovY / 2.0f)
fld fvY
fld1
fld1
fadd
fdiv
fptan
fstp st
fst real4 ptr [eax] ; store this point temporarily in to _11
fdiv
fstp real4 ptr [eax+20] ; Store result in _22

fld1 ; 1.0f / (aspect * tan(fovY / 2.0f))
fld real4 ptr [eax]
fld asp
fmul
fdiv
fstp real4 ptr [eax] ; Store result in _11

ret
MatrixPerspectiveFovLH ENDP
Your welcome :D
 

CloseRange

Member
Really? I'm all for re-inventing the wheel. But that's just me.

Last time I checked my matrix algorithms were between 400% to 600% faster than Microsoft's own implementation.

This one is 600% faster and a drop in replacement for MatrixPerspectiveFovLH().



Your welcome :D
if you want to reinvent the wheel then why use game maker? In a sense it is the wheel so why not create your own entire game engine in c++ yourself.
Heck why use c++ they just built it on top of c and that's built on Assembly language (at least I think that's the next step) So why not just build all of your games with assembly so you can reinvent the wheel?
Actually all of that only works on your computer so why not build your own computer? And I don't mean buy the parts and put them together like build the computer. If you want to reinvent the wheel build the cpu, gpu and all the pieces by hand, 3D print parts that you designed yourself or find some way to mold the pieces, buy all the copper wiring and only then can you make sure it's as efficient as you want.

I know that was a bit sarcastic and I think everyone should reinvent the wheel to learn how to do it but not use it for their own projects
As for Microsoft directX (I assume that's the implementation you're talking about) I don't know much about its permanence but I know Age of Conan: Unchained was made with at and it seems to run perfectly fine.
Also I'm pretty sure Unity runs of Microsoft and lots of amazing games are made from unity.

I'm not sure how you did your performance tests and if you did them right but if you really need to get better then that then you're wasting your time making it better when you could be using that time to make your game better in other aspects or just adding more content to it.
 

Pfap

Member
if you want to reinvent the wheel then why use game maker? In a sense it is the wheel so why not create your own entire game engine in c++ yourself.
Heck why use c++ they just built it on top of c and that's built on Assembly language (at least I think that's the next step) So why not just build all of your games with assembly so you can reinvent the wheel?
Actually all of that only works on your computer so why not build your own computer? And I don't mean buy the parts and put them together like build the computer. If you want to reinvent the wheel build the cpu, gpu and all the pieces by hand, 3D print parts that you designed yourself or find some way to mold the pieces, buy all the copper wiring and only then can you make sure it's as efficient as you want.

I know that was a bit sarcastic and I think everyone should reinvent the wheel to learn how to do it but not use it for their own projects
As for Microsoft directX (I assume that's the implementation you're talking about) I don't know much about its permanence but I know Age of Conan: Unchained was made with at and it seems to run perfectly fine.
Also I'm pretty sure Unity runs of Microsoft and lots of amazing games are made from unity.

I'm not sure how you did your performance tests and if you did them right but if you really need to get better then that then you're wasting your time making it better when you could be using that time to make your game better in other aspects or just adding more content to it.
Why stop at rebuilding the computer? At this point you should probably become a theoretical physicist. There job is to basically question everything, what if the way humans have been doing math is "wrong" I put it in quotation marks because what does wrong even mean? But, for reals we should find the answer to the universe and everything and to do that we must question everything, no law will stand up to the scrutiny of the imagination.
 
L

Lonewolff

Guest
If you want to reinvent the wheel then why use game maker?
Why use GameMaker when someone else has already made a game?


In a sense it is the wheel so why not create your own entire game engine in c++ yourself.
Already have.


Heck why use c++ they just built it on top of c and that's built on Assembly language (at least I think that's the next step) So why not just build all of your games with assembly so you can reinvent the wheel?
Done that too. (Note the code snippet in the last post is in assembly).


Actually all of that only works on your computer so why not build your own computer? And I don't mean buy the parts and put them together like build the computer.
Done that too. Although it was only a little 8 bit 6502 system built at component level. But did it because I can.


If you want to reinvent the wheel build the cpu, gpu and all the pieces by hand, 3D print parts that you designed yourself or find some way to mold the pieces, buy all the copper wiring and only then can you make sure it's as efficient as you want.
Funnily enough, this is on my to do list. About as deep as I have gone is etching my own circuit boards. I did make a diode once from materials you can pull from common garden soil.


I don't know much about its permanence but I know Age of Conan: Unchained was made with at and it seems to run perfectly fine.
Looks $hit. Maybe I should offer them my support. With 1/6 overhead on matrix calculations, they might be able to make that look pretty good with the extra headroom they'd have.


I'm not sure how you did your performance tests and if you did them right but if you really need to get better then that then you're wasting your time making it better when you could be using that time to make your game better in other aspects or just adding more content to it.
Righto! :)


Maybe the question that should be asked is 'why'?

Answer - Because I can ;)


Ask yourself the same question, rather than telling the author, "why you shouldn't"
 
L

Lonewolff

Guest
All that impressive code and you don't know when to use "your" and "you're"... :p
You got me there. Normally I am a stickler for my own grammar. But the internet does funny things to you. I cringe when I see 'your' all the way through Mike Dailly's official YYG technical blogs too.

That one slipped through. Feel free to critique my grammar in ever other post I have done here and you'll see I am consistently grammatically correct. ;)

Always good to have the grammar police on patrol. Make the internet a safer place for all.
 
Last edited by a moderator:

rIKmAN

Member
Feel free to critique my grammar in ever other post I have done here and you'll see I am consistently grammatically correct. ;)
I would, but you deleted / changed the text of most of them...*cough* ;)

"ever" or "every"?
Can I critique your spelling too? haha :D

Just pulling your leg! :)
 
L

Lonewolff

Guest
All I am saying to @CloseRange is why limit yourself? That's all.

Bill Gates didn't say 'Hey, Mac's window system looks pretty cool' and leave it at that.

As humans, we are still pretty early in technological innovation. Why stop there?
 

Evanski

Raccoon Lord
Forum Staff
Moderator
Even if you know the manual by heart, made every genera of game, you can learn and be better, there is no limit to the amount of skill in one uh..skill you can get, I can hear the grammar police knocking on my door right now.
 

CloseRange

Member
Why use GameMaker when someone else has already made a game?




Already have.




Done that too. (Note the code snippet in the last post is in assembly).




Done that too. Although it was only a little 8 bit 6502 system built at component level. But did it because I can.




Funnily enough, this is on my to do list. About as deep as I have gone is etching my own circuit boards. I did make a diode once from materials you can pull from common garden soil.




Looks $hit. Maybe I should offer them my support. With 1/6 overhead on matrix calculations, they might be able to make that look pretty good with the extra headroom they'd have.




Righto! :)


Maybe the question that should be asked is 'why'?

Answer - Because I can ;)


Ask yourself the same question, rather than telling the author, "why you shouldn't"
Yeah and I've done all that too but I still always come back to game maker.
Like I said I think everyone should do it at some point to learn how it works but 99.9% of people shouldn't full on remake every little thing in their game.

But hey if Age of Conan looks like $hit then show us your game that looks 600% better. And if you have a game like that, then you're wasting your time arguing on here.
 
D

Death

Guest
I haven't seen ASM in decades. That is what I learned programming with, then "graduated" to higher level C, etc. Nice to see that someone still knows how to get speed and compactness. Reminds me of the 'good ole days'. Nothing will beat hand code ASM ins speed and size ever! :)
 
S

Sam (Deleted User)

Guest
I'm not saying it isn't possible, but I find it very unlikely The Sorcerer and/or CloseRange would really even consider using GameMaker for half a second if they were really as talented enough to have done everything they have claimed. Just my two cents. @The Sorcerer remember Lonewolff? What a guy...
 

GMWolf

aka fel666
Ignoring 1/2 the posts in here (tl;Dr)
Sure you can do this using vertex buffers and networked instances... But why?
At this point you will be fighting against GM and the knowledge required to pull it off would allow you to write it from scratch in c++ and OpenGL far more easily...
 
Last edited:
Top