I need something to read about resource files and manifests for windows applications.
Also, I think I enabled visual styles properly, but these buttons off and I don't know where this font came from...
[img]http://i.imgur.com/7TVwjuZ.png[/img]
thats the default font for winforms
Ew gross
After spending like 30 minutes reading through Overv's code on procedural generation, I learned something. And this is what I've learned
[CODE]
using UnityEngine;
public class SurfaceCreator : MonoBehaviour {
public Terrain terrain;
public TerrainData terrainData;
float[,] heightMap = new float[33, 33];
void Start() {
for (int x = 0; x < 33; x++) {
for (int y = 0; y < 33; y++) {
heightMap[x, y] = Random.value;
}
}
terrain = gameObject.GetComponent<Terrain>();
terrainData = terrain.terrainData;
terrainData.size = new Vector3(33, 1, 33);
terrainData.heightmapResolution = 33;
terrainData.SetHeights(0, 0, heightMap);
terrain.Flush();
}
void Update() {
}
}
[/CODE]
Yeah I had some help towards the end with going back and reading the code. But other then that here are the results! ( Around 80% of it typed up by me! Other 20% used some help from Overv's code! )
[IMG]http://i.imgur.com/fHD0Ts0.png[/IMG]
Yeah, my game will be open source if I put it out for free which I probably plan on doing. I gotta make it 2d, ideas change though.
Agree for 2D, disagree for 3D.
[QUOTE=Asgard;49516734]I might, to spread my business card around a bit :v:[/QUOTE]
Sweet, look up for my game at the indie prize booth if you want to do a business card duel : [url]http://exiin.com/afterloop[/url]
[QUOTE=Clavus;49518241]That's nice.
Standard tickets for Casual Connect are $500 though, and it only goes up from there. Not really an event for students.[/QUOTE]
True, tickets are way too expensive which is why I only relied on winning again.
Casual Connect is so much better than gamescom imho, free parties, free cocktails, rave parties, cuban cigars, you actually feel what it's like to be a successful developer at that place :v:
[QUOTE=Xerios3;49521053]
True, tickets are way too expensive which is why I only relied on winning again.
Casual Connect is so much better than gamescom imho, free parties, free cocktails, rave parties, cuban cigars, you actually feel what it's like to be a successful developer at that place :v:[/QUOTE]
GamesCom was ok, but very international and also very focused on recruiting. Plus if you want to talk to anyone, you'll have to make an appointment.
So, I've finished implementing my reliability layer over UDP. Firstly, I can highly recommend *not* doing this, it is a lot of effort (~600 lines of code just for a high level description of the reliability stuff), and not very friendly to debug. I didn't want to swap to TCP with UDP as that'd involve changing the networking architecture of my server quite significantly, and I couldn't be arsed to deal with the fact that TCP is a streaming protocol not a packet based one (sock_seqpacket pls)
That said, this is how it works:
So, the game has a client and server. A client decides it wants to reliably network a particular variable. This variable gets added to the clients outgoing reliability list, and assigned an ID. Every x ms, this variable gets sent to the server until the client receives an ACK (with the ID sent to the server) telling it the server got the data. ACKs are spammed to the client too (again every x ms). This means that if there's any data loss of acks/data, itll simply keep being transmitted until it gets through. This is terribly inefficient
The server then takes this data, and assigns it to the outgoing queue for all the currently connected clients, and the same process above happens of the server spamming the data to the clients, and only stopping once it gets the acks back from the clients.
Data received is kept in an 'incoming' buffer. New data received is checked (id-wise) against the data in the incoming buffer, and discarded if its already in the buffer. This way, even though data is spammed every x ms, the client only sees it happening once. Incoming data is then removed from the incoming buffer after x ms (currently like, 2 seconds)
This is.. well, hideously inefficient, and I almost certainly could have used TCP to a much better effect. However, I was mainly interested to see how difficult it was to write a very basic reliability layer. Surprisingly enough this works pretty well, and means that I can now reliably network eg hp information change, but at the speed of UDP. Hooray!
[QUOTE=DoctorSalt;49518556]What linux distro do you use for graphics/programming?[/QUOTE]
I use Void Linux due to availability of recent packages and method of packaging. Almost all of their build infrastructure is available to reproduce, which is important.
[editline]13th January 2016[/editline]
What AM I actually working on? I suppose reducing malware infections on vulnerable Joomla! sites is what I'm working on, although it is more scripting than it is application development.
There's a lot to take into account, and even just detecting which websites on our servers run what version of what software can be slightly tedious at times.
[QUOTE=Xerios3;49521053]Sweet, look up for my game at the indie prize booth if you want to do a business card duel : [url]http://exiin.com/afterloop[/url]
[...][/QUOTE]
This looks really fun but my phone most likely can't run it. Will there be a PC release later?
[vid]http://files.facepunch.com/ziks/2016/January/13/2016-01-13-1638-22.mp4[/vid]
Work in progress screenshot tool thing.
[t]http://i.imgur.com/utBsI2T.png[/t]
Uh, more to come..?
[IMG]http://i.imgur.com/1ebU983.png[/IMG]
Got the terrain to only be in 1 area.
[QUOTE=Verideth;49522424][IMG]http://i.imgur.com/1ebU983.png[/IMG]
Got the terrain to only be in 1 area.[/QUOTE]
If you want to see how I did very simple terrain generation in Unity some years ago [url]https://github.com/CptAsgard/TerrainGeneration[/url]
Finally got Dig Dug completely working on my emulator, and managed to fix the palette for the most part:
[img]http://i.imgur.com/9eU7JXd.png[/img]
However, there is one thing that just isn't right and is driving me nuts...
[img]http://i.imgur.com/WTj0JZr.png[/img]
This tile has the wrong palette and after 2 hours I still have absolutely no idea why.
Something tells me there is something slightly off with my [i]very[/i] elegant solution to this problem:
[code]
// Get the "correct" attrib for which corner the tile is on.
const bool isBottom = ((((vScroll_ & 0x60) >> 2) | ((vScroll_ >> 12) & 7)) % 32) >= 16;
const bool isRight = ((((vScroll_ & 3) << 3) | (xScroll_ & 7)) % 32) >= 16;
const u8 bgPixAttrib = (bgAttrib >> ((isBottom ? 4 : 0) + (isRight ? 2 : 0))) & 3;
pixelColor = GetPPUPaletteColor(comm_->Read8(0x3F00 + (4 * bgPixAttrib) + bgPixel));
[/code]
Send help.
:hammered:
[b]EDIT:[/b]
Mario is kinda slightly fucked too...
[img]http://i.imgur.com/6uJz03e.png[/img]
Got the terrain to change size now.
[CODE]
using UnityEngine;
public class SurfaceCreator : MonoBehaviour
{
public Terrain terrain;
public TerrainData terrainData;
float[,] heightMap = new float[1000, 1000];
void Start()
{
for (int x = 0; x < 1000; x++) {
for (int y = 0; y < 1000; y++) {
heightMap[x, y] = Random.value;
}
}
terrain = gameObject.GetComponent<Terrain>();
terrainData = terrain.terrainData;
terrainData.size = new Vector3(1000, 1, 1000);
terrainData.heightmapResolution = 1000;
terrainData.SetHeights(0, 0, heightMap);
terrain.Flush();
}
void Update()
{
}
}
[/CODE]
[QUOTE=Icedshot;49521307]So, I've finished implementing my reliability layer over UDP. Firstly, I can highly recommend *not* doing this, it is a lot of effort (~600 lines of code just for a high level description of the reliability stuff), and not very friendly to debug. I didn't want to swap to TCP with UDP as that'd involve changing the networking architecture of my server quite significantly, and I couldn't be arsed to deal with the fact that TCP is a streaming protocol not a packet based one (sock_seqpacket pls)
That said, this is how it works:
So, the game has a client and server. A client decides it wants to reliably network a particular variable. This variable gets added to the clients outgoing reliability list, and assigned an ID. Every x ms, this variable gets sent to the server until the client receives an ACK (with the ID sent to the server) telling it the server got the data. ACKs are spammed to the client too (again every x ms). This means that if there's any data loss of acks/data, itll simply keep being transmitted until it gets through. This is terribly inefficient
The server then takes this data, and assigns it to the outgoing queue for all the currently connected clients, and the same process above happens of the server spamming the data to the clients, and only stopping once it gets the acks back from the clients.
Data received is kept in an 'incoming' buffer. New data received is checked (id-wise) against the data in the incoming buffer, and discarded if its already in the buffer. This way, even though data is spammed every x ms, the client only sees it happening once. Incoming data is then removed from the incoming buffer after x ms (currently like, 2 seconds)
This is.. well, hideously inefficient, and I almost certainly could have used TCP to a much better effect. However, I was mainly interested to see how difficult it was to write a very basic reliability layer. Surprisingly enough this works pretty well, and means that I can now reliably network eg hp information change, but at the speed of UDP. Hooray![/QUOTE]
It is a huge learning experience doing this as I've done the same in the past.
I ended up using RakNet though since I started wanting more for my network plugin like for example NAT Punchthrough, upnp and such.
My engine uses enet, handles the protocol level much saner than I could.
Way better than expected!
Now I only have to optimize the rendering a little bit more, but I can do that later as the rendering is completely encapsulated away from the linking logic. This enables me to focus on the essential things first.
[media]https://www.youtube.com/watch?v=MxL3kmP9DjA[/media]
That moment when you go into your 3-year old code and find ascii art
[t]http://i.imgur.com/2w8MeXR.png[/t]
[QUOTE=Ziks;49522164][vid]http://files.facepunch.com/ziks/2016/January/13/2016-01-13-1638-22.mp4[/vid]
Work in progress screenshot tool thing.[/QUOTE]
What's the song?
Edit: [url]https://soundcloud.com/thump/04-best-mistake[/url], thanks Google Voice Search!
Holy crap I finally fixed the issue with palettes that was driving me crazy for many hours!
[img]http://i.imgur.com/eEBIPea.png[/img]
How did I fix it? Well that snippet of code I last posted:
[code]
// ...
const bool isRight = ((((vScroll_ & 3) << 3) | (xScroll_ & 7)) % 32) >= 16;
[/code]
should have been < 16 instead...
Those 2 characters wasted hours of my time.
:suicide:
[QUOTE=seandewar5;49524722]Those 2 characters wasted hours of my time.
:suicide:[/QUOTE]
Such is the life of a programmer
[QUOTE=Asgard;49524668]That moment when you go into your 3-year old code and find ascii art
[t]http://i.imgur.com/2w8MeXR.png[/t][/QUOTE]
Found this a while back when I reopened some Reflection code I wrote years ago
[IMG]http://i.imgur.com/iwxEHRM.png[/IMG]
Day 1 of generating some barren-ass landscapes. On the planning are biomes, rivers, noise variations, lakes, rocks, grass. I'd sigh at the tremendous amount of work if it wasn't so [I]fun[/I].
[img]http://i.imgur.com/Uln6EiE.png[/img]
[QUOTE=Asgard;49524894]Day 1 of generating some barren-ass landscapes. On the planning are biomes, rivers, noise variations, lakes, rocks, grass. I'd sigh at the tremendous amount of work if it wasn't so [I]fun[/I].
[/QUOTE]
That's real pretty
[QUOTE=Asgard;49524894]Day 1 of generating some barren-ass landscapes. On the planning are biomes, rivers, noise variations, lakes, rocks, grass. I'd sigh at the tremendous amount of work if it wasn't so [I]fun[/I].
[img]http://i.imgur.com/Uln6EiE.png[/img][/QUOTE]
[B]Woah woah woah hold on a minute..[/B]
Please share how you generated that flat shaded terrain in Unity?
I tried making terrain like that a while ago, but couldn't figure out how to get it flat shaded.
It's a shame, because I love the look.
[sp]I'm only guessing it's Unity, because after using it for so long, I can sort of tell[/sp]
[QUOTE=sarge997;49525003][B]Woah woah woah hold on a minute..[/B]
Please share how you generated that flat shaded terrain in Unity?
I tried making terrain like that a while ago, but couldn't figure out how to get it flat shaded.
It's a shame, because I love the look.
[sp]I'm only guessing it's Unity, because after using it for so long, I can sort of tell[/sp][/QUOTE]
I'm not sure how it's done specifically in Unity, but isn't flat shading achieved just by not interpolating the surface normals? I'm pretty sure that's all there is to it.
[editline]13th January 2016[/editline]
Or rather, making sure the normals on your poly are all exactly the same?
[QUOTE=srobins;49525041]I'm not sure how it's done specifically in Unity, but isn't flat shading achieved just by not interpolating the surface normals? I'm pretty sure that's all there is to it.
[editline]13th January 2016[/editline]
Or rather, making sure the normals on your poly are all exactly the same?[/QUOTE]
You must have mesh made out of disconnected triangles. That is, vertices are not connected "in-between" triangles.
As you guessed it right, vertices are duplicated, just their normals are different for each triangle.
[QUOTE=Xerios3;49521053]Sweet, look up for my game at the indie prize booth if you want to do a business card duel : [URL]http://exiin.com/afterloop[/URL][/QUOTE]
Did I miss that in a previous WAYWO? Your game looks amazing! I didn't realize that it was for mobile at first.
[IMG]http://exiin.com/wp-content/uploads/2015/06/LID20.png[/IMG]
[QUOTE=Fourier;49525141]You must have mesh made out of disconnected triangles. That is, vertices are not connected "in-between" triangles.
As you guessed it right, vertices are duplicated, just their normals are different for each triangle.[/QUOTE]
Exactly this
Sorry, you need to Log In to post a reply to this thread.