Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Poll

What programming topic would you want the next challenge to be about?  (It might be a good opportunity to focus on a subject you're not familiar with or to reinforce knowledge on one that you already know)

Control Flow
- 2 (2.2%)
Arrays, Strings, Pointers, and References
- 8 (9%)
Functions
- 4 (4.5%)
Basic object-oriented programming
- 30 (33.7%)
A bit more advanced OOP (Composition, Operator overloading, Inheritance, Virtual Functions)
- 18 (20.2%)
Templates
- 8 (9%)
Other (Explain)
- 4 (4.5%)
Working with files?  (Streams)
- 15 (16.9%)

Total Members Voted: 89


Pages: 1 ... 74 75 [76] 77 78

Author Topic: Programming Challenges & Resources (#bay12prog) Initiative  (Read 95637 times)

ILikePie

  • Bay Watcher
  • Call me Ron
    • View Profile
Re: Programming Challenges & Resources (#bay12prog) Initiative
« Reply #1125 on: April 16, 2011, 04:17:22 pm »

Just wrap it in an extern block and you should be fine.
Logged

qwertyuiopas

  • Bay Watcher
  • Photoshop is for elves who cannot use MSPaint.
    • View Profile
    • uristqwerty.ca, my current (barren) site.
Re: Programming Challenges & Resources (#bay12prog) Initiative
« Reply #1126 on: April 16, 2011, 04:22:39 pm »

If you have access to it, windows.h defines the struct exactly as it is written to the file. If you don't, then you might have padding problems if you get any of the types wrong or don't set it up just right.
Logged
Eh?
Eh!

Thendash

  • Bay Watcher
    • View Profile
Re: Programming Challenges & Resources (#bay12prog) Initiative
« Reply #1127 on: July 22, 2011, 09:11:43 pm »

I'm sure it's been asked before but it's sort of hard to search for, but in the off chance it hasn't I'll ask anyways. I know a decent amount of Java already, and I understand that C# is fairly "close" to Java so I'm trying to learn that as well. It all seems fairly straight forward and very similar to what I already know, but can anybody recommend a good C# book? I know I can find answers to all my questions online but I like to have books to use for reference so I'm looking for a book that's decently comprehensive and has example code.
Logged
Thendash's Livestream

This game could honestly give out hand jobs for free and people would still bitch.

HideousBeing

  • Bay Watcher
    • View Profile
Re: Programming Challenges & Resources (#bay12prog) Initiative
« Reply #1128 on: July 23, 2011, 11:15:14 pm »

So I'm a sophmore CS student now and I've been through my data structures and algorithms class (so much fun :D) and mostly know C++ stuff (Stroustrup is a prof here). Anyway... I want to do something awesome and am completely uninspired. Ironically, I'm in a coding mood and don't know what I want to do or learn. What does the bored programmer do?!
Logged

alfie275

  • Bay Watcher
    • View Profile
Re: Programming Challenges & Resources (#bay12prog) Initiative
« Reply #1129 on: July 24, 2011, 01:15:30 am »

Write your own language?
Logged
I do LP of videogames!
See here:
http://www.youtube.com/user/MrAlfie275

SolarShado

  • Bay Watcher
  • Psi-Blade => Your Back
    • View Profile
Re: Programming Challenges & Resources (#bay12prog) Initiative
« Reply #1130 on: July 24, 2011, 03:08:04 am »

Better still, write your own OS!
Logged
Avid (rabid?) Linux user. Preferred flavor: Arch

HideousBeing

  • Bay Watcher
    • View Profile
Re: Programming Challenges & Resources (#bay12prog) Initiative
« Reply #1131 on: July 24, 2011, 03:29:52 am »

Or even better: write my own OS in my own language. Didn't alf make his own OS before?

Anyway, I'm trying to find inspiration, so I'm throwing ideas at a bunch of people, which really is just me talking to myself at other people. I really want to do something that I could show other people (that don't program).

Maybe I could play with openGL -- the perlin noise generating stuff seems promising. Any particularly good openGL learning stuff? Any idea what version I should be learning (3.0?) And does anyone know any good general resources on learning graphical programming (matrices and linear algebra stuff I guess)?

With any luck I won't give up too quickly. The trick is small projects I guess.
Logged

alfie275

  • Bay Watcher
    • View Profile
Re: Programming Challenges & Resources (#bay12prog) Initiative
« Reply #1132 on: July 24, 2011, 04:03:18 am »

Try hooking into the desktop window (I think the function was GetDesktopWindow) and making your own desktop/explorer program.
Logged
I do LP of videogames!
See here:
http://www.youtube.com/user/MrAlfie275

TolyK

  • Bay Watcher
  • Nowan Ilfideme
    • View Profile
Re: Programming Challenges & Resources (#bay12prog) Initiative
« Reply #1133 on: August 01, 2011, 01:04:51 pm »

aaaalright...
so, I've started working on a minigame called "computer worm", it just takes characters from memory and prints them onto the console output (in color!), where the main character runs around, picks powerups, and tries to go as far as possible in a demi-randomly-generated landscape.
how does it sound?
>:D
(and no, I do not change the memory outside the program, i'll use Const references :P)
Logged
My Mafia Stats
just do whatevery tolyK and blame it as a bastard mod
Shakerag: Who are you personally suspicious of?
At this point?  TolyK.

alway

  • Bay Watcher
  • 🏳️‍⚧️
    • View Profile
Re: Programming Challenges & Resources (#bay12prog) Initiative
« Reply #1134 on: August 01, 2011, 01:23:01 pm »

I'm sure it's been asked before but it's sort of hard to search for, but in the off chance it hasn't I'll ask anyways. I know a decent amount of Java already, and I understand that C# is fairly "close" to Java so I'm trying to learn that as well. It all seems fairly straight forward and very similar to what I already know, but can anybody recommend a good C# book? I know I can find answers to all my questions online but I like to have books to use for reference so I'm looking for a book that's decently comprehensive and has example code.
I never actually used a book to learn it; MSDN (Microsoft developers network; website) is all you will probably need to learn C#. You may have used MSDN for other languages and found it ho-hum; and for most it is. However, C# was created by Microsoft, and as a result Microsoft is probably one of the est sources of info about it. MSDN has documentation and example code for pretty much every part of C#. It's common practice for those working with C# in RIT's Game Development major to have half a dozen msdn tabs open as references.


http://msdn.microsoft.com/en-us/library/kx37x362(v=VS.80).aspx            <----- there's the main page for C#, though it's easier to search for whatever you need help for (as msdn's articles are all indexed by search engines so you don't need to wade through website layers)

In your case, if you're moving from Java, the 'migrating to visual C#' may be the section you want to start with. You mentioned wanting a book; but quite frankly, you don't need one. Through the 2 quarters in which I learned C# last year, despite having the book, I never once felt like I needed to open it.
Logged

Shades

  • Bay Watcher
    • View Profile
Re: Programming Challenges & Resources (#bay12prog) Initiative
« Reply #1135 on: September 15, 2011, 10:51:37 am »

Another resource for the list: http://www.castingcode.tv/
I say resource, mostly I'm being hopeful it will be useful as it's not live yet but apparently they will stream live coding sessions so it could be useful for those unwilling to trawl through books :)
Logged
Its like playing god with sentient legos. - They Got Leader
[Dwarf Fortress] plays like a dizzyingly complex hybrid of Dungeon Keeper and The Sims, if all your little people were manic-depressive alcoholics. - tv tropes
You don't use science to show that you're right, you use science to become right. - xkcd

Derekristow

  • Bay Watcher
    • View Profile
    • Steam ID
Re: Programming Challenges & Resources (#bay12prog) Initiative
« Reply #1136 on: October 10, 2011, 10:25:31 pm »

Hey, I've been working on a 2D collision engine that can deal with possibly concave polygons.  It's been detecting collision fine, but now I'm trying to set it up so that if the player runs into a wall they slide along it, and it isn't really working out in any meaningful sense.  I'm at the point where I can't help but think that there's a better/easier way, and I was wondering if you guys could tell me whether or not I'm headed down the right path. 

I'm currently having it go through both of the colliding polygons, checking every line against every other line using Separating Axis Theory to check for collision.  Once it finds a collision, it creates a projection vector to move the player along that stops the collision.  Right now, the player is basically being thrown in random directions, if it's moved from its original path at all.  It is however still always detecting collision.  I can provide code if you think that would help, but I'm mostly wondering if this is the right path to go down to get this working the way I want it, or if there is a better/easier way.
Logged
So my crundles are staying intact unless they're newly spawned... until they are exposed to anything that isn't at room temperature.  This mostly seems to mean blood, specifically, their own.  Then they go poof very quickly.

eerr

  • Bay Watcher
    • View Profile
Re: Programming Challenges & Resources (#bay12prog) Initiative
« Reply #1137 on: October 12, 2011, 05:24:25 pm »

I'm no expert, but stop all movment on the perpendicular axis?

use gigantic polygons so you can diagnose the difference between an edge collision and a flat collision?
Logged

Siquo

  • Bay Watcher
  • Procedurally generated
    • View Profile
Re: Programming Challenges & Resources (#bay12prog) Initiative
« Reply #1138 on: October 14, 2011, 01:24:51 pm »

Okay this has been bugging me to no end:

Code: [Select]
    public void centerViewPort(GamePhysical gp){
        Vec3 p = getScreenLoc(gp); // This gets the pixel locations on screen for object gp (the character)
        if(p.x < viewWidth /3){
        viewPortX = -((int)p.x -viewPortX- viewWidth/3);
        }
        if(p.x > viewWidth * 2/3){
        viewPortX = -((int)p.x -viewPortX - 2*viewWidth/3);
        }
        if(p.y < viewHeight /3){
        viewPortY = -((int)p.y -viewPortX- viewPortY-viewHeight/3);
        }
        if(p.y > viewHeight * 2/3){
        viewPortY = -((int)p.y -viewPortX- viewPortY-2*viewHeight/3);
        }
    }
viewWidth/height are width and height of the viewport, and p is relative to the viewport. (so should return the screen x/y)

It's not centering on gp. Why?
Logged

This one thread is mine. MIIIIINE!!! And it will remain a happy, friendly, encouraging place, whether you lot like it or not. 
will rena,eme sique to sique sxds-- siquo if sucessufil
(cant spel siqou a. every speling looks wroing (hate this))

Rose

  • Bay Watcher
  • Resident Elf
    • View Profile
Re: Programming Challenges & Resources (#bay12prog) Initiative
« Reply #1139 on: October 14, 2011, 01:28:37 pm »

what's it centering on?
Logged
Pages: 1 ... 74 75 [76] 77 78