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.


Messages - b0ib0t

Pages: [1]
1
After a little chat with Rel on Yahoo, I now know the secret!  Its a xor trick, and Rel told me all about it. I made a little "card" if you will to tell him thank you.

http://dbfinteractive.com/index.php?topic=2869.0

2
Projects / XOR texture, thank you Rel!
« on: January 30, 2008 »
This is a little token of appreciation for Rel showing me how to make XOR textures!

3
Here and there I see this generated texture that I find quite nice.  Its to uniform to be randomly generated squares.  My guess is that it must be some type of fractal or something. Alas, I am not sure. Any information on this texture would be greatly appreciated.

Here is a screen-shot of what I am talking of.

Edit:
I've uploaded that screen shot.

4
General coding questions / Re: Software rotations!
« on: January 18, 2008 »
I'm not really sure about what kind of rotations it is either to be honest.  I got my idea for the math from a few different examples of rotation. One of the places I was looking around was here...

http://pixwiki.bafsoft.com/mags/5/articles/circle/sincos.htm

The code here is an experiment to see if I could just get something to at least rotate. Ultimately I want to create a 3D camera system for my engine, sen3d.

5
General coding questions / Software rotations!
« on: January 18, 2008 »
For your pleasure today I have software rendered rotations! Although the quad is rendered by OpenGL and is in fact Hardware, the rotation math is all handled by the cpu.

This is a feature I am working on adding to sen3d.

Any ways, here is the code!

Code: [Select]
dim rad as double               
dim i : i = 0 
dim i2 : i2 = 0
dim pi as double : pi = 3.14
dim new_x as double
dim new_y as double
dim new_z as double     
dim x_ang as double
dim move_speed as double : move_speed = 0.1     
dim model(20) as double   
    model(0)= -1.0
    model(1)= 1.0
    model(2)= 0.0
    model(3)= 1.0
    model(4)= 1.0
    model(5)= 0.0
    model(6)= 1.0
    model(7)= -1.0
    model(8)= 0.0
    model(9)= -1.0
    model(10)= -1.0
    model(11)= 0.0
dim x3d, y3d, z3d
dim tempModel(20) as double

                               
    while true   

        if ( x_ang < 2 * pi ) then   
           
            'model(i2) = 1 * cos(x_ang) 
            'model(i2 + 2) = 1 * sin(x_ang)
               

            glClear(GL_COLOR_BUFFER_BIT or GL_DEPTH_BUFFER_BIT)   
            glLoadIdentity()                           
            glTranslatef(0,0.0,-6.0)                                           
            glColor3f(0.5,0.5,1.0)                     
            glBegin(GL_QUADS)                           
                while(i < 11)
                    x3d = model(i)
                    y3d = model(i + 1)
                    z3d = model(i + 2)

                    tempModel(i) = (y3d * cos(x_ang)) - (z3d * sin(x_ang))
                    tempModel(i+2) = (y3d * sin(x_ang)) + (z3d * cos(x_ang))
                    tempModel(i) = (x3d * cos(x_ang)) - (tempModel(i+2) * sin(x_ang)) 
                    tempModel(i+2) = (x3d * sin(x_ang)) + (tempModel(i+2) * cos(x_ang))

                    glVertex3f(tempModel(i), model(i + 1), tempModel(i + 2))
                    i = i + 3     
                   
                wend
            glEnd()                                                       
            SwapBuffers ()   
        else
            x_ang = 0
        endif
       
        if (i > 11) then
            i = 0
        endif     
       
        x_ang = x_ang + 0.01 
    wend

It is still a bit bugged as I am not 100% sure of what I'm doing. But it is a large step in the right direction. The problem I am faced with in implementing these types of rotations in sen3d is that objects are up to 7000 vertex, and each object in the scene might need to rotate at a slightly different angle due to camera perspective. If anybody has any info on this, please let me know!

6
General chat / Re: The Welcoming Comittee
« on: January 17, 2008 »
I generally code with whatever make me happy! I enjoy c++ quite a bit, also I do freelance PHP stuff once in a great while. Right now I am doing a game engine in Basic. I also got a neat book about Blitz3D, I am seriously considering buying a copy.  :kewl:

7
Quote
First what made you decide to start programming. Did you have a moment that really solidified the decision and to aside time to start learning something that the average person has little interest in?

Secondly, Why do you program? I realize that all of my work is done in a virtual world that has little impact on the real world save spreading fleeting moments of wonder, frustration and happiness.

Thirdly, has the time you've spent honing your skill cost you anything in any concept of time or intangible things?

Finally, why have you chosen to learn the programming language(s) that you know?

1. I started programming in the mid 90's. QBASIC was my first language. At the time I had not "decided" that I was a programmer.  At the time I was just tinkering with it to see what I could make it do.  I wanted to learn more so I asked my high-school technology class instructor if he could help me learn more. I was turned down and very discouraged.  After that I didn't do any programming for a few years.

A few years had passed, and I was a hard-core gamer. I played Unreal Tournament non-stop and had a passion for computer hardware, and building pc's.  My friends at a lan party were talking about how games were coded in different languages. That discussion that night had reminded me of my time with QBASIC and planted a tiny seed in my mind.  A few weeks afterward I was browsing my local Hastings store, looking for new games.  I came across a box, with a particularly scary looking monster on it, in bold print on the front of the box it said "DarkBASIC". 

Here is a picture of this box.


I quickly snagged the box, and walked over to the books section in Hastings, and sure enough I found this...


Needless to say, I bought them both. Along with a copy of a game nobody has probably heard of, Firestarter. An excellent fps game I might add! After I started working my way through this book I was hooked. DarkBASIC and that book were what solidified my decision for programming.

2. In short I program for fun. I enjoy seeing the fruits of my labor.  But, now for the longer and more complex answer ...

There are a few reasons why I program really. One is, I like making my own utilities. For example, I have coded and use my own audio player. Second is, after I have been programming for so long, doing anything else seems intellectually stale. I get bored easy when I'm playing games, or things like that ( I still pay tons of games, don't get me wrong). I enjoy the mental challenge of writing software. Third is most complex of all. I have always enjoyed playing independently developed games, especially lately they seem to be getting better and better. I would like to develop my game engine and perhaps get in the business of professional game coding.  That probably makes me sound like a sell-out, and for that I am sorry haha!  But in my mind, to contribute to the professional independent dev "scene" will help it to grow stronger.  I like the idea of buying a game for 10.00 from a friend, or a group of real people who are not millionaires.

 3. One failed relationship sadly. I was with this girl for 4 years, and somehow it all fell apart. Of course it is not only due to my programming and computer habits, but I definitely know it is something she did not like about me.  Now days, I think I have struck a perfect balance! My girlfriend is fine with me coding for long hours, as long as I don't babble technical details to her haha! She to spends long hours at her computer. 

4. I started with DarkBASIC, after that I took on c++. I did come C++ professionally for a year or so. Out of boredom, I came across Basic4gl, then shortly after that I found this nice community haha! Also I got a book for xmas

I am planning to buy a copy of Blitz3D.

8
General chat / Re: The Welcoming Comittee
« on: January 17, 2008 »
Hello! I've posted here a few times but I don't think I have properly introduced myself. I am b0ib0t (boy bot) haha!  My girlfriend got tired of hearing me talk about code and said I should find some friends. I found this place after some random google searching.

The demo scene is still all quite new to me, and I am very interested to learn and participate!

Wow, I am not very good at introducing myself! Sorry about that lol.

9
Projects / Re: sen3d - My first 3d engine!
« on: January 17, 2008 »
Good news!  I have managed to fix all the mentioned bugs! I also managed to find a better way to do the transformations.  Before, I had been looping the entire set of vertex, and adding to it. Now I am using an transArray. The transArray has a key for the model number, and 3 sets of data for X, Y and Z. 

As the engine loops in the main render loop, the transArray is applied to the vertex data.  This way is much faster, and also helped to fix one of my bugs that had been mentioned.

10
Projects / Re: sen3d - My first 3d engine!
« on: January 15, 2008 »
Earlier I had mentioned that I would be having an update by the middle of this week or so. Unfortunately I do not think things will work out this fast.  I have created two bugs that are quite difficult to squish.

Bug 1:

If you move an object entirely off of the screen, you sill see one poly that is drawn from the edge of the screen, to what is set as the camera coordinates.  This only happens when doing model translations. I am trying to get rid of this unwanted effect.

Bug 2:

When setting the engine to "fps" mode, the camera moves to fast, and inconsistently, regardless of the values passed for amount of translation.

So that everyone is able to see where I am so far, I have uploaded my work to mediafire. Any feedback or suggestions would be most appreciated! :D

http://www.mediafire.com/?bwhy3xszy4r

11
Projects / Re: sen3d - My first 3d engine!
« on: January 15, 2008 »
The engine started out as a fairly simple parser. The reason for this is that I wanted
to have a good scripting system. This way to make a game or demo, one would not have
to edit or add much code to the engine itself, but merely write a script to controll
the engines already existing features.

The lexer pulls data from an array (called parsBuffer()) and sets engine states
accordingly. 

In the case of how vertex data is stored, the parser subroutine can be sent many different
codes for what mode it should operate in. These modes change based on what type of file
you are trying to parse.  In the case of .raw model files (exported by the Blender modeling
app) the parser fills an array called modelBuffer().  After the modelBuffer is filled the
program is then routed to a loadModel subroutine. 

The loadModel subroutine is the final stop for vertex data. A lot happens here. The
vertex data is put into a multi dimensional array called vertexArray, the first dimension
of the array stores the models code number, and the second contains all of that models
vertex data. This allows multiple models to be stored in that same array. Also in the
loadModel sub, is an array that stores modelnum and that associated models properties, such
as filename, and object properties.

In the script you can define object properties, such as rendermode (wireframe, points, etc).
When you define the rendermode for an 3d model, those properties are stored to that modelProperties array found in loadModel.  This allows for many options for how you would want to effect an 3d obejct. Such as, but  not limited to
Code: [Select]
-render mode
-key bindings
-anim bindings
-path bindings
In the script you might have something that looks a bit like this.
Code: [Select]
engineMode fps
load 3dcube.raw
bindInput 3dcube.raw
renderMode 3dcube.raw quads
That little bit of script would tell the engine that it is running in "fps" mode. And this means
that if an object is bindInput, it will be bound to the standard controll scheme of an fps style
game (wsad + mouse).  Obviously you would be able to override the standard control schemes, but in many cases you would not need to.  Second, in the script loads the .raw model, and after binding fps input, the engine is told to render that model in quads mode.


Some of my newest additions, are multi line comment system, that allows comments to be contained in the script. For example...
Code: [Select]
/*  this is where
    we start the engine */
engineMode fps
This is how the multi line comments look at the moment.

I am also working with occlusion and culling. Right now I am working on an extremely simple spherical object culling system. The way this is working right now is, the distance between vertex and center of the camera is measured. Any first vertex in a set of 4 verticies, and the 3 verticies that follow it  that exceeds the limitation of view distance is not rendered. A little more clear way to say it is. If an vertex is out of range, the entire quad is not rendered. This means we skip 12 sets of coordinate data. This is going to be for static objects only in the future. The way it will work for dynamic objects is, the entire object will not be rendered if just 1 vertex is out of view.

The reason I get rid of the entire quad on static objects is because it is slow to do a check for each vertex to see if it is out of view. If I check only the root vertex per quad, this is much faster! We save the time of what would have been 12 conditional checks, that involve complex floating point math, per quad.

It is a bit slower than Octree's would be, but much faster than nothing at all. It is also much more simple then Octree's I might add.

12
Projects / sen3d - My first 3d engine!
« on: January 11, 2008 »
Today is my first day of access to this fine board you have here. I would like to share with everyone (who will listen!) the 3d engine I am working on!  It is called sen3d. sen stands for Simple ENgine.  I have decided to make it GNU and put it on Sourceforge.net.  Although, if I ever do another engine, it will not be GNU!

The goal for the engine is to achieve at least minimally, the graphics as seen in the Ridge Racer games for Playstation 1.  So that would be an early to mid 90's looking 3d engine. 

I am half way through the next release, which is going to add a lot of things, such as

-View distance settings (culling and cutting of dynamic and static objects!)
-In script multi-line comments ( /* example */)
-Object property settings, renderMode, and inputBinding (and maybe more?)
-A whole new, deluxe camera system!

I'm not sure what else to say about it. It is geared towards games, but could also easily do demo's. I'm not even really sure if a bunch of demo guru's would be interested in a game engine haha!  The fact is, its quite discouraging to put all this work into it, and have nobody even say hello to me!

Any ways, here is the website for the engine. I will be updating it by next week.

http://sen3d.sf.net

Pages: [1]