Pages:
1
2 |
dom cook
Div Pro
Posts: 387
Registered: 4-3-2016
Member Is Offline
|
|
A bit of a stretch
Have you ever wanted to be able to draw a textured quad in DIV?
Well now you can.
Only a few mind you. And keep them small. Those map_get_pixel functions are hard work.
Move the area to be mapped wtih the cursor keys (_left, _right, _up, _down).
Deform the quad by dragging the vertices (mouse.left)
Attachment: RGB.FPG (50kB) This file has been downloaded 1053 times
Attachment: SQTEX.PRG (6kB) This file has been downloaded 902 times
[Edited on 11-3-2019 by dom cook]
|
|
Vortigano
DIV Regular
Posts: 237
Registered: 12-1-2017
Location: Ciudad de Buenos Aires, Argentina
Member Is Offline
|
|
I like it. You could use a collision priority and a "virtual" depth list where each element is listed, so the circles don't stick together when you
press the mouse button. Later I'll go home and send you something for that.
|
|
Vortigano
DIV Regular
Posts: 237
Registered: 12-1-2017
Location: Ciudad de Buenos Aires, Argentina
Member Is Offline
|
|
Well arrive to home, i'll try to add something on your prg so the circles don't stick together when you press the mouse button.
|
|
dom cook
Div Pro
Posts: 387
Registered: 4-3-2016
Member Is Offline
|
|
Thanks for the help although the vertex handles were only implented so I could easily check that the mapping was ocurring correctly. The plan is to
use this texturing to make a rotating dice and I've progressed a bit from what I first posted here.
Right now it's looking like this
As soon as I've got the faces glued together I'll post it in the WIPS
|
|
Vortigano
DIV Regular
Posts: 237
Registered: 12-1-2017
Location: Ciudad de Buenos Aires, Argentina
Member Is Offline
|
|
I always thought that float variables should be necessary to achieve deformation of the texture.
|
|
Vortigano
DIV Regular
Posts: 237
Registered: 12-1-2017
Location: Ciudad de Buenos Aires, Argentina
Member Is Offline
|
|
Congratulations for dealing with it using integers.
|
|
dom cook
Div Pro
Posts: 387
Registered: 4-3-2016
Member Is Offline
|
|
Same here, also 3D in general but although the result isn't as good as could be achieved with less effort in other languages I'm pretty happy with it.
It's a nod at the world of 3D rather than an attempt to join it.
|
|
Vortigano
DIV Regular
Posts: 237
Registered: 12-1-2017
Location: Ciudad de Buenos Aires, Argentina
Member Is Offline
|
|
I hope my humble contribution motivates you to continue your journey.
Attachment: SQTEX_VORTI.PRG (9kB) This file has been downloaded 910 times
|
|
Vortigano
DIV Regular
Posts: 237
Registered: 12-1-2017
Location: Ciudad de Buenos Aires, Argentina
Member Is Offline
|
|
"Catched.got_enabled" should be outside the "repeat" haha, well i think I put some errors however it works. bye-bye!
|
|
dom cook
Div Pro
Posts: 387
Registered: 4-3-2016
Member Is Offline
|
|
Hey, having someone show an interest is pretty encouraging in itself. Thanks for joining in.
[Edited on 12-3-2019 by dom cook]
|
|
dom cook
Div Pro
Posts: 387
Registered: 4-3-2016
Member Is Offline
|
|
I'm not sure if this belongs here anymore or should be a new thread in the WIPs but I'll post here for now.
My reason for wanting a texture was so I could make a textured cube, specifically a dice. I've played around with board game conversions before and
I think a simple random number generator just doesn't work on the emotions and sense of suspense in the same way as a dice totering dice would. My
goal is to capture that sense and for that I need something that actually captures the feel of a dice. First off, it's got to look like one.
It might be of potential interest to observe the process so I'll be posting as I go along. If anyone has any questions, comments or criticisms, don't
hesitate to let me know.
Anyway, so far I've got a cube of sorts, but it's not satisfactory because, on closer inspection, dices (or dies or whatever) are not cubes, they've
got rounded edges. To represent those, I've first pulled the faces apart slightly and then created some thicker edges to fill the gap using rows of
ellipses. These are drawn, in green, on the wireframe cube next to the dice.
The next step will be to transfer them onto the dice and calculate their correct colour, which should be a shade of grey halfway between the shades on
the two faces they belong to.
|
|
dom cook
Div Pro
Posts: 387
Registered: 4-3-2016
Member Is Offline
|
|
Ok, It's not perfect but it's more like what I wanted.
Painting the edges the average colour of the two sides they bound doesn't work because sometimes the edge need to be shinier than either of its
faces. So I ended up having to approximate their normals. Basically the more directly upwards a face or edge points the brighter it is.
It's always possible to work on improving the look later but now I want to move on to effecting a convincing roll. I'm not even going to think about
using anything like realistic 3d physics for this, instead I'll implement some of what I'm calling stylized physics.
Anyway here's the code so far in case anyone wants to play with it.
Attachment: DICE10.PRG (13kB) This file has been downloaded 966 times
Attachment: RGB.FPG (75kB) This file has been downloaded 981 times
[Edited on 13-3-2019 by dom cook]
|
|
BreadCaster
Loyalty Card Holder
Posts: 321
Registered: 2-3-2016
Member Is Offline
|
|
holy moly that looks great Dom! For a quick fix you could make it a bit lower resolution/smaller final graphic to hide the slight jankiness of the
edges, so people will think its a nearest neighbor style resizing glitch - but aside from that really solid looking work :D
~*~ Princess of Pies and Pastries ~*~
|
|
dom cook
Div Pro
Posts: 387
Registered: 4-3-2016
Member Is Offline
|
|
Yes I think I'll have to revisit that aspect of this little demo later when I tidy up the code. I think that currently the dice object is a bit large
for the screen anyway given that it's meant to be for a boardgame style scenario. I've noticed the lighting isn't working properly too. Thanks by
the way.
[Edited on 15-3-2019 by dom cook]
|
|
dom cook
Div Pro
Posts: 387
Registered: 4-3-2016
Member Is Offline
|
|
Here's today's effort. I've been working on the style of the roll.
To be entirely honest, I have done something like this before so I know more or less where I'm going with it.
The roll has several stages reset, shuffle, align, roll, slow, stop on one edge and topple(either forwards or backwards for suspense). So for I'm up
to stopping on one edge. You can run through what there is so far by following the on-screen instructions.
At the moment the dice only spins and does not travel across the screen. This will be implemented once I'm happy with the roll.
The wireframe and random texts are for debugging purposes.
Here's the prg
Attachment: DICE315.PRG (18kB) This file has been downloaded 958 times
|
|
ahmok
DIV Junior
Posts: 37
Registered: 31-1-2019
Member Is Offline
|
|
Hello....
I have an innovative suggestion. Is it possible to make a rotating Tetrahedron? I mean this:
https://www.youtube.com/watch?v=krdrzI3hQYc
In addition, the words "DIV Games Studio" are on each side of this rotating Tetrahedron.
In conclusion, a new splash screen with this rotating Tetrahedron will be extremely fascinating and persuasive. Right?
This nice splash screen can help to promote DIV Games Studio.
|
|
dom cook
Div Pro
Posts: 387
Registered: 4-3-2016
Member Is Offline
|
|
Yes that would possible.
However, although a rotating textured volume might be eye catching, it's a lot of work for DIV whereas other languages can achieve it with a couple of
lines of code. In my opinion, a splash screen should play to DIV's strengths and not foster unrealistic expectations about what can be achieved with
it.
Having said that, if the 3d shape were rendered roughly with a few glitches here and there and thus without putting too much strain on DIV, it could
work. For example, look at some of the 'independent' games that are on the market these days. I saw one yesterday which had pixels the size of lego
bricks and a four colour palette. It still looked very cool.
[Edited on 15-3-2019 by dom cook]
[Edited on 15-3-2019 by dom cook]
|
|
dom cook
Div Pro
Posts: 387
Registered: 4-3-2016
Member Is Offline
|
|
OK, I've got the roll working and resetting. So now all I have to do is get the dice rolling along in a semi-convinving way. After that it's just a
case of tarting everything up a bit. Maybe I could add another dice if the computer can handle it.
Attachment: DICE315c.PRG (19kB) This file has been downloaded 991 times
|
|
dom cook
Div Pro
Posts: 387
Registered: 4-3-2016
Member Is Offline
|
|
So the tarting up phase is now underway.
So far I've Improved the lighting and added a perspective view. Up until now it was orthographic so when the dice was lying flat you could only see
the top face. Now you can see a little bit of the sides.
If you can't see the difference, try dragging the dice around the screen with the mouse (left button.) Change view with the enter key.
Attachment: DICE318.PRG (17kB) This file has been downloaded 923 times
|
|
ahmok
DIV Junior
Posts: 37
Registered: 31-1-2019
Member Is Offline
|
|
Quote: Originally posted by dom cook | Yes that would possible.
However, although a rotating textured volume might be eye catching, it's a lot of work for DIV whereas other languages can achieve it with a couple of
lines of code. In my opinion, a splash screen should play to DIV's strengths and not foster unrealistic expectations about what can be achieved with
it.
Having said that, if the 3d shape were rendered roughly with a few glitches here and there and thus without putting too much strain on DIV, it could
work. For example, look at some of the 'independent' games that are on the market these days. I saw one yesterday which had pixels the size of lego
bricks and a four colour palette. It still looked very cool.
[Edited on 15-3-2019 by dom cook]
[Edited on 15-3-2019 by dom cook] |
Thanks for your detailed explanation!!!
|
|
MikeDX
|
|
I'm currently trying to get a working dev laptop running for DIV since my new mac is not even compiling without issue.
Once this is done, I'm going to try to get a system where you can upload a zip or a prg and assets and it will compile to a html page. This should
have been done ages ago as compile as a service but it never got finished.
Hopefully then if we add this to the forum, we can embed things like this as actual forum posts, instead of images. It would be amazing to see your
work in progress as a real example online dom and it truly deserves it.
|
|
dom cook
Div Pro
Posts: 387
Registered: 4-3-2016
Member Is Offline
|
|
That sounds like very a nice feature. It will really help to bring the site to life. I'll keep doing my bit churning out the demos.
|
|
dom cook
Div Pro
Posts: 387
Registered: 4-3-2016
Member Is Offline
|
|
Just a picture.
|
|
BreadCaster
Loyalty Card Holder
Posts: 321
Registered: 2-3-2016
Member Is Offline
|
|
Heh, nice!!! Looks awesome. Perhaps this may be compatible with DIV TANK ARENA? gonna guess not but why not dream eh
Quote: Originally posted by MikeDX | I'm currently trying to get a working dev laptop running for DIV since my new mac is not even compiling without issue.
Once this is done, I'm going to try to get a system where you can upload a zip or a prg and assets and it will compile to a html page. This should
have been done ages ago as compile as a service but it never got finished. |
In regards to the laptop - how much are you looking to spend? If its a cash issue Id be more than happy to put a bit into a crowdfunded thingy like
GoFundMe, I'll even set it up if it'd help. Maybe even stretch goals of getting those old hard drives of yours restored with our old games on - would
be good to see my old attempts at games, I could do with a chuckle
~*~ Princess of Pies and Pastries ~*~
|
|
dom cook
Div Pro
Posts: 387
Registered: 4-3-2016
Member Is Offline
|
|
Well if we could get something done at the dll level, who knows?
By the way check out these new better edges. Much smoother, I'm sure you'll agree. I'm trying a different technique which dispenses with draw
commands and rather treats the periphery of the face as if it was actually curved. The green areas around the vertices need slightly different
treatment to the edges. I'll do them next.
As for the GofundMe suggestion, All I can say is genius! That is a great idea BreadCaster. Make it so. I reckon that if DIV was presented in the
right way it would get a lot of interested. Even I would consider chucking in a fiver. You might want to consult Ahmok about the sales pitch. When
it comes to game studio software, he really knows his shtuff and he's an articulate advocate for DIV whose interest in it can't be put down to
nostalgia.
As for the old hard drive. I have a couple of masterpieces entombed on them which I would pay good money to get back.
[Edited on 20-3-2019 by dom cook]
|
|
Pages:
1
2 |