• What Do You Need Help With? V6
    7,544 replies, posted
Multitasking?
I dont know if this is the right thread, but the university I want to transfer to (im at community college) wants me to take an assembly class before I transfer. That would be the fifth class they require, so I would need 5 semesters at this college. However, if the instructor allows me, I can take CSC 205 (computer organization) and CSC 206 (Assembly) at the same time. would this be a bad idea? the alternative is to take CSC 202 and math 174 (analytical geometry with calculus II) during the summer, which could be a faster paced class. Which sounds less risky from a GPA perspective? also is it normal for an underclassmen to take assembly?
[QUOTE=proboardslol;46456273]I dont know if this is the right thread, but the university I want to transfer to (im at community college) wants me to take an assembly class before I transfer. That would be the fifth class they require, so I would need 5 semesters at this college. However, if the instructor allows me, I can take CSC 205 (computer organization) and CSC 206 (Assembly) at the same time. would this be a bad idea? the alternative is to take CSC 202 and math 174 (analytical geometry with calculus II) during the summer, which could be a faster paced class. Which sounds less risky from a GPA perspective? also is it normal for an underclassmen to take assembly?[/QUOTE] My uni stopped requiring ASM classes some years ago, merging them into the Computer Systems Architectures class. I would imagine you'd probably be fine taking 205 and 206 concurrently. As to which is a better move? That's up to you.
[QUOTE=proboardslol;46456273]also is it normal for an underclassmen to take assembly?[/QUOTE] Assembly language itself helps you understand how processors work, so I don't think that's too strange. The CSA class we're supposed to take in second term involves it. That course probably doesn't intend to turn you into a leet democoder.
[QUOTE=AnonTakesOver;46452828]Urgh! XNA is stupid sometimes, I am trying to load a WAV file, everything is correct, I have the file in the root Content folder, I have changed the properties to copy to output folder, the wav is a signed 16 bit pcm, 2 channel, 44100 Hz file. I am stuck, google won't help, I can load jpg's fine, but not wav, even converted it to a mp3 and tried using the Song class. So fucking annoying. [code] SoundEffect IFuckingHateThisShit = Content.Load<SoundEffect>("fuckyou"); [/code] That is in the LoadContent method. file name is fuckyou.wav, I can open it through VS, it plays fine. What the fuck is happening.[/QUOTE] When you say you can open it through VS do you mean in Debug mode or? I'm not familiar with XNA but did you try adding the extension ".wav" to the string literal? [editline]10th November 2014[/editline] Erm, nm...
Is there a way I can make an android app that can read pointer values that I feed it? I basically need to make a little cheat engine, all I need to do find the pointer that contains a value, then once I find the right pointer, I just need to use that information for other things, I don't need to modify the value, just read it. Anyone have any clue? Google is being a bit eh right now I need to do this in code by the way, I don't want to use a pre-existing app. If someone could just push me in the right direction, it would be great. (The language is java)
[QUOTE=AnonTakesOver;46460548]Is there a way I can make an android app that can read pointer values that I feed it? I basically need to make a little cheat engine, all I need to do find the pointer that contains a value, then once I find the right pointer, I just need to use that information for other things, I don't need to modify the value, just read it. Anyone have any clue? Google is being a bit eh right now I need to do this in code by the way, I don't want to use a pre-existing app. If someone could just push me in the right direction, it would be great. (The language is java)[/QUOTE] I am pretty sure thats not possible unless you have a rooted/jailbroken phone.
[QUOTE=MistyVermin;46463906]I am pretty sure thats not possible unless you have a rooted/jailbroken phone.[/QUOTE] Rooting an Android device is piss easy. [editline]11th November 2014[/editline] That is, that note is hardly relevant on its own.
Yes my android is rooted, I need to find a library or something for me to have access to memory, anyone know any?
[QUOTE=AnonTakesOver;46465186]Yes my android is rooted, I need to find a library or something for me to have access to memory, anyone know any?[/QUOTE] Can't Java do this on it's own though? It's been a looong time since I've actually seriously looked at a piece of Java code since all I do is C and shell code.
[QUOTE=mastersrp;46465233]Can't Java do this on it's own though? It's been a looong time since I've actually seriously looked at a piece of Java code since all I do is C and shell code.[/QUOTE] Is there any way to mute sound of Awesomium true lua or javascript?
[QUOTE=MistyVermin;46463906]I am pretty sure thats not possible unless you have a rooted/jailbroken phone.[/QUOTE] Memory editors for Android do exist already, and they do require root access.
I'm making a little racing game in Unity and I'd like to do something like this for steering. [IMG]http://i.imgur.com/LTk6V03.png[/IMG] Right now it just travels at the steering direction, but i would like it to be between the inertia and steering direction, getting closer to the inertia line as mass and speed increase, and closer to the steering line as grip increases. Problem is I'm complete shit at coding this sort of thing.
[QUOTE=laserpanda;46469433]I'm making a little racing game in Unity and I'd like to do something like this for steering. [IMG]http://i.imgur.com/LTk6V03.png[/IMG] Right now it just travels at the steering direction, but i would like it to be between the inertia and steering direction, getting closer to the inertia line as mass and speed increase, and closer to the steering line as grip increases. Problem is I'm complete shit at coding this sort of thing.[/QUOTE] Model it after a physics model, these things will sort out themselves. Start off with - The car has a mass - The car has a velocity - You apply acceleration in the direction that the wheels are faced. When you get that down, it will somewhat control like a spaceship rather then a car, so add some car like resistance/friction. - Friction based on difference between velocity angle and wheel angle (so drifting has higher resistance then driving in a line) it will require a lot of tweaking of numbers to get something that feels right. [url]http://www.yaldex.com/games-programming/0672323699_ch13lev1sec1.html[/url]
[QUOTE=laserpanda;46469433]I'm making a little racing game in Unity and I'd like to do something like this for steering. [IMG]http://i.imgur.com/LTk6V03.png[/IMG] Right now it just travels at the steering direction, but i would like it to be between the inertia and steering direction, getting closer to the inertia line as mass and speed increase, and closer to the steering line as grip increases. Problem is I'm complete shit at coding this sort of thing.[/QUOTE] I used this to make a top down car game: [url]http://www.iforce2d.net/b2dtut/top-down-car[/url]
So whenever I try to scanf("%s", &name) it only prints out the first part of the name and not the second part. So if I input Michael Jackson, it only prints out Michael and not Jackson. How do I fix this? Also, is the array to save the name one dimensional or two dimensional?
[QUOTE=frdrckk;46470577]So whenever I try to scanf("%s", &name) it only prints out the first part of the name and not the second part. So if I input Michael Jackson, it only prints out Michael and not Jackson. How do I fix this? Also, is the array to save the name one dimensional or two dimensional?[/QUOTE] scanf("%s", ...) stops when it finds a space, its specified in the documentation for the function, use %c instead to grab a single character and repeat until you have all the input you want. The way to do it [B]using scanf[/B], is by doing something along the lines of [cpp]char buffer [1024]; int i; for(i = 0; i < 1024;i++) { scanf("%c", &buffer[i]) if(buffer[i] == '\n') // Stop when newline is reached break; } buffer[i] = '\0';[/cpp] However the better/easier way to do it is [B]using fgets[/B] (seriously don't use "gets", always use "fgets") [cpp] char buffer[1024]; fgets(buffer, sizeof(buffer), stdin) [/cpp] [editline]12th November 2014[/editline] Check out the stl api reference next time, [url]http://www.cplusplus.com/reference/cstdio/[/url]
[QUOTE=DrTaxi;46465584]Memory editors for Android do exist already, and they do require root access.[/QUOTE] Yes I know this I was just making sure he wasn't getting ahead of himself if he didn't even have a rooted phone already.
Are there better i/o libraries other than the standard library?
I have a problem that has to do with time, what I want to do is have a server that starts a timer, sends a packet to connected clients to start their timer. The client then stops the timer, sends this info to the server and by that messaging that the client is done. The problem I have is, how would I go on about synchronizing these timers at the starting point? Since the server starts its timer, sends a packet and then the client receives it and starts the timer, there is a delay.
[QUOTE=proboardslol;46471638]Are there better i/o libraries other than the standard library?[/QUOTE] Depends on what you want to do. If you're doing C++, there's also Boost, which does provide some nice things, such as iterators of paths and shit.
[QUOTE=proboardslol;46471638]Are there better i/o libraries other than the standard library?[/QUOTE] Language?
[QUOTE=Cold;46471762]Language?[/QUOTE] sorry, I mean for C/C++ when I said standard library
[QUOTE=Hugg;46471748]I have a problem that has to do with time, what I want to do is have a server that starts a timer, sends a packet to connected clients to start their timer. The client then stops the timer, sends this info to the server and by that messaging that the client is done. The problem I have is, how would I go on about synchronizing these timers at the starting point? Since the server starts its timer, sends a packet and then the client receives it and starts the timer, there is a delay.[/QUOTE] Send a timestamp for the initiation too? [editline]12th November 2014[/editline] What I mean by this is either have the server or client (or both) keep track of timestamps.
I made a quick little test in python by sending time.time() from the server to the client and then the client calculates the diff (its time.time() - received time). When the client stops the timer I just subtract the diff, seems to be working fine so far. The timers don't need to be that precise anyway (eventually all the clients are gonna be on the same local network and connected using ethernet cables so the latency might be in under 100ms for the whole timing process). All the results are gonna be in seconds anyway..
[QUOTE=Hugg;46473920]I made a quick little test in python by sending time.time() from the server to the client and then the client calculates the diff (its time.time() - received time). When the client stops the timer I just subtract the diff, seems to be working fine so far. The timers don't need to be that precise anyway (eventually all the clients are gonna be on the same local network and connected using ethernet cables so the latency might be in under 100ms for the whole timing process). All the results are gonna be in seconds anyway..[/QUOTE] Just because I suck horribly at mathematics (even the simplest), I would advice anyone else doing shit like that to, if you can't get your head to work right like I can't, use abs( [calculation] ) when calculating a difference. That always returns a positive number, regardless of numbers, ensuring that the difference is usable. A difference of -4 is not really useful.
I'm figuring out how Boost::Any works and I saw this scary ass line somewhere in there that looks like a default constructor parameter. I don't know how this syntax is even possible. There's no variable name after the asterisk and it can't be operator overloading either, so how can you assign to that monstrosity below? [code]typename boost::disable_if<boost::is_same<any&, ValueType> >::type* = 0[/code] Here's the code it's part of. I don't expect anyone to understand it but I hope it gives some hints. [code]// Perfect forwarding of ValueType template<typename ValueType> any(ValueType&& value , typename boost::disable_if<boost::is_same<any&, ValueType> >::type* = 0 // disable if value has type `any&` , typename boost::disable_if<boost::is_const<ValueType> >::type* = 0) // disable if value has type `const ValueType&&` : content(new holder< typename decay<ValueType>::type >(static_cast<ValueType&&>(value))) { }[/code]
I'm trying to add a particle effect when an enemy dies: [code] public boolean toBeRemoved() { if (health == 0 || intersectsWithPlayer()) { // Sprite t = enemySprite; // ParticleEntity deathParticle = new ParticleEntity(t); // deathParticle.setPos((int)t.getPosition().x, (int)t.getPosition().y); // deathParticle.setRotation(t.getRotation()); // GameScreen.addEntity(deathParticle); Audio.playSound("enemydeath.wav", 1/size); return true; } else { return false; } }[/code] I draw the entities and check for removal here: [code] public void show() { ... // iterate through entities for (Iterator<Entity> it = entities.iterator(); it.hasNext(); ) { Entity e = it.next(); e.draw(); e.update(dt); if (e.toBeRemoved()) { it.remove(); } } ...[/code] However, this (obviously) returns a concurrent modification exception. How can I avoid this?
Assuming you're using an ArrayList to store your enemies, consider checking out [url=https://docs.oracle.com/javase/7/docs/api/java/util/concurrent/CopyOnWriteArrayList.html]CopyOnWriteArrayList.[/url] It's not the most ideal solution if you're adding and removing entities really often, however.
[QUOTE=elevate;46474997]I'm figuring out how Boost::Any works and I saw this scary ass line somewhere in there that looks like a default constructor parameter. I don't know how this syntax is even possible. There's no variable name after the asterisk and it can't be operator overloading either, so how can you assign to that monstrosity below? [code]typename boost::disable_if<boost::is_same<any&, ValueType> >::type* = 0[/code] Here's the code it's part of. I don't expect anyone to understand it but I hope it gives some hints. [code]// Perfect forwarding of ValueType template<typename ValueType> any(ValueType&& value , typename boost::disable_if<boost::is_same<any&, ValueType> >::type* = 0 // disable if value has type `any&` , typename boost::disable_if<boost::is_const<ValueType> >::type* = 0) // disable if value has type `const ValueType&&` : content(new holder< typename decay<ValueType>::type >(static_cast<ValueType&&>(value))) { }[/code][/QUOTE] In disable_if<T>, if T::value is true (template helpers such as is_same and such have a member called value) then disable_if<T>::type does not exist and so attempting to assign to a variable of type disable_if<T>::type will result in a compiler error. By default disable_if<T>::type is void. I guess they use type* instead because you can't assign to void. Basically the syntax is such that the template has 3 parameters, but the last 2 are actually template value parameters instead of just types or classes. The last 2 are also defaulted to 0 and are of type boost::disable_if<T>::type*, which is void*.
Sorry, you need to Log In to post a reply to this thread.