• What do you need help with? V4 (January 2012)
    966 replies, posted
  • [QUOTE=dajoh;34409766]You have to link to SFML in "Game Project".[/QUOTE] Welp, that's pretty lame, but it worked. Thanks~
  • [QUOTE=Lord Ned;34406106]Why not just draw everything bigger on a bigger screen?[/QUOTE] The problem here is handling different screen resolutions. I want to draw a scene of the same size(1024,768) on different screen resolutions. Take Facewound for example. Here are screenshots when running the game in 640x480 and 1024x768. It is obviously the same scene, and if we count the tiles (32x32), we see that the original scene is 1024 pixels wide and it is somehow rendered on 640x480. In my game if I change the screen resolution, the size of the scene that will be rendered depends on the size of the bacbuffer.So if it is 640x480, it just renders the upper left corner of the size 640x480. But I want the whole 1024x768 be rendered on 640x480 and not just the upper left part. 640x480 [img]http://i.imgur.com/tOdNy.jpg[/img] 1024x768 [img]http://i.imgur.com/Va6xw.jpg[/img] [QUOTE=Lord Ned;34406106] If you're working on a 2D game, can't you draw it using an Orthographic projection that causes the objects to be bigger?[/QUOTE] I am using ID3DXSprite object to render sprites, I am not rendering textured quads using Orthographic projection (I don't know how to do that, so if anyone knows a good article on that subject...).
  • As part of a Java school assignment, I have to work several GUI elements into a single window. Already have an image and a label attached to it but when I want to insert the text field, it takes up the entire screen, also covering the label.
  • I have a college Project(one every week) that uses RAPTOR, a free programming, er...program? The thing is, my Professor dude doesn't explain how to use RAPTOR very well, and his tutorials aren't exactly helpful, coupled with the fact I have never programmed before (the class is intro to computer programming, need it for Game Design stuff), and have ZERO knowledge of anything involving programming, and the RAPTOR program. Here is what he wants us to do; [QUOTE]The Requirements Create a weekly payroll program for hourly-rated employees. All employees are paid the same hourly rate, $18.00 per hour. Regular weekly pay is the product of hours worked times the hourly rate, but overtime applies, too. Overtime occurs if an employee works more than forty hours in a week. Employees who have worked overtime are paid "time and a half" for the hours in excess of forty hours. Finally, income tax at 25% of gross pay is deducted from all paychecks. Your RAPTOR program should prompt for the weekly hours worked and then output a payroll report showing: the weekly hours worked. the regular weekly pay. the overtime pay (could be zero). the weekly gross pay. the income tax deducted. the weekly net pay. NOTE: All pay items should display as currency. YOUR ASSIGNMENT Part 1 Work through an algorithm for the payroll program and submit pseudocode for this algorithm. Part 2 Use your pseudocode to create the RAPTOR flowchart program.[/QUOTE] I don't understand what pseudocode is exactly, or how to go about doing this thing. Anyone know how to dumb down an explanation for a pure beginner to this stuff?
  • [QUOTE=Dragoshi1;34419917]I have a college Project(one every week) that uses RAPTOR, a free programming, er...program? The thing is, my Professor dude doesn't explain how to use RAPTOR very well, and his tutorials aren't exactly helpful, coupled with the fact I have never programmed before (the class is intro to computer programming, need it for Game Design stuff), and have ZERO knowledge of anything involving programming, and the RAPTOR program. Here is what he wants us to do; I don't understand what pseudocode is exactly, or how to go about doing this thing. Anyone know how to dumb down an explanation for a pure beginner to this stuff?[/QUOTE] I may be mistaken here but isn't pseudocode code that's written specifically to make it easier for the user to read as opposed to the compiler?
  • I have no idea. Until before the class, I didn't even know the word "pseudocode".
  • Pseudocode means writing a series of steps that's structured [i]like[/i] a program, but isn't actually written in any particular programming language. Think of it as an informal outline of a program's flow. For example, you could write something like: [code] if (employee has worked more than 40 hours) { subtract 40 to determine how much overtime [i]...etc.[/i] } [/code] Think of it as a mix of plain English and whatever programming languages you know.
  • [QUOTE=Sir Whoopsalot;34420525]I may be mistaken here but isn't pseudocode code that's written specifically to make it easier for the user to read as opposed to the compiler?[/QUOTE] Yes, it just lays out the general functions of the code in a half english, half code way like so (from wikipedia) [code]function factorial is: input: integer n such that n >= 0 output: [n × (n-1) × (n-2) × … × 1] 1. if n is 0, return 1 2. otherwise, return [ n × factorial(n-1) ] end factorial[/code]
  • In C# what do I have to do to parse [url]http://apps.ohlulz.com/rtmpgui/xanList.php[/url]? I've got [CODE] xDoc.Load("http://apps.ohlulz.com/rtmpgui/xanList.php"); this.Text = "XanPlayer » remote list"; int c = xDoc.GetElementsByTagName("item").Count; tsslStreamCount.Text = c.ToString() + " streams"; int i = 0; while (i < c) { xanRows.Rows.Add(new Row()); xanRows.Rows[i].Cells.Add(new Cell("", false)); xanRows.Rows[i].Cells.Add(new Cell(xDoc.GetElementsByTagName("title")[i].InnerText)); xanRows.Rows[i].Cells.Add(new Cell(xDoc.GetElementsByTagName("link")[i].InnerText)); xanRows.Rows[i].Cells.Add(new Cell(xDoc.SelectSingleNode("/Channels/item/link/@swfUrl[i]").Value)); xanRows.Rows[i].Cells.Add(new Cell(xDoc.SelectSingleNode("/Channels/item/link/@pageUrl[i]").Value)); xanRows.Rows[i].Cells.Add(new Cell(xDoc.SelectSingleNode("/Channels/item/link/@playpath[i]").Value)); i++; }[/CODE]
  • [QUOTE=affail;34423156]In C# what do I have to do to parse [url]http://apps.ohlulz.com/rtmpgui/xanList.php[/url]? I've got [CODE]-snip-[/CODE][/QUOTE] [url]http://stackoverflow.com/questions/55828/best-practices-to-parse-xml-files[/url]
  • Not sure whether to post this here or in Web Dev. Basically I'm trying to write a little blog engine in go. Somewhere along the line, though, it's doing something funky with my URLs. I want to be able to tell if a request is being made over https. I should be able to use the "scheme" field of the [url=http://weekly.golang.org/pkg/net/url/#URL]URL[/url], but it gives me "http" regardless of whether it's HTTP or HTTPS. The web server is lighttpd, and it communicates with the go process using FCGI over a UNIX-domain socket.
  • For authentication. I don't want to serve a user a session ID over an unsecure connection.
  • Phone Operating systems. There are plenty of phone operating systems... What language reaches the most operating systems? If I want to reach all phone OS's ... What languages do I have to learn?
  • [QUOTE=Sprite;34428328]Phone Operating systems. There are plenty of phone operating systems... What language reaches the most operating systems? If I want to reach all phone OS's ... What languages do I have to learn?[/QUOTE] Java Mobile Edition [editline]28th January 2012[/editline] Erh.. Micro Edition, sorry.
  • Best DB language for polls? SQL or Oracle or other? Just being paranoid-ly safe. I don't know much about the differences. [editline]28th January 2012[/editline] so right now I'm using MySQL [editline]28th January 2012[/editline] [QUOTE=T3hGamerDK;34428751]Java Mobile Edition [editline]28th January 2012[/editline] Erh.. Micro Edition, sorry.[/QUOTE] And this covers all phone OS? I just want to be sure [editline]28th January 2012[/editline] can tables/fields be named 1 letter? I'm trying to reduce expensive string parsing for my requests as much as possible.
  • It's worse than I thought... it's not even differentiating between GET and POST. FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF. Well, I got that figured out, it was the routing library I was using that was screwing up GET/POST. However, the problem of it dropping the protocol still remains. Web dev sucks. I dunno how people do this and not go insane.
  • Anyone have any idea how I can test out multi-threading performance gains in C#? ( what type of algo )
  • Simple Java question here: I'm writing a Java program that uses multiple .java files. The main one I'm writing is called ExtremeHotelBooking.java and the one I'm trying to access is BasicCalendar.java. I need to access one of the constructors in BasicCalendar, but I'm not having much success reaching it. The line of code in question in ExtremeHotelBooking is [code]BasicCalendar basicCal = new BasicCalendar();[/code] and when I try to add something like [code]basicCal.BasicCalendar();[/code] it returns an error. The BasicCalendar constructors are public, so I know that's not the problem. Can someone help me out? [editline]28th January 2012[/editline] Never mind, I figured it out.
  • Would somebody explain to me in Java how you would format a string? I keep seeing examples like this in the tutorials I'm using: [code]public String toMilitary(){ return String.format("%02d:%02d:%02d", getHour(), ) } [/code] And I don't really get how you implement formatting and where you should, or anything about it. Would someone help?
  • Hi guys I just started trying to learn DirectX, my C++ isn't the best either but I thought I could catch up on both at the same time, there's this exercise in a book I'm working from which requires I check if my hardware supports the Multisample Types 2 & 16 in both Windowed and Full Screen mode and if it supports those in D3DFMT_X8R8G8B8/D3DFMT_R5G6B5 all of this is supposed to be output to a file. Anyway here's my attempt at coding this (Sorry cant [Code] it stretches the page :suicide:): [img]http://i40.tinypic.com/li6v4.jpg[/img] It all seems fine, I index through each array which I use as variables for the CheckDeviceMultiSampleType function but I get this on my output file: [code] MultiSample Type = 2 Windowed = 1 Format = 22 Support = IS NOT SUPPORTED!!! MultiSample Type = 2 Windowed = 1 Format = 22 Support = IS NOT SUPPORTED!!! MultiSample Type = 2 Windowed = 1 Format = 22 Support = IS NOT SUPPORTED!!! MultiSample Type = 2 Windowed = 1 Format = 23 Support = IS NOT SUPPORTED!!! MultiSample Type = 2 Windowed = 0 Format = 22 Support = IS NOT SUPPORTED!!! MultiSample Type = 2 Windowed = 0 Format = 22 Support = IS NOT SUPPORTED!!! MultiSample Type = 2 Windowed = 0 Format = 23 Support = IS NOT SUPPORTED!!! MultiSample Type = 16 Windowed = 1 Format = 22 Support = IS NOT SUPPORTED!!! MultiSample Type = 16 Windowed = 1 Format = 22 Support = IS NOT SUPPORTED!!! MultiSample Type = 16 Windowed = 1 Format = 22 Support = IS NOT SUPPORTED!!! MultiSample Type = 16 Windowed = 1 Format = 23 Support = IS NOT SUPPORTED!!! MultiSample Type = 16 Windowed = 0 Format = 22 Support = IS NOT SUPPORTED!!! MultiSample Type = 16 Windowed = 0 Format = 22 Support = IS NOT SUPPORTED!!! MultiSample Type = 16 Windowed = 0 Format = 23 Support = IS NOT SUPPORTED!!! [/code] I don't understand why everything is apparently not supported, surely multisampling is supposed to work in those given formats, I also don't understand why it outputs 2 extra lines for Windowed and 1 Extra Line for not Windowed. Sorry I'm new to all of this but surely there's an easy way to try each of these parameters without having to do each separately and without having to go through making the variables into arrays and indexing them. DAMMIT It was so simple I just realised I put '= D3D_OK' not '== D3D_OK' doesn't matter I just did '(SUCCEEDED(SmpSupport)'. Still don't know what the extra lines are from or if there's an easier way of doing this: [code]MultiSample Type = 2 Windowed = 1 Format = 22 Support = IS SUPPORTED!!! MultiSample Type = 2 Windowed = 1 Format = 22 Support = IS SUPPORTED!!! MultiSample Type = 2 Windowed = 1 Format = 22 Support = IS SUPPORTED!!! MultiSample Type = 2 Windowed = 1 Format = 23 Support = IS SUPPORTED!!! MultiSample Type = 2 Windowed = 0 Format = 22 Support = IS SUPPORTED!!! MultiSample Type = 2 Windowed = 0 Format = 22 Support = IS SUPPORTED!!! MultiSample Type = 2 Windowed = 0 Format = 23 Support = IS SUPPORTED!!! MultiSample Type = 16 Windowed = 1 Format = 22 Support = IS NOT SUPPORTED!!! MultiSample Type = 16 Windowed = 1 Format = 22 Support = IS NOT SUPPORTED!!! MultiSample Type = 16 Windowed = 1 Format = 22 Support = IS NOT SUPPORTED!!! MultiSample Type = 16 Windowed = 1 Format = 23 Support = IS NOT SUPPORTED!!! MultiSample Type = 16 Windowed = 0 Format = 22 Support = IS NOT SUPPORTED!!! MultiSample Type = 16 Windowed = 0 Format = 22 Support = IS NOT SUPPORTED!!! MultiSample Type = 16 Windowed = 0 Format = 23 Support = IS NOT SUPPORTED!!! [/code]
  • Are there any negative reprocutions of simply moving an object by setting it's co ordinates when it's colliding with something rather than making it's velocity change to go out of the object? [editline]29th January 2012[/editline] And is there a problem with only doing actions every certain amount of game ticks? Like rather than moving the player each frame, you move them only when a tick passed which would be a predetermined amount of time.
  • [QUOTE=WTF Nuke;34440758]Are there any negative reprocutions of simply moving an object by setting it's co ordinates when it's colliding with something rather than making it's velocity change to go out of the object?[/QUOTE] If the object doesn't bounce, no. Otherwise, you'll lose momentum. [QUOTE=WTF Nuke;34440758]And is there a problem with only doing actions every certain amount of game ticks? Like rather than moving the player each frame, you move them only when a tick passed which would be a predetermined amount of time.[/QUOTE] No, just interpolate between the last and the next tick each frame.
  • [QUOTE=WTF Nuke;34440758]Are there any negative reprocutions of simply moving an object by setting it's co ordinates when it's colliding with something rather than making it's velocity change to go out of the object?[/QUOTE] You should be doing both. Update position and velocity.
  • [QUOTE=Zally13;34438036]Would somebody explain to me in Java how you would format a string? I keep seeing examples like this in the tutorials I'm using: [code]public String toMilitary(){ return String.format("%02d:%02d:%02d", getHour(), ) } [/code] And I don't really get how you implement formatting and where you should, or anything about it. Would someone help?[/QUOTE] Formatting is just a way to print data in a way you find useful. In that example, the "%02d" sequences are the format specifiers. (Can't remember the official name at the moment) The 02 means that up to two digits should print, and 'd' just means that the variable to print is an integer. You should implement formatting any time there isn't a clear way to simply print an object how you want to. Actually, I'm not very sure about Java, but in some languages it's the only (best) way to print numbers.
  • I've just downloaded the Android SDK and set up a virtual device. When I start it up, it remains like this: [img]http://puu.sh/eZbF[/img] It's been like that for around 15 minutes now -- is that normal? I've tried deleting the virtual device and creating a new one to no avail; I'm thinking I should reinstall the SDK components. [editline]29th January 2012[/editline] Problem fixed... turns out it just takes around half an hour to boot :/
  • [QUOTE=aerochug;34445225]I've just downloaded the Android SDK and set up a virtual device. When I start it up, it remains like this: [img]http://puu.sh/eZbF[/img] It's been like that for around 15 minutes now -- is that normal? I've tried deleting the virtual device and creating a new one to no avail; I'm thinking I should reinstall the SDK components. [editline]29th January 2012[/editline] Problem fixed... turns out it just takes around half an hour to boot :/[/QUOTE] Welcome to the Android emulator :P
  • I'm completely new to C++, just making a test program to try out stuff. Anyway, here's the part of the code i'm getting problems with: [code]cin >> (b, ageless); cout <<"Your age is " <<(b, ageless); {if (b < 30) cout <<"You are too young"}[/code] And the problem is, no matter what b is, "You are too young" message ALWAYS pop up. help?