Advertisement

Latest C Activity

Calculating Normals of a Cube

Thank you for the hint. I visualized the normal vectors and saw that they all had seemingly random orientations:

I printed out the calculated normals and visualized them by hand, confirming that they are actually all correct. I then changed my focus to the matter of actually sending this data to the…

3,302 views
Advertisement

@1negroup Is the whole screen flashing? I'm not familiar with xlib, but problems with flashing/flickering make me think you're not using double buffering or if you are using DB, you have an erase screen flag set as true when it should be false.

3,357 views

Alberth said:

a light breeze said:
How do you define scripting language? I define it as a programming language that does not require a separate compilation step.

There are **very** few language definitions that define how to build an implementation. For example, while C is typically compiled as a sepa…

4,185 views

A major detail I notice in your code and since we're not in the For Beginners forum, you're not checking the results of scanf().

Input functions can fail for many reasons. For the scanf() family the return value is the number of items successfully matched and processed, or EOF in the result of failu…

3,789 views
Geri
October 22, 2022 09:52 PM

Yeah, you will better off with OpenGL than DirectX. Especially for a beginner. You will be able to access more type and generation of platforms. The api is also far more simpler. 

9,955 views

Hey there. I'm looking for programmers in c,c++,or c# that knows a bit about emulation programming. The idea is a portable (works on pc, web, mobile) fantasy console, with strict limitations on sprites per scaneline, controls and performance etc. Ideally i like to have at least two programmers for …

2,628 views

foxo said:

I also realised that gpu drivers and extremely low level gpu programming are some kind a ‘secret’ knoladge that nobody know how to do except the elit at vulkan and other specialised company that won't tell us there ‘secrets’. that's why I am asking : How to draw from gpu to the screen or …

12,003 views
enigma_dev
May 08, 2022 02:25 PM
DevBlog 26 - Finishing The Game!




It's over, I've finally completed my from scratch game project!

The final stretch has been far from glorious.

Rather than making features, it has been nonstop bug fixing.

To reach feature complete, I started just writing down non critical bugs rather than fixing them.

But after feature complete, I star…

19,119 views
enigma_dev
April 04, 2022 12:53 PM
DevBlog 21 - Writing a simple Audio System in OpenAL




Adding audio to my engine.  

I used OpenAL as the API is similar to OpenGL, the graphics API of this project.

I've added sounds to ship engines, lasers, explosions, UI, and more.

OpenAL makes Doppler effects easy, it just works out of the box.  

I know there isn't sound in space, but I'm take…

13,661 views

@hplus0603 I understand. I did some research and I finally got nullmodem working, though I got it working before I did some more research and also before I discovered that nobody is going to go through the trouble of buying a cord just to play multiplayer on a DOS game.

6,264 views

And if you want to see it for some reason, here is the entirety of the demo application. It looks long, but there are several defines for the different types of Watcom modes (I am using DOS4GW).

#include <process.h>
#include <stdio.h>
#include <stdlib.h>
#include <dos.h>
#inc…
28,467 views

ok ty
If other people want participate you can up this topic or pm me : )

7,679 views
Airbatz
March 05, 2021 10:37 AM

@endurion 

Thanks for pointing that out. It has since been fixed.  ?

8,229 views

Visual Studio can be configured using any folder structure regardless how it looks like by adding all the files to the .vcproj file and in addition add a .vcproj.filter file. Here you can configure all your files to look nicely and even be addressed in “virtual folders”. We use this in our build to…

10,768 views
epermyakov
September 10, 2020 06:05 PM
Writing a Real-Time Strategy Engine From Scratch, Or How I Made Pong In Only 3 Years

Hello gamedev.net!

The time has come for me to exit the shadows in which I lurked.

In the fall of 2017, I started going through some OpenGL tutorials and trying to put together my own renderer. It was fun. Maybe it was this feeling of fun that led me down the path that I followed. Here's one of the f…

22,757 views

The way I find up_tmp in init_camera_axis() is not optimal because if my cam->vec is (1, 1, -1) I can't find the right up_tmp. I currently find (0, 0, 1) and it should be equal to (-1, 0, 1). Do you have any idea how I can correct this ?

8,257 views

I had to normalize right and up.

41,721 views

Thank you very much for your help. 
Finally, this helped me :
https://gamedev.stackexchange.com/questions/185245/rotating-camera-in-3d-without-yawing-diagonally

I still have to calculate the angles and manage the interval.

8,140 views
canoi
July 02, 2020 11:30 PM
tinycoffee game framework

I'm working on a game framework called tinycoffee (tico), programming in C and Lua, using OpenGL 3.2. The structure is very similar to LÖVE.

The library is in an initial stage, so i don't recommend using for a commercial project. I have plans to create a simple editor, and make smaller editors as mo…

5,920 views
How to rotate a line around a point?

alvaro said:

If you know how to rotate points, you can rotate line segments, just by rotating the ends. If you know how to rotate points around the origin, you can rotate cpstest points around arbitrary points, by first subtracting the coordinates of the center of rotation, then rotating around the …

10,154 views

The buffer object simply isn't bound to the vertex array. The array doesn't know where to take the data from.

And a thing i don't understand:

glDrawElements(GL_TRIANGLES, layer->index * layer->ipo, GL_UNSIGNED_INT, 0)

How does the second argument relate to the number od elements ? Ipo is the buf…

4,277 views
Airbatz
April 20, 2020 10:39 PM
Win32 - How to merge a pattern brush with a bitmap?

@endurion 

I have tried XORing the flags and get different results. Probably a case of undefined behaviour? None of the docs really talk about XORing two modes together. Anyway, I finally understand how this effect is done, and it's pretty simple. I switched out one graphic for another, ran the…

5,713 views

Okay, a few of them. 

The code has structures that are the wrong size. Why do you have a 100 byte array to hold 3 bytes individually, which is much too large? Why are you building a large, potentially unbounded size string out of another 100 byte array which may be too small?  The first is…

5,297 views
Advertisement
Advertisement