Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - Gan

Pages: [1] 2 3 ... 20
1
Trash Talk / How is everyone?
« on: October 02, 2015, 08:21:14 AM »
This is a long term thread for discussing the lives of GMG members.

Where are you in life?

Has anything exciting happened to you?

What are your hopes and wishes?

Make any accomplishments?

What are you going to do next?

2
Trash Talk / Code words for daily conversation
« on: June 08, 2015, 04:43:23 PM »
I'm making a little database of code words to use with my brother. Sometimes we don't want to say more than a few words, so if we could convey what we want to convey in a single word, awesome.

Gravor - Latin word for feeling annoyed. I'm really annoyed and I don't want to talk right now.

Impediti - latin word for indisposed. so if your busy with someone or taking a poop or help up at the moment.

3
C/C++/Objective-C/D/C#/F/R / [D] The Ultra Mesh (Work in Progress)
« on: April 23, 2015, 06:14:38 PM »
I'm working on a Mesh object that's completely customizable and can support 2 million+ triangles at 60 frames per second(on my laptop).

Source Code: https://github.com/MatthewFrench/UltraMesh

Feature Completion List (Crossed out is completed):
Add ability to make a sky box
Add ability to make fog
Add loading Obj meshes from file.
Ability to remove vertices from UltraMesh
Rotation and translation of entire UltraMesh
Add Rectangle and box shape
Add ability to texture shapes with images
Make pulsating landscape demo with sound analysis using only the simplest UltraMesh commands
Add fancy camera movement functions- so the camera can fly around like a space ship
Move or change color of vertices
  Basic UltraMesh class setup (create mesh, add vertices, render)
addTriangle method in UltraMesh for easy adding triangles
VertexGroup class for easy manipulation of shapes and groups of distinct vertices
More shape functions, square, cube, polygon, sphere, pyramid
Switch to using Point or Point3 for vectors for easier manipulation instead of float arrays
Make it stable for having multiple UltraMeshes
Optimizations in UltraMesh for little CPU mesh modifications

Render speed on laptop:
2 million non-moving triangles: 60fps, 3% CPU
20,000 moving triangles: 60fps, 10% CPU
2 million moving triangles: 10fps, 100% CPU

Here is an example:

Code: [Select]
UltraMesh mesh = new UltraMesh();

ShapeGroup myCube = ShapeCreator.makeCube(mesh , Vec3(5, 2, 1), 1.0);
myCube.rotateX(5);

ShapeGroup myCube2 = ShapeCreator.makeCube(mesh, Vec3(-3, -2, 2), 2.0);
myCube2.rotateY(-10);
myCube2.setColor(0.0, 0.0, 1.0, 1.0);

mesh.render(camera);

Under the hood the Mesh object contains giant float arrays of numbers that the Mesh and VertexGroups modify directly.
The draw call only draws a single Mesh which allows it to have so many triangles.

Other shape methods:
createSquare
createTriangle
createPolygon
createCone
createSphere

My reason for wanting to create this is so I can make a giant ground mesh of vertices that move up and down to the beat of music.

In the future I could probably make a second version that instead of colors, you can apply images. That would mean you could render 2 million images to the screen, would be great for a very large 2D tile map. Or even a very large 3D map.

Very much work in progress, still learning 3D and better ways to do stuff


Update 2
Did a bunch of optimizations, constantly adding thousands of triangles to the Ultra Mesh. It works fine up until 700,000 triangles. Without constantly adding triangles, it runs fine at 2 million triangles.
From some research it seems for games, you don't want a polygon count over 300,000. I suppose we're doing pretty good then.
I can't wait until the Vulkan API. I bet I could get a lot more performance.

Update 3
Added the VertexGroup class and added a lot more mesh optimizations. You can now change any part of the mesh no matter how big it is and it won't impact performance.

Update 4
Bunch of VertexGroup bug fixes. You can see a few of my cool looking failures down below. But now it works well, lots of triangles rotating and changing colors randomly at only 2.8% CPU.

Update 5
Another performance test and bug fixes. 1,275 moving, spinning, color changing triangles run at 13% CPU.

Update 6
Tried to add the addSquare function, results were really buggy. I am quite tired. I'll continue after some sleep.

Update 7
Squares are still messed up but I asked for optimization help online and now rendering 2 million triangles only uses 3% CPU.

Update 8
I made a help post to figure out the square bug: http://www.reddit.com/r/opengl/comments/33rbim/weird_square_drawing_bug_4_vertices_d_language/

Update 9
Upgraded it to use OpenGL 3.3 and Vertex Array Objects. It might have increased performance, not entirely sure.

Update 10
Fixed the vertex bug! Turned out I was setting up my indices wrong.
Fun fact: 1,225 spinning, moving, color changing squares takes only 13% CPU.
However since I updated to Vertex Array Objects, my color has been resetting back to white after a frame of being colored. That sounded suspiciously racist.

Update 11
Fixed the color issue! 20,000 moving, spinning, color changing triangles and squares runs super smoothly at 60fps.

Update 12
Working on an addCube function.

Update 13
I'm not cube expert but that cube seems a tad long.

Update 14
That's one messed up cube. Working on fixing.

Update 15
3D shapes are looking a bit weird. I'll have to test more. Might just be the camera.

Update 16
Now that is what I call a cube.

Update 17
My next step is to make a giant fluctuating fancy colored ground. I'm thinking Tron styled.
I really do need to stop and simplify things a bit more though. After each bit of progress I should clean up the class so it's a little simpler.

Update 18
Cleaning up and adding more functions.
On a side note it is a bad idea to try to scale 100,000 cubes at 60fps. Maxed out my GPU, CPU and froze my laptop.
Turns out I have a bug in my scaling code. The crash happened because I scaled all 100,000 cubes beyond the highest float value. Oops.

Update 19
Fixed scaling. 100,000 pulsing cubes no longer crashes my laptop. Very slow though. Like 10fps slow.
1,000 pulsing cubes uses 10% CPU though. Vertex math is expensive people.

Update 20
I cleaned it up a lot. Made a cube tornado. It's easier to use and much cleaner. Still gonna be better though.

Update 21
I made a circle algorithm! But realized it's actually a polygon algorithm depending on how many segments you choose. From triangles to circles. Now I want to make a sphere and pyramid algorithm.

Update 22
Went to make a pyramid and ended up making a cone generator. Can make pyramids with all sorts of bases. Now I get to make an icosphere. Which is a little above my ability so I'm gonna look up algorithms.

Update 23
Made a buckyball. Now I need to make a subdivision algorithm that can not only awesomely subdivide the buckball but also any mesh.

Update 24
My subdivision algorithm is slightly broken.

Update 25
We have spheres! Took me literally 7 hours. Got the subdivision algorithm to work and normalization to smooth out the sphere. Next step is to do another friendliness sweep to make sure the necessary functions are available for easy manipulation.

Update 26
3D math - specifically vector movement and rotation is incredibly confusing. Don't get me started on matrices. Gah.
I'm just trying to make the camera fly around like a space ship when you press arrow keys.
It half works.
I need to find a 3D math library with all the functions pre-built.

Update 27
Lets see if I can revamp the camera system, make the camera incredibly easy to use.


Update 28
New camera works marvelously. The new math library is wonderful. I need to set my sight on the next feature now.

Update 29
Made a ground mesh. 20,000 vertices moving up and down uses only 18% CPU. Now I need to synchronize it to music.

Update 30
Still looking for a good audio library. Meanwhile I have been looking at texturing tutorials. How to apply an image to a mesh. You bind the active texture and have to rendered in the shader via UV coordinates. Sounds easy enough. Unfortunately you can only have up to 16 active textures on a single mesh. So I need to come up with a solution. I'm thinking maybe I can add an Image loading piece to the UltraMesh that puts all your images into a single giant image tileset. 1024x1024 is a good size. Though I'll have to make it return an error if you have too many images to fit in 1024x1024. Or I suppose I could do some clever programming and make it support multitexturing for 16 1024x1024 textures. If you had a tile game that had tiles at 64x64, you could have a max of 4,096 different tile images. So far I'm fairly pleased with my planning. No major roadbumps. A very fast and simple 2D/3D game engine is on it's way.
I'm thinking add texturing and then add dynamic lighting and you can make some really cool things. Really fancy 2D games or nifty 3D games.
Though low level graphic programming really is something important to learn. I can see myself being able to make so much more, stuff I've seen in games and tried to make but ended up being too slow or not looking right.
I might have to make a few different UltraMesh classes for specific uses. You can't really just make a single class that does everything without sacrificing performance or really cool looking effects.
Also checked out particles and instancing. It seems that particles would probably be best to have it's own class. UltraParticle or something. Instancing seems like it could be useful in UltraMesh though. Instancing allows a mesh to be rendered multiple times in different places without much more bandwidth or processing power. So instancing is very good for tiling things like if you wanted your world to appear to go on forever.

4
Trash Talk / Basing game events on feelings
« on: April 21, 2015, 05:49:30 PM »
I had this idea, when I make a game(or try to) I try to make something cool and complex. Space and shooting, fancy physics. But I've never gotten past the engine.

So the idea is what if we based game events on feelings.

A few weeks ago I got lost in the woods while running. (True story) Miles from civilization and light had just gone with the sunset. My legs were getting torn up from bushes, my shoes were soaked with water and I was worried about wild animals. I only had my iPhone's backlight to see a few feet in front of me. At the point were I was most hopeless, I saw lights in the distance and met some moonlight 4-wheelers that were able to take me back to camp.

Initial Feeling: Hopeless and slightly scared
Final Feeling: Relief


My theory is that games we consider good have a very positive Initial to Final Feeling amount.
Games that are bad have no difference between Initial and Final Feeling or a negative difference.

I lagged in a game of League of Legends and it cost me the game.

Initial Feeling: In control, good, hopeful
Final Feeling: Out of control, bad, hopeless

In that situation I got fed up with playing.

Another situation is Minecraft. I started placing blocks, placed more blocks, monotony got to me and I stopped.

Initial Feeling: Neutral
Final Feeling: Neutral

There was no positive feeling gain so I stopped playing Minecraft.



So the idea is that we need to get the Initial Feeling as low as possible and the Final Feeling as high as possible.



My game event idea I want to try to create to test this theory:
Player starts a mission where he has to destroy incoming enemies. He is able to handle it fairly decently. Then it starts getting more and more difficult. It is almost more than he can bear. Then the enemies increase by 10 fold. We are pushing the player to the breaking point.
Then the player gets rescued.

Initial Feelings: Distressed, hopeless, frustrated
Final Feelings: Relieved, happy, smiling, successful

People will like it because of the massive difference between the two feelings.
There's many different feelings. Curiosity is a great initial feeling, a terrible final feeling. Satisfaction is a great final feeling.

Can you guys think of more feelings that would work for Initial and Final feeling states?

5
Trash Talk / Anyone try Tinder?
« on: March 18, 2015, 04:29:08 AM »
A couple of my lady friends introduced me to it, it's fairly entertaining.

6
Trash Talk / Creature Software - For making cool character animations
« on: March 13, 2015, 03:25:47 AM »
https://www.youtube.com/watch?v=em_T76M2wRE

Check out the above link. You can make some really cool and fluid animations. Draw once and animate/deform.

7
http://watson-um-demo.mybluemix.net/?reset=true

It's quite fascinating. In some random thoughts, it gave me disappointing results:
Quote
I will murder everyone you ever thought to care about. You think in this society you are more than just a breath of air but in all reality calling yourself nothing is giving you too much credit. There is nothing special or unique about you, you are the epitome of failure. Your greatest successes pale in comparison to even the most remote of accomplishments. Even your thoughts are pathetic, your imagination is lacking. Is there anything about you that is worthy? No. Try to comprehend who you are in the grand scheme of the universe. Try to comprehend the incomprehensible. You are alive for a moment and then gone. Nothing in this world will give you purpose, there is no hope. EVERYTHING IS MEANINGLESS. The only reason for hope is in eternity. If something can survive time and guarantee no loss, it has purpose. If your soul lives past the future, you have hope. In the end that is all that matters.

In another regard, I thoroughly enjoy a pizza that is both a pizza and a pie.

However in my first post, it gave me 100% creativeness:
Quote
Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie Pie pizza pie


What does Watson say about you?

8
Trash Talk / Fun Elevator Puzzle Game
« on: January 22, 2015, 11:38:52 PM »
http://play.elevatorsaga.com/

I'm up to challenge 6. The goal is to code the elevator to move and pick up and drop off passengers.

Here's my code so far:
Code: [Select]
{
    init: function(elevators, floors) {
        var elevatorNum = 0;
        _.each(elevators, function(elevator) {
            elevator.elevatorNumber = elevatorNum++;
            elevator.on("idle", function() {
                elevator.isIdle = true;
            });
            elevator.on("floor_button_pressed", function(floorNum) { elevator.goToFloor(floorNum); } );
           
            elevator.on("passing_floor", function(floorNum, direction) {
                var floor = floors[floorNum];
                if ((floor.upButtonPressed || floor.downButtonPressed) && elevator.loadFactor() <= 0.75) {
                    floor.upButtonPressed = false; floor.downButtonPressed = false;
                    //var temp = elevator.destinationQueue.slice(0);
                    elevator.stop();
                    //elevator.destinationQueue = temp;
                    //elevator.checkDestinationQueue();
                }
            });
            /*
            elevator.on("stopped_at_floor", function(floorNum) {
                // Maybe decide where to go next?
            });*/
        });
        _.each(floors, function(floor) {
            floor.on("up_button_pressed", function(event) { floor.upButtonPressed = true; } );
            floor.on("down_button_pressed", function(event) { floor.downButtonPressed = true; } );
        });
    },
    update: function(dt, elevators, floors) {
    var getClosestIdleElevator = function(elevators, floorNum) {
        var chosenElevator = null;
        var dist = 100;
        _.each(elevators, function(elevator) {
            if (Math.abs(elevator.currentFloor() - floorNum) < dist && elevator.isIdle == true) {
                chosenElevator = elevator;
                dist = Math.abs(elevator.currentFloor() - floorNum);
            }
        });
        return chosenElevator;
    };
       
       
        // We normally don't need to do anything here
        _.each(floors, function(floor) {
            if (floor.upButtonPressed || floor.downButtonPressed) {
                var elevator = getClosestIdleElevator(elevators, floor.floorNum());
                if (elevator != null) {
                    floor.upButtonPressed = false; floor.downButtonPressed = false;
                    elevator.goToFloor(floor.floorNum());
                    elevator.isIdle = false;
                }
            }
        });
    }
}

9
Trash Talk / I have a new favorite programming language!
« on: January 21, 2015, 02:04:50 PM »
IT IS CALLED D PROGRAMMING LANGUAGE!

It's like C and C++ but new-age and easier and just as fast. AND CROSS PLATFORM.

The editor is free AND AMAZING. Super easy to setup. The language is simpler than Java and holy crap I just like it so much. I just met it and I am ready to dive in. Plus there are a lot of open libraries you can use to MAKE STUFF.

So I'm going to find a graphics library, find a networking library AND MAKE SOMETHING SUPER COOL IN THIS EPIC LANGUAGE HOLY CRAP I AM SO EXCITED AHHHHH


Edit: Post if you want the instructions for installing D and the editor. It takes 5 minutes to set up.

10
I'll also want to import all the forum data so we don't lose anything.

11
Trash Talk / Focus
« on: October 10, 2014, 10:19:12 AM »
This is what Steve Jobs had. This is what makes success.

The ability to remove every and anything from your mind, from your environment, to push all else off and focus on a single task, a single idea, a single product until it is complete.

To abstain from mindlessly browsing distractions, to not get caught up on the next big idea no matter how fantastic it is. To focus on the initial task until completion, until perfection.

This is something I haven't succeeded in. It is my goal.



If you can achieve this level of focus, you can complete anything at a level of detail higher than you've ever done and in a fraction of the time.

Practice focus. Start small, work up. Choose a goal. I'm about to work on a Critical Paper. I'm going to practice my focus on completely being devoured in this critical paper and shunting all other distractions until it is finished.

12
Trash Talk / Dat Water Simulation Tho
« on: October 10, 2014, 10:07:04 AM »

13
Announcements / Google Go Language
« on: October 08, 2014, 09:15:57 AM »
I've recently been sparked by the Google Go language. It's a server language that has a lot of the power of C++ but super easy to use. You can even use it to make Desktop applications if you use the Go-GTK GUI library. Plus it's easily cross platform.

If you remember the past chat box games, the servers were made in Node.js and the client was made in Javascript. In my SpaceCraft game(which I'm still secretly working on), I switched Javascript to Dart. Google Dart is much easier to make webpage programs in. And now I will be using Google Go for the server side for better ease of use, better error handling, and tons better performance.

14
Announcements / Everything you've ever created, put in in a Repository
« on: October 08, 2014, 09:12:54 AM »
Announcing a pro tip:

Place everything you have created in it's own repository. Make a showcase out of it, add instructions on using it, add videos and pictures if necessary. What you're doing is essentially a showcase resume.

I'm currently doing this. I've registered a free domain of MattFrench.me and set up a GitHub account where I will post all my source codes for every project in their own repositories. I will make each runnable and up to date with instructions and screenshots. I will make a very cool showcase on GitHub. Linking my webpage of MattFrench.me to the repositories.

This will be quite an adventure.

15
Announcements / Free Domain Name and Git Tools for College Students
« on: October 08, 2014, 09:03:16 AM »
There is a promotion going on where you can get a free domain name and some awesome GITHub stuff if you're a student.

To get a free domain: https://nc.me

To get a bunch of free GIT stuff including software, unreal engine and server hosting: https://education.github.com/pack/offers

I just got accepted and am setting up all this free stuff. My website, repositories and cloud servers.

Pages: [1] 2 3 ... 20