d2jsp
Log InRegister
d2jsp Forums > Off-Topic > Computers & IT > Programming & Development > Can Anyone Help Me With This Idea
Add Reply New Topic New Poll
Member
Posts: 23,862
Joined: Aug 16 2006
Gold: 20.00
Aug 23 2013 04:09am
Someone wanted me to try and make a program to simulate a very small aspect of the game Dota 2.


The aspect in question is the shop.

I am trying to build it myself, but I have never done any GUI programming really, other than a shitty app in java.


What I am trying to build:



http://www.youtube.com/watch?v=Dm0kmyIOJS4

^-- a video of the shop in action

pardon the shitty art, but here is the break down:


It is a rectangular panel as shown

There are 2 main tabs located at the very top. Swapping between them shows a different list of things below, INCLUDING new sub tabs

The blocks located under the 2 main tabs are sub tabs. Each one also contains an image

Sub tabs show a different list of the things below

The things below are horizontal lines. Each one contains:

An image
A string (name of the item)
A price (just another string most likely)
A on-mouse-hover event which displays a new pane with an image and some strings
An on-mouse-click event that displays each items 'sub parts' in a place on the bottom of the frame.



I am trying to figure out what language to use and what libraries I would need to complete this, I honestly have no idea where to go. I know java has swing, but I did pick up visual studio 2010 recently and was possibly considering using C#.

Should these different parts be done as objects?

Member
Posts: 237
Joined: Aug 6 2011
Gold: 6,026.00
Aug 23 2013 08:59am
Depends on your approach:

Desktop app:

Win only: winapi with C# or C/C++
Multi OS: gnome or Qt or any crossplatform UI framework of your liking. Java works too, but I have no experience with it so I can't really help

Full graphics game:
OpenGL or DirectDraw/D3D if you're homo for Win. Compared to the other libraries, you'll have to build the entire object message framework yourself. High level of graphic customisation

app-less alternatives:
html and its buddies: css, js, jquery
flash

As far as oop goes, i guess:
1 object for holding and maintain item data: text, price, pics and whatnot
1 object for graphic representation of item and message loop handling
1 object for the tab framework
Member
Posts: 2,478
Joined: Jan 4 2007
Gold: 7,545.00
Aug 23 2013 11:24am
If you're going to be on Windows only, I would recommend C# using xaml. It would be super easy to create some custom list controls that contain an image + text and then populate that list with your objects that would contain the image + text.
Xaml is super powerful for data binding and this could be leveraged for your project.
Member
Posts: 23,862
Joined: Aug 16 2006
Gold: 20.00
Aug 23 2013 11:54am
Yeah my bad. Let's say windows only, just an app (not a full game or anything)

anyone have a rough idea of what tools I might need to finish this? (particular libraries or maybe a good resource)

I literally have no experience with xaml or any of c# and its libraries

This post was edited by Eep on Aug 23 2013 11:58am
Member
Posts: 23,862
Joined: Aug 16 2006
Gold: 20.00
Aug 23 2013 01:09pm
silly question but in C#


when I go to 'view code' it always takes me back to the form1 source


If I have a button that I want to do stuff on click, do I have to go to the buttons properties, under the events tab, create a new event for mouse click and then go from there?

I have multiple buttons and when I tried to create an event it seemed rather ambiguous with the naming conventions it was using.

This post was edited by Eep on Aug 23 2013 01:11pm
Member
Posts: 11,610
Joined: Oct 28 2008
Gold: 1,795.00
Aug 23 2013 02:59pm
Quote (Eep @ Aug 23 2013 02:09pm)
silly question but in C#


when I go to 'view code' it always takes me back to the form1 source


If I have a button that I want to do stuff on click, do I have to go to the buttons properties, under the events tab, create a new event for mouse click and then go from there?

I have multiple buttons and when I tried to create an event it seemed rather ambiguous with the naming conventions it was using.


Are you using visual c#?
If so it's as simple as double clicking the button on your form builder
Member
Posts: 23,862
Joined: Aug 16 2006
Gold: 20.00
Aug 23 2013 04:48pm
Quote (0n35 @ Aug 23 2013 03:59pm)
Are you using visual c#?
If so it's as simple as double clicking the button on your form builder


yeah I was using visual c#. Seemed like it would be the quickest way to do this.
Member
Posts: 11,610
Joined: Oct 28 2008
Gold: 1,795.00
Aug 23 2013 05:41pm
Quote (Eep @ Aug 23 2013 05:48pm)
yeah I was using visual c#. Seemed like it would be the quickest way to do this.


Any visual programs work in this manner, default behavior is on_click
Member
Posts: 59
Joined: Aug 23 2013
Gold: 0.00
Aug 27 2013 12:06pm
Visual Studio. Very easy to use. It pretty much explains itself
Go Back To Programming & Development Topic List
Add Reply New Topic New Poll