Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

 
Advanced search

880127 Posts in 33021 Topics- by 24388 Members - Latest Member: zackaria85

May 25, 2013, 07:36:58 PM
TIGSource ForumsDeveloperTechnical (Moderators: Glaiel-Gamer, ThemsAllTook)The happy programmer room
Pages: 1 ... 65 66 [67] 68 69 ... 227
Print
Author Topic: The happy programmer room  (Read 264197 times)
Skomakar'n
Level 10
*****


Vąutah


View Profile WWW Email
« Reply #990 on: July 21, 2010, 10:47:32 PM »

I'm not. The others are.

I know, I understand where ur coming from, and where they are.  I just want the happy programmers back.  I've been slogging my way through a complete parsing solution.  And though very useful, its also been quite tedious.  So I like coming here and reading what ppl are working on.  It helps motivate me to get it down, so A) I can post in here about the amazing parser framework I finished (eventually) and B) I can get to programming some more cool stuff similar to what I see here (by sheer coincidence my next project is to put the finishing touches on an OS wrapper, similar I imagine to what average software is doing, so I too was curious as to what he had done).

My image loader is giving me a little trouble upon exit at the moment, but I've decided to just leave it there for the time being, and I've started working on the OOP model for the HUD system. I've created the first nested namespace of my project, and things seem to be working out nicely. Still a couple of classes left to do before I can test anything. I'm quite happy with what I'm doing right now.
Logged

mak gam
Geisha Novia: Out now!
Bottoms Up!: Devlog

Royal Railway on Twitter.

Adam Emil
TheSpaceMan
Level 1
*



View Profile WWW Email
« Reply #991 on: July 22, 2010, 03:40:52 AM »

I have finaly got my ass around to look at C# and XNA, and it seems a lot easier then I expected. I got a basic engine up and running and with winform making tools was a breeze.
I also have a lot to draw from since it's basicly directx wraped up in there.

I am happy because I got two of the main tools behaving decently and with default serialize functions it was easy to get the data into the game.

Tile Editor: Working.
Map Editor: Working.
Animation Editor: Not Started, using manual writen xml, but a fairly clear plan of execution.
Game: Aproaching Alpha.
Logged

Follow The Flying Thing, my current project.
http://forums.tigsource.com/index.php?topic=24421.0
Average Software
Level 10
*****

Fleeing all W'rkncacnter


View Profile WWW Email
« Reply #992 on: July 22, 2010, 05:14:24 AM »

I'm not. The others are.(by sheer coincidence my next project is to put the finishing touches on an OS wrapper, similar I imagine to what average software is doing, so I too was curious as to what he had done).

I'm not writing an OS wrapper, as least not in the sense of libraries like SDL.

My programs consist of a back-end and several front-ends.  The back-end is completely OS independent, and constitutes the vast bulk of the code (95%+).  The front-ends are specific to each OS.  The program entry point is in the front-end, and I provide a C interface between the two layers.  For example, this is the interface my back-end uses to communicate with the front-ends:

Code:
package Front_End is
    pragma Preelaborate;

    -- Flip the OpenGL buffers.
    procedure Swap_Buffer;
    -- Confirm the ability to use vertical sync.
    function VSync_Available return Integer;
    -- Enable/disable vertical sync.
    procedure Enable_VSync;
    procedure Disable_VSync;
    -- Bailout procedure.
    procedure Die;
    -- Display an error message.
    procedure Error_Box(Message: in chars_ptr);
    -- Retrieve the path to the user's data directory.
    function Data_Path return String;
    -- Enable and disable key repeat for typing.
    procedure Enable_Typing;
    procedure Disable_Typing;

private
    pragma Import(C, Swap_Buffer, "front_end_swap_buffer");
    pragma Import(C, VSync_Available, "front_end_vsync_available");
    pragma Import(C, Enable_VSync, "front_end_enable_vsync");
    pragma Import(C, Disable_VSync, "front_end_disable_vsync");
    pragma Import(C, Die, "front_end_die");
    pragma Import(C, Error_Box, "front_end_error_box");
    pragma Import(C, Enable_Typing, "front_end_enable_typing");
    pragma Import(C, Disable_Typing, "front_end_disable_typing");
end Front_End;

Each of my front-ends implement all of these functions, providing the OS-specific services that the back end needs.

Here's an example of what this looks like in each front-end:

Linux:
Code:
extern "C"
void front_end_swap_buffer()
try
{
    // Wait for vertical sync, if enabled.
    if (data->vsync_on)
    {
        unsigned retrace;

        data->wait_video_sync(1, 0, &retrace);
    }

    // Flip the buffer.
    gdk_gl_drawable_swap_buffers(data->drawable);
}
catch (...)
{
    cerr << "Fatal front end interface error in front_end_swap_buffer" << endl;

    exit(EXIT_FAILURE);
}

Mac:
Code:
void front_end_swap_buffer(void)
{
    @try
    {
        [instance.current_context updateFrame];
    }
    @catch (NSException *error)
    {
        front_end_error_box([[error reason] UTF8String]);
        [NSApp terminate:instance];
    }
}

Windows:
Code:
extern "C"
void front_end_swap_buffer()
try
{
    SwapBuffers(data->context);
}
catch (...)
{
    cerr << "Fatal front end interface error in front_end_swap_buffers" << endl;

    exit(EXIT_FAILURE);
}

The front-ends talk to the back-end through this interface:

Code:
#ifndef BACK_END_H
#define BACK_END_H

#ifdef __cplusplus
extern "C"
{
#endif

// One-time back end initialization.
void back_end_initialize(void);
// Run the main loop once.  Returns 0 on failure.
int back_end_main_loop(void);
// Pass a key event to the back end.
void back_end_key_down(int key);
void back_end_key_up(int key);
void back_end_key_typed(char key);
// Refresh the main view.
void back_end_draw(void);
// Reset the time delta, usually after a front end delay.
void back_end_reset_delta(void);
// Halt all processing, due to loss of focus or something.
void back_end_freeze(void);
// Close down all back end operations.
void back_end_shutdown(void);

#ifdef __cplusplus
}
#endif

#endif

Hopefully that makes it more clear, all the code is available on my website, for further inspection.
Logged

Franchise - The restaurant wars begin!

What would John Carmack do?
14113
Level 10
*****



View Profile
« Reply #993 on: July 22, 2010, 01:45:48 PM »

I've got a nifty flood fill algorithm working from scratch, with a view to going onto a* pathfinding.

its gooood.

(oh, and its all less than 175 lines of c++)
Logged

in fact, i prefer unpleasant forums
Kekskiller
Guest
« Reply #994 on: July 22, 2010, 02:24:38 PM »

I finally found a way to cope with ActionScript3. My audioplayer assignment works perfectly. Reads external XML playlist, has play/pause/stop/prev/nect buttons, a loading bar which is actually a text and such. Will add a final GUI, spectrum visualization and timeline tomorrow. And then I'll FINALLY have three or four days to learn for two still pending exams.
Logged
Ravine
Level 0
**


View Profile
« Reply #995 on: July 24, 2010, 11:28:36 AM »

i consider myself as a decent C# programmer, but i lack some experience in Cpp. So i've started a game project, to learn it by experimenting. I'm quite happy cause now i start to have some basic "Components" architecture running. And i've drawn my first entity today. Say hello to Mr Stickman and his undefined gun.

Logged
Kekskiller
Guest
« Reply #996 on: July 24, 2010, 11:35:07 AM »

Hello Mister... no, wait. I feel stupid this way.
Logged
Paint by Numbers
Guest
« Reply #997 on: July 25, 2010, 11:18:47 PM »

I got basic world generation down.

Really basic! It's still the very beginning. But I'm happy I've got this much working. Smiley
Logged
Average Software
Level 10
*****

Fleeing all W'rkncacnter


View Profile WWW Email
« Reply #998 on: July 26, 2010, 12:32:52 PM »

Somebody already went and made an Arch Linux package for my latest release, that's pretty cool (and happy!).
Logged

Franchise - The restaurant wars begin!

What would John Carmack do?
PGGB
Level 8
***



View Profile
« Reply #999 on: July 26, 2010, 12:43:02 PM »

Somebody already went and made an Arch Linux package for my latest release, that's pretty cool (and happy!).
The Arch Linux guys are just great. Best linux distribution by far in my opinion.  Beer!
Logged
Average Software
Level 10
*****

Fleeing all W'rkncacnter


View Profile WWW Email
« Reply #1000 on: July 26, 2010, 01:37:10 PM »

Somebody already went and made an Arch Linux package for my latest release, that's pretty cool (and happy!).
The Arch Linux guys are just great. Best linux distribution by far in my opinion.  Beer!

I'm a Slackware fan myself, can't see myself using anything else.
Logged

Franchise - The restaurant wars begin!

What would John Carmack do?
PGGB
Level 8
***



View Profile
« Reply #1001 on: July 26, 2010, 01:57:37 PM »

I'm a Slackware fan myself, can't see myself using anything else.
They are actually quite similar. You should try it sometime. Wink
Logged
TheLastBanana
Level 7
**


thelastbanana@hotmail.com
View Profile WWW Email
« Reply #1002 on: July 26, 2010, 07:22:36 PM »

After a good 3 weeks of trial and error, I've got collision detection for my game working perfectly.  The reason it took so long is that I needed objects to be able to move faster than their actual size, plus the game scales its physics steps depending on frame rate.  I've got something now that can scale to make it fairly smooth at any frame rate, but still have pixel-perfect collision detection. Grin
Logged

David Pittman
Level 2
**


caffeine?? NO!!


View Profile WWW Email
« Reply #1003 on: July 26, 2010, 10:59:49 PM »

I spent a few hours this evening implementing GOAP in Python. Good for brushing up on both Python syntax and an AI algorithm I haven't used in a few years. Python experts could probably do a lot of things smarter than I did, though.
« Last Edit: July 26, 2010, 11:15:23 PM by David Pittman » Logged

Games: Davy - SecOrd - TKtics - GRO - Cutie - CC1984 - SV
Vino
Level 3
***


View Profile Email
« Reply #1004 on: July 27, 2010, 03:01:54 AM »

the game scales its physics steps depending on frame rate.

I've found that to be a bad idea, when I write physics simulations I tend to make them a constant framerate regardless of what the server's doing. Just don't calculate the next one until the proper time. It helps avoid a couple of icky problems.
Logged

Pages: 1 ... 65 66 [67] 68 69 ... 227
Print
Jump to:  

Theme orange-lt created by panic