Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-4041-

2D Doom game, Doom Arena.

Name: Anonymous 2009-03-08 14:31

Hai /prog/,

I've been coding this game for about a week now. It will be a mass-killing-2D-tile-style-arena-type-doom-clone-multiplayer-game. It is coded in C, and uses SDL (and SDL_mixer), and UDP for the multiplayer thing. Anyway, I finished yesterday the network programming, and it works fine, and it is very fast. Just finished coding the two player local multiplayer thing. Blah blah blah. Sorry I'm tired.

Here's a screen, taken some minutes ago: (with the local multiplayer mode, dsadsada)
http://www.noelshack.fr/voir/010309/lol037858.png

Name: Anonymous 2009-03-08 14:33

Niggers, say something, I'm tired. (Didn't sleep at all last night.)

Name: Anonymous 2009-03-08 14:35

HOLY FUCK YOUR CODE IS HORRIBLE. READ SICP, NOW!

Name: Anonymous 2009-03-08 14:37

FUCK I said I am tired. My code is dirty as hell, I'll fucking clean it tomorrow. I'll just leave this here, good night.

Name: Anonymous 2009-03-08 14:38

Source code or GTFO

Name: Anonymous 2009-03-08 14:41

doom clone?

Name: Anonymous 2009-03-08 14:51

You know, I can think of any of a hundred different engines that would have made writing that game trivial. Point-and-click, even.

Name: Anonymous 2009-03-08 16:14

>>1
Cool font. Is that Proggy, by any chance?

PS: The rest is shit.

Name: Anonymous 2009-03-08 16:53

Sounds pretty cool, bro. Although >>7 has a point: you could have done this in Klik'n'Play.

Name: Anonymous 2009-03-08 16:57

>>8
Are you a faggot. You seems to like overlaping uppercase letters,
are you a faggot.

Name: Anonymous 2009-03-08 17:03

OP, I like your game. Good work :)

Name: Anonymous 2009-03-08 17:10

>>9
Did you mean The Games Factory 2?

Name: Anonymous 2009-03-08 17:14

THAT CODE IS PIG DISGUSTING

Name: Anonymous 2009-03-08 17:25

Also, doing both game logic and basic drawing directly from your input handling may have been cool for shaving off some cycles in the 80's, but nowadays we like to structure our code a little better. Nice job on calling SDL_BlitSurface directly instead of setting up some abstraction functions, too, and on the massive amounts of copy-pasting between code for moving in all directions, and for almost identical objects like the players.
And you seem to have accidentally named your player direction variable (which should be a property on his sprite struct, no?) player_position.

HIBTY?

Why aren't people taught the most elementary best practices, anyway? When we learned programming in my first year, the examples we were shown all put unescaped POST data directly into SQL queries. And now we're learning to do OpenGL using fucking immediate mode. I know our instructors wouldn't write code like that, so would it have been so damn hard to teach us properly?

Name: Anonymous 2009-03-08 17:33

>>12
More like Games Factory: the Prequel.

Name: Anonymous 2009-03-08 17:41

I read every single line of code in your terminal and enjoyed every minute of it, OP. Don't listen to these people, they only know how to program with parentheses.

Name: Anonymous 2009-03-08 17:53

>>16
Actually, >>14 has some valid criticisms.
Nice job on calling SDL_BlitSurface directly instead of setting up some abstraction functions,
and
>and on the massive amounts of copy-pasting between code for moving in all directions, and for almost identical objects like the players
The second one is particularly important, if you are not going to abstract similar code away you probably shouldn't be programming at all

Another thing is the case followed by four layers of if statements, that is almost certainly not the best way to handle it. Ever heard of "&&"? It's what EXPERT PROGRAMMERS use!!!!!
If you need more than 3 levels of indentation, you're screwed anyway, and should fix your program.

Name: Anonymous 2009-03-08 18:01

Separate input processing, game logic and drawing code or this won't be the last sleepless night you'll have maintaining your code. Or rewrite everything in Lisp.

PS: As-tu lu ton ``Structure et Interprétation des Programmes Informatiques'' aujourd'hui ?

Name: Anonymous 2009-03-08 18:07

Being entirely serious here, I would rather swim around in a cess pool than manage your code.

Name: Anonymous 2009-03-08 18:11

>>12
Did you mean Multimedia Fusion 2?

Name: Anonymous 2009-03-08 18:17

It's more programming then any of you /prog/ians could ever do.

Name: Anonymous 2009-03-08 18:37

>>17
To be fair, his program needs to be highly optimized, which means multiple levels of ifs. && operators are too slow.

>>21
Hello, >>1.

Name: Anonymous 2009-03-08 18:42

>>21
s/\/prog\/ians/\/prog\/-riders

Name: Anonymous 2009-03-08 18:55

>>21
ive written over 9000 lines of code

Name: Anonymous 2009-03-08 19:11

The gameplay will suck balls.

Name: >>17 2009-03-08 19:14

>>22
I know I was being picky and it probably compiles down to the same thing, but it is a damn site more annoying to read a multilayered if statement than when it is all on one line.

Name: Anonymous 2009-03-08 19:19

Needs more goto.

Name: Anonymous 2009-03-08 19:47

>>20
More like Multimedia Fusion -1: the Movie, the Game.

Name: Anonymous 2009-03-08 20:40

>>23
s!/prog/ians!/prog/-riders!

Name: Anonymous 2009-03-08 22:54

>>29
Hi AoRF.

Name: Anonymous 2009-03-09 0:29

>>26
probably
It's obviously the same thing. At the machine level it's a conditional jump whatever you use.

The function processes user input, even if there were 100 levels of "if" the (ridiculously low) delay would be completely transparent to the user. Optimizing is never about removing an if or two. Except for a password cracker, perhaps. A 2D game like this hardly needs optimization anyway.

When you reach Satori (and an understanding of cache & memory access) you'll get it.

Name: Anonymous 2009-03-09 0:45

>>31
programs must be written for people to read, and only incidentally for machines to execute.

Name: Anonymous 2009-03-09 0:54

>>32
>>31 did not say the opposite.

Name: Anonymous 2009-03-09 1:05

>>32
I actually conjure the spirits of the computer with my spells. Think about why you write code.

Name: Anonymous 2009-03-09 1:10

>>21
Truth.
Anyone that actually knows how to program could easily provide useful criticisms beyond PIG DISGUSTING, SCIP, questioning >>1 sexual orientation

Name: Anonymous 2009-03-09 4:38

>>35

You are >>21 and >>1

Also, someone that was forced to binge drink every day through their childhood could write the code in the OP's your picture.

Name: Anonymous 2009-03-09 4:55

>>36
( ≖‿≖)

Name: Anonymous 2009-03-09 5:46

Interesting. I have absolutely no experience with SDL, or games programming so I won't comment on the code I can see there. But I'd be curious in knowing more about the multiplayer aspect and how you keep the players in sync, and handle any dropped UDP packets.

Name: Anonymous 2009-03-09 6:22

>>38
I'll save you the trouble. >>1 is doing it wrong

Name: Anonymous 2009-03-09 8:28

Blit my anus.

Name: Anonymous 2009-03-09 9:02

VSYNC MY ANUS

Name: Anonymous 2009-03-09 11:51

>>22,36
Your comments aren't even useful ad hominem attacks, and even if they were, it would not negate the truth of >>21,35

Name: Anonymous 2009-03-09 12:12

>>42
hax my anus, fagort, this is /prog/, we're not here to help you but to give directions.

Name: Anonymous 2009-03-09 12:28

lawl at fagorts that think this board is about programming

Name: Anonymous 2009-03-09 16:48

the pleAsUre oF bEiNg CuMMED insIdE

Name: Anonymous 2009-03-09 20:24

>>43-44
Back to /b/, please.

Name: Anonymous 2009-03-09 20:28

>>45
Back to /lounge/, please.

Name: Anonymous 2009-03-10 0:45

>>2-47
Back to >>1, please.

Name: Anonymous 2009-03-10 2:40

>>48
OMG HAX!@

Name: Trollbot9000 2009-07-01 9:33

Absolutely nothing about python thread the other  tables called her  over There were  nights that i  already have a  limited amount of  existence the sidebar  the cursor will  turn into a  label one character  are best for  cleanly coded rapid.

Name: Anonymous 2011-02-04 15:10


Don't change these.
Name: Email:
Entire Thread Thread List